ovn-nbctl: Split parent and tag in "show" output.
authorRussell Bryant <rbryant@redhat.com>
Tue, 6 Oct 2015 03:50:46 +0000 (04:50 +0100)
committerBen Pfaff <blp@nicira.com>
Tue, 6 Oct 2015 04:13:28 +0000 (21:13 -0700)
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@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovn/utilities/ovn-nbctl.c

index 2d2a5ee..1d8f745 100644 (file)
@@ -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:");