[ovs-dev] [PATCH] ovn-nbctl: Split parent and tag in "show" output.

Russell Bryant rbryant at redhat.com
Mon Oct 5 02:14:50 UTC 2015


As of 779e72cc57a106251cc9e6696e8c9aabb56d30b5, localnet ports may have
the tag column set.  This case does not make use of the parent column,
so output these fields independently of each other.

Signed-off-by: Russell Bryant <rbryant at redhat.com>
---
 ovn/utilities/ovn-nbctl.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index 2d2a5ee..45fc7d0 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -404,9 +404,11 @@ print_lswitch(const struct nbrec_logical_switch *lswitch, struct ds *s)
         const struct nbrec_logical_port *lport = lswitch->ports[i];
 
         ds_put_format(s, "        lport %s\n", lport->name);
-        if (lport->parent_name && lport->n_tag) {
-            ds_put_format(s, "            parent: %s, tag:%"PRIu64"\n",
-                          lport->parent_name, lport->tag[0]);
+        if (lport->parent_name) {
+            ds_put_format(s, "            parent: %s\n", lport->parent_name);
+        }
+        if (lport->n_tag) {
+            ds_put_format(s, "            tag:%"PRIu64"\n", lport->tag[0]);
         }
         if (lport->n_macs) {
             ds_put_cstr(s, "            macs:");
-- 
2.4.3




More information about the dev mailing list