diff options
| author | Don Slice <dslice@cumulusnetworks.com> | 2018-10-26 20:57:23 +0000 |
|---|---|---|
| committer | Don Slice <dslice@cumulusnetworks.com> | 2018-10-29 13:09:31 +0000 |
| commit | 24cdbd0d8becedf0b9c3634c548a85179dda7bf8 (patch) | |
| tree | be815eb480bcaf568b49a134c1de2957a074b66d /zebra/zebra_vty.c | |
| parent | dd5c280ab3ae493e038ca13b672da148ade58f61 (diff) | |
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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index cf704f24be..3873009cfb 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; } |
