zebra: add ESI to the "show evpn mac vni <> mac <> json" output

Sample output -
=============
anuradhak-VirtualBox# anuradhak-VirtualBox# show evpn mac vni 1000 mac 00:00:00:00:00:22 json

{
  "00:00:00:00:00:22":{
    "type":"remote",
    "remoteVtep":"0.0.0.0",
    "localSequence":0,
    "remoteSequence":0,
    "detectionCount":0,
    "isDuplicate":false,
    "syncNeighCount":0,
    "esi":"03:44:38:39:ff:ff:02:00:00:02", >>>>>>>>>>>>>>>>
    "neighbors":"none"
  }
}

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
Anuradha Karuppiah 2020-07-20 08:37:46 -07:00
parent 2ff12693b1
commit 4a7d61409d

View File

@ -1380,6 +1380,9 @@ static void zvni_print_mac(zebra_mac_t *mac, void *ctxt, json_object *json)
thread_buf,
sizeof(thread_buf),
mac->hold_timer));
if (mac->es)
json_object_string_add(json_mac, "esi",
mac->es->esi_str);
/* print all the associated neigh */
if (!listcount(mac->neigh_list))
json_object_string_add(json_mac, "neighbors", "none");