summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2018-10-26 22:57:23 +0200
committerDon Slice <dslice@cumulusnetworks.com>2018-10-29 14:09:31 +0100
commit24cdbd0d8becedf0b9c3634c548a85179dda7bf8 (patch)
treebe815eb480bcaf568b49a134c1de2957a074b66d /zebra/zebra_vty.c
parentMerge pull request #3247 from opensourcerouting/spelchek (diff)
downloadfrr-24cdbd0d8becedf0b9c3634c548a85179dda7bf8.tar.xz
frr-24cdbd0d8becedf0b9c3634c548a85179dda7bf8.zip
zebra: add json support to show evpn mac vni <num> mac <mac>
Added the json output capability in order to improve troubleshooting capabilities. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index cf704f24b..3873009cf 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -2006,18 +2006,21 @@ DEFUN (show_evpn_mac_vni_all_vtep,
DEFUN (show_evpn_mac_vni_mac,
show_evpn_mac_vni_mac_cmd,
- "show evpn mac vni " CMD_VNI_RANGE " mac WORD",
+ "show evpn mac vni " CMD_VNI_RANGE " mac WORD [json]",
SHOW_STR
"EVPN\n"
"MAC addresses\n"
"VxLAN Network Identifier\n"
"VNI number\n"
"MAC\n"
- "MAC address (e.g., 00:e0:ec:20:12:62)\n")
+ "MAC address (e.g., 00:e0:ec:20:12:62)\n"
+ JSON_STR)
+
{
struct zebra_vrf *zvrf;
vni_t vni;
struct ethaddr mac;
+ bool uj = use_json(argc, argv);
vni = strtoul(argv[4]->arg, NULL, 10);
if (!prefix_str2mac(argv[6]->arg, &mac)) {
@@ -2025,7 +2028,7 @@ DEFUN (show_evpn_mac_vni_mac,
return CMD_WARNING;
}
zvrf = vrf_info_lookup(VRF_DEFAULT);
- zebra_vxlan_print_specific_mac_vni(vty, zvrf, vni, &mac);
+ zebra_vxlan_print_specific_mac_vni(vty, zvrf, vni, &mac, uj);
return CMD_SUCCESS;
}