diff mbox

[ovs-dev,09/27] ovn-nbctl: Include logical switch port type in "show" output.

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

Commit Message

Ben Pfaff April 30, 2017, 11:22 p.m. UTC
The port type is important to the user, at least when it is a nonempty
string, so this adds it to the "ovn-nbctl show" output.

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

Comments

Andy Zhou May 3, 2017, 7:20 a.m. UTC | #1
On Sun, Apr 30, 2017 at 4:22 PM, Ben Pfaff <blp@ovn.org> wrote:
> The port type is important to the user, at least when it is a nonempty
> string, so this adds it to the "ovn-nbctl show" output.
>
> 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 3deebfa71f92..87bee0701d14 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -613,6 +613,9 @@  print_ls(const struct nbrec_logical_switch *ls, struct ds *s)
         const struct nbrec_logical_switch_port *lsp = ls->ports[i];
 
         ds_put_format(s, "    port %s\n", lsp->name);
+        if (lsp->type[0]) {
+            ds_put_format(s, "        type: %s\n", lsp->type);
+        }
         if (lsp->parent_name) {
             ds_put_format(s, "        parent: %s\n", lsp->parent_name);
         }