Skip to content

Commit

Permalink
pbrd: use spaces in show pbr map vty output
Browse files Browse the repository at this point in the history
We were using a mix of spaces and tabsin show pbr map vty output.
Tabs can be inconsistent depending on the system settings.
Using spaces is a safer option for more consistent output.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
  • Loading branch information
sworleys committed Dec 6, 2019
1 parent b781c08 commit b740126
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions pbrd/pbr_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,58 +536,60 @@ static void vty_show_pbrms(struct vty *vty,
vty_out(vty, " Seq: %u rule: %u\n", pbrms->seqno, pbrms->ruleno);

if (detail)
vty_out(vty, "\tInstalled: %" PRIu64 "(%u) Reason: %s\n",
vty_out(vty, " Installed: %" PRIu64 "(%u) Reason: %s\n",
pbrms->installed, pbrms->unique,
pbrms->reason ? rbuf : "Valid");
else
vty_out(vty, "\tInstalled: %s Reason: %s\n",
vty_out(vty, " Installed: %s Reason: %s\n",
pbrms->installed ? "yes" : "no",
pbrms->reason ? rbuf : "Valid");

if (pbrms->src)
vty_out(vty, "\tSRC Match: %s\n",
vty_out(vty, " SRC Match: %s\n",
prefix2str(pbrms->src, buf, sizeof(buf)));
if (pbrms->dst)
vty_out(vty, "\tDST Match: %s\n",
vty_out(vty, " DST Match: %s\n",
prefix2str(pbrms->dst, buf, sizeof(buf)));
if (pbrms->mark)
vty_out(vty, "\tMARK Match: %u\n", pbrms->mark);
vty_out(vty, " MARK Match: %u\n", pbrms->mark);

if (pbrms->nhgrp_name) {
vty_out(vty, "\tNexthop-Group: %s\n", pbrms->nhgrp_name);
vty_out(vty, " Nexthop-Group: %s\n", pbrms->nhgrp_name);

if (detail)
vty_out(vty, "\t\tInstalled: %u(%d) Tableid: %d\n",
vty_out(vty,
" Installed: %u(%d) Tableid: %d\n",
pbrms->nhs_installed,
pbr_nht_get_installed(pbrms->nhgrp_name),
pbr_nht_get_table(pbrms->nhgrp_name));
else
vty_out(vty, "\t\tInstalled: %s Tableid: %d\n",
vty_out(vty, " Installed: %s Tableid: %d\n",
pbr_nht_get_installed(pbrms->nhgrp_name) ? "yes"
: "no",
pbr_nht_get_table(pbrms->nhgrp_name));

} else if (pbrms->nhg) {
vty_out(vty, "\t");
vty_out(vty, " ");
nexthop_group_write_nexthop(vty, pbrms->nhg->nexthop);
if (detail)
vty_out(vty, "\t\tInstalled: %u(%d) Tableid: %d\n",
vty_out(vty,
" Installed: %u(%d) Tableid: %d\n",
pbrms->nhs_installed,
pbr_nht_get_installed(pbrms->internal_nhg_name),
pbr_nht_get_table(pbrms->internal_nhg_name));
else
vty_out(vty, "\t\tInstalled: %s Tableid: %d\n",
vty_out(vty, " Installed: %s Tableid: %d\n",
pbr_nht_get_installed(pbrms->internal_nhg_name)
? "yes"
: "no",
pbr_nht_get_table(pbrms->internal_nhg_name));

} else if (pbrms->vrf_unchanged) {
vty_out(vty, "\tVRF Unchanged (use interface vrf)\n");
vty_out(vty, " VRF Unchanged (use interface vrf)\n");
} else if (pbrms->vrf_lookup) {
vty_out(vty, "\tVRF Lookup: %s\n", pbrms->vrf_name);
vty_out(vty, " VRF Lookup: %s\n", pbrms->vrf_name);
} else {
vty_out(vty, "\tNexthop-Group: Unknown Installed: no\n");
vty_out(vty, " Nexthop-Group: Unknown Installed: no\n");
}
}

Expand Down

0 comments on commit b740126

Please sign in to comment.