]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: add ability to "show interface vrf all brief" 4538/head
authorDon Slice <dslice@cumulusnetworks.com>
Thu, 13 Jun 2019 11:22:11 +0000 (11:22 +0000)
committerDon Slice <dslice@cumulusnetworks.com>
Mon, 17 Jun 2019 17:18:53 +0000 (17:18 +0000)
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>
zebra/interface.c

index b24edc577a879928a36bbb685366fc3d1b00afdb..719cf05db1d1f5a07b8c3b892e9ddce82847ae3f 100644 (file)
@@ -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;
 }