Re: [ovs-dev] [PATCH] Add NAT information to the logical routers in nbctl show output

2017-04-13 Thread Ben Pfaff
On Thu, Apr 13, 2017 at 10:11:58AM +0100, Lucas Alvares Gomes wrote:
> This patch is changing the print_lr() function in ovn-nbctl.c to include
> logical router NAT information as part of the output (external ip,
> logical ip and type).
> 
> Signed-off-by: Lucas Alvares Gomes 

Thank you for your contribution.  I applied this to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH] Add NAT information to the logical routers in nbctl show output

2017-04-13 Thread Lucas Alvares Gomes
This patch is changing the print_lr() function in ovn-nbctl.c to include
logical router NAT information as part of the output (external ip,
logical ip and type).

Signed-off-by: Lucas Alvares Gomes 
---
 ovn/utilities/ovn-nbctl.c | 12 
 1 file changed, 12 insertions(+)

diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index 598f502af..e9dcde701 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -589,6 +589,18 @@ print_lr(const struct nbrec_logical_router *lr, struct ds 
*s)
 ds_put_cstr(s, "]\n");
 }
 }
+
+for (size_t i = 0; i < lr->n_nat; i++) {
+const struct nbrec_nat *nat = lr->nat[i];
+ds_put_format(s, "nat "UUID_FMT"\n",
+  UUID_ARGS(>header_.uuid));
+ds_put_cstr(s, "external ip: ");
+ds_put_format(s, "\"%s\"\n", nat->external_ip);
+ds_put_cstr(s, "logical ip: ");
+ds_put_format(s, "\"%s\"\n", nat->logical_ip);
+ds_put_cstr(s, "type: ");
+ds_put_format(s, "\"%s\"\n", nat->type);
+}
 }
 
 static void
-- 
2.12.2

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev