diff mbox

[ovs-dev,10/27] ovn-nbctl: Display logical switch router ports in "show".

Message ID 20170430232231.15151-11-blp@ovn.org
State Accepted
Headers show

Commit Message

Ben Pfaff April 30, 2017, 11:22 p.m. UTC
This allows the reader to figure out from "ovn-nbctl show" output where the
ports of type "router" connect.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 ovn/utilities/ovn-nbctl.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Andy Zhou May 3, 2017, 7:24 a.m. UTC | #1
On Sun, Apr 30, 2017 at 4:22 PM, Ben Pfaff <blp@ovn.org> wrote:
> This allows the reader to figure out from "ovn-nbctl show" output where the
> ports of type "router" connect.
>
> Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
diff mbox

Patch

diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index 87bee0701d14..cc0ab15c9442 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -631,6 +631,11 @@  print_ls(const struct nbrec_logical_switch *ls, struct ds *s)
             }
             ds_put_cstr(s, "]\n");
         }
+
+        const char *router_port = smap_get(&lsp->options, "router-port");
+        if (router_port) {
+            ds_put_format(s, "        router-port: %s\n", router_port);
+        }
     }
 }