Add NAT information to the logical routers in nbctl show output
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).
@@ -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(&nat->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
