diff options
| author | Pooja Jagadeesh Doijode <pdoijode@nvidia.com> | 2023-01-03 15:17:58 -0800 | 
|---|---|---|
| committer | Pooja Jagadeesh Doijode <pdoijode@nvidia.com> | 2023-01-03 15:17:58 -0800 | 
| commit | 283ef1b0d396f39d44528f75f75f9d3add1b2622 (patch) | |
| tree | d5a78856f2fe618cdb694b47a98bfcc6b667e0ff /zebra/zebra_vty.c | |
| parent | cb8d1c5598290e88f89c5bfcd13050fe4de4a154 (diff) | |
zebra: Evpn mac vni detail show command
New show command "show evpn mac vni xx detail [json]"
to display details of all the mac entries for the
requested VNI.
Output of show evpn mac vni xx detail json:
        {
          "numMacs":2,
          "macs":{
            "ca:be:63:7c:81:05":{
              "type":"local",
              "intf":"veth100",
              "ifindex":8,
              "uptime":"00:06:55",
              "localSequence":0,
              "remoteSequence":0,
              "detectionCount":0,
              "isDuplicate":false,
              "syncNeighCount":0,
              "neighbors":{
                "active":[
                  "fe80::c8be:63ff:fe7c:8105"
                ],
                "inactive":[
                ]
              }
            }
          }
        }
Also added remoteEs field in the JSON output of
"show evpn mac vni xx json".
Output of show evpn mac vni xx json:
"00:02:00:00:00:0d":{
  "type":"remote",
  "remoteEs":"03:44:38:39:ff:ff:02:00:00:02",
  "localSequence":0,
  "remoteSequence":0,
  "detectionCount":0,
  "isDuplicate":false
}
Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
Diffstat (limited to 'zebra/zebra_vty.c')
| -rw-r--r-- | zebra/zebra_vty.c | 22 | 
1 files changed, 21 insertions, 1 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 8ed8abe304..4b3463dc62 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -3511,7 +3511,26 @@ DEFUN (show_evpn_mac_vni,  	vni = strtoul(argv[4]->arg, NULL, 10);  	zvrf = zebra_vrf_get_evpn(); -	zebra_vxlan_print_macs_vni(vty, zvrf, vni, uj); +	zebra_vxlan_print_macs_vni(vty, zvrf, vni, uj, false); +	return CMD_SUCCESS; +} + +DEFPY (show_evpn_mac_vni_detail, +       show_evpn_mac_vni_detail_cmd, +       "show evpn mac vni " CMD_VNI_RANGE " detail [json]", +       SHOW_STR +       "EVPN\n" +       "MAC addresses\n" +       "VXLAN Network Identifier\n" +       "VNI number\n" +       "Detailed Information On Each VNI MAC\n" +       JSON_STR) +{ +	struct zebra_vrf *zvrf; +	bool uj = use_json(argc, argv); + +	zvrf = zebra_vrf_get_evpn(); +	zebra_vxlan_print_macs_vni(vty, zvrf, vni, uj, true);  	return CMD_SUCCESS;  } @@ -4819,6 +4838,7 @@ void zebra_vty_init(void)  	install_element(VIEW_NODE, &show_evpn_mac_vni_cmd);  	install_element(VIEW_NODE, &show_evpn_mac_vni_all_cmd);  	install_element(VIEW_NODE, &show_evpn_mac_vni_all_detail_cmd); +	install_element(VIEW_NODE, &show_evpn_mac_vni_detail_cmd);  	install_element(VIEW_NODE, &show_evpn_mac_vni_all_vtep_cmd);  	install_element(VIEW_NODE, &show_evpn_mac_vni_mac_cmd);  	install_element(VIEW_NODE, &show_evpn_mac_vni_vtep_cmd);  | 
