Skip to content

Commit

Permalink
Add NAT information to the logical routers in nbctl show output
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
umago authored and blp committed Apr 13, 2017
1 parent f73d562 commit 4b25ced
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ovn/utilities/ovn-nbctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4b25ced

Please sign in to comment.