summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2019-06-13 13:22:11 +0200
committerDon Slice <dslice@cumulusnetworks.com>2019-06-17 19:18:53 +0200
commita5c7809c8b8b8d5aa34b1e0649711548b2b9c093 (patch)
treee211e9d1818499ff2c87e962de59aa04a8280f4b
parentMerge pull request #4517 from chiragshah6/mdev (diff)
downloadfrr-a5c7809c8b8b8d5aa34b1e0649711548b2b9c093.tar.xz
frr-a5c7809c8b8b8d5aa34b1e0649711548b2b9c093.zip
zebra: add ability to "show interface vrf all brief"
Found that the "show interface brief" command was missing the ability to specify all vrfs. Added that capability via this fix. Ticket: CM-25139 Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
-rw-r--r--zebra/interface.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index b24edc577..719cf05db 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1593,12 +1593,13 @@ DEFPY(show_interface, show_interface_cmd,
/* Show all interfaces to vty. */
-DEFUN (show_interface_vrf_all,
+DEFPY (show_interface_vrf_all,
show_interface_vrf_all_cmd,
- "show interface vrf all",
+ "show interface vrf all [brief$brief]",
SHOW_STR
"Interface status and configuration\n"
- VRF_ALL_CMD_HELP_STR)
+ VRF_ALL_CMD_HELP_STR
+ "Interface status and configuration summary\n")
{
struct vrf *vrf;
struct interface *ifp;
@@ -1606,9 +1607,14 @@ DEFUN (show_interface_vrf_all,
interface_update_stats();
/* All interface print. */
- RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
- FOR_ALL_INTERFACES (vrf, ifp)
- if_dump_vty(vty, ifp);
+ RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
+ if (brief) {
+ ifs_dump_brief_vty(vty, vrf);
+ } else {
+ FOR_ALL_INTERFACES (vrf, ifp)
+ if_dump_vty(vty, ifp);
+ }
+ }
return CMD_SUCCESS;
}