[ovs-dev] [PATCH] ovn-nbctl: Add lrp's gateway chassis information in show command

nusiddiq at redhat.com nusiddiq at redhat.com
Tue Jan 2 12:43:27 UTC 2018


From: Numan Siddique <nusiddiq at redhat.com>

Having this information in the show command will be helpful.

Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
---
 ovn/utilities/ovn-nbctl.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index c920ad878..c9aa2fef4 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -614,6 +614,15 @@ print_lr(const struct nbrec_logical_router *lr, struct ds *s)
             }
             ds_put_cstr(s, "]\n");
         }
+
+        if (lrp->n_gateway_chassis) {
+            ds_put_cstr(s, "        gateway chassis: [");
+            for (size_t j = 0; j < lrp->n_gateway_chassis; j++) {
+                ds_put_format(s, "%s ", lrp->gateway_chassis[j]->chassis_name);
+            }
+            ds_chomp(s, ' ');
+            ds_put_cstr(s, "]\n");
+        }
     }
 
     for (size_t i = 0; i < lr->n_nat; i++) {
-- 
2.14.3



More information about the dev mailing list