summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vxlan.c
diff options
context:
space:
mode:
authorPooja Jagadeesh Doijode <pdoijode@nvidia.com>2023-01-26 19:31:08 +0100
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-01-27 15:37:00 +0100
commit1a4a394d45653b37ddbc8e2321dd09329790ce7c (patch)
tree055b15cabef64e6c8df0b22e9a1996c7000f7e40 /zebra/zebra_vxlan.c
parentMerge pull request #12690 from opensourcerouting/feature/deny_merging_prs_wit... (diff)
downloadfrr-1a4a394d45653b37ddbc8e2321dd09329790ce7c.tar.xz
frr-1a4a394d45653b37ddbc8e2321dd09329790ce7c.zip
zebra: fix JSON fields for show evpn vni detail
Few of the JSON field in show evpn vni detail command is confusing and a few fields were missing. Following is the updated output. primary# show evpn vni detail json [ { "vni":200, "type":"L2", "vrf":"default", "tenantVrf":"default", "vxlanInterface":"vni200", "ifindex":19, "vxlanIfindex":19, "sviInterface":"br200", "sviIfindex":18, "vtepIp":"2.2.2.1", "mcastGroup":"0.0.0.0", "advertiseGatewayMacip":"No", "advertiseSviMacip":"No", "numMacs":0, "numArpNd":0, "numRemoteVteps":1, "remoteVteps":[ { "ip":"2.2.2.2", "flood":"HER" } ] }, { "vni":100, "type":"L3", "vrf":"default", "tenantVrf":"default", "localVtepIp":"2.2.2.1", "vxlanIntf":"vni100", "sviIntf":"br100", "state":"Up", "sysMac":"aa:bb:cc:dd:ee:f1", "routerMac":"aa:bb:cc:dd:ee:f1", "vniFilter":"none", "l2Vnis":[ 20, 30, 200 ] } ] Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
Diffstat (limited to 'zebra/zebra_vxlan.c')
-rw-r--r--zebra/zebra_vxlan.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 7e86d15b4..177659f5c 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -750,6 +750,12 @@ static void zl3vni_print(struct zebra_l3vni *zl3vni, void **ctx)
json_evpn_list = json_object_new_array();
json_object_int_add(json, "vni", zl3vni->vni);
json_object_string_add(json, "type", "L3");
+#if CONFDATE > 20240210
+CPP_NOTICE("Drop `vrf` from JSON outputs")
+#endif
+ json_object_string_add(json, "vrf", zl3vni_vrf_name(zl3vni));
+ json_object_string_add(json, "tenantVrf",
+ zl3vni_vrf_name(zl3vni));
json_object_string_addf(json, "localVtepIp", "%pI4",
&zl3vni->local_vtep_ip);
json_object_string_add(json, "vxlanIntf",
@@ -757,7 +763,6 @@ static void zl3vni_print(struct zebra_l3vni *zl3vni, void **ctx)
json_object_string_add(json, "sviIntf",
zl3vni_svi_if_name(zl3vni));
json_object_string_add(json, "state", zl3vni_state2str(zl3vni));
- json_object_string_add(json, "vrf", zl3vni_vrf_name(zl3vni));
json_object_string_add(
json, "sysMac",
zl3vni_sysmac2str(zl3vni, buf, sizeof(buf)));