[ovs-dev] [PATCH 2/2] ovn-sbctl: Print stage name in addition to table number.

Justin Pettit jpettit at nicira.com
Thu Aug 13 01:02:12 UTC 2015


Signed-off-by: Justin Pettit <jpettit at nicira.com>
---
 ovn/utilities/ovn-sbctl.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c
index 9976215..06bc0ca 100644
--- a/ovn/utilities/ovn-sbctl.c
+++ b/ovn/utilities/ovn-sbctl.c
@@ -481,6 +481,7 @@ pre_get_info(struct ctl_context *ctx)
     ovsdb_idl_add_column(ctx->idl, &sbrec_logical_flow_col_priority);
     ovsdb_idl_add_column(ctx->idl, &sbrec_logical_flow_col_table_id);
     ovsdb_idl_add_column(ctx->idl, &sbrec_logical_flow_col_match);
+    ovsdb_idl_add_column(ctx->idl, &sbrec_logical_flow_col_external_ids);
 }
 
 static struct cmd_show_table cmd_show_tables[] = {
@@ -686,10 +687,12 @@ cmd_lflow_list(struct ctl_context *ctx)
                     lflow->pipeline);
             cur_pipeline = lflow->pipeline;
         }
-        printf("  table_id=%" PRId64 ", priority=%3" PRId64 ", "
-               "match=(%s), action=(%s)\n",
-               lflow->table_id, lflow->priority,
-               lflow->match, lflow->actions);
+
+        const char *table_name = smap_get(&lflow->external_ids, "stage-name");
+        printf("  table=%" PRId64 "(%8s), priority=%3" PRId64
+               ", match=(%s), action=(%s)\n",
+               lflow->table_id, table_name ? table_name : "",
+               lflow->priority, lflow->match, lflow->actions);
     }
 
     free(lflows);
-- 
1.7.5.4




More information about the dev mailing list