Skip to content

Commit

Permalink
zebra: Add missing json attributes for show evpn
Browse files Browse the repository at this point in the history
Missing json attributes added for show evpn json

Before:
```
tor-1# show evpn json
{
  "advertiseGatewayMacip":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":0,
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"--:--:--",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0
}
tor-1#
```

After:
```
tor-1# show evpn json
{
  "advertiseGatewayMacip":"No",
  "advertiseSviMacip":"No",
  "advertiseSviMac":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":0,
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"--:--:--",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0
}
tor-1#
```

Ticket:#3323248

Issue:3323248

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
  • Loading branch information
Sindhu Parvathi Gopinathan authored and donaldsharp committed Feb 24, 2023
1 parent e4ab682 commit a16563b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions zebra/zebra_vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -3835,6 +3835,12 @@ void zebra_vxlan_print_evpn(struct vty *vty, bool uj)
json = json_object_new_object();
json_object_string_add(json, "advertiseGatewayMacip",
zvrf->advertise_gw_macip ? "Yes" : "No");
json_object_string_add(json, "advertiseSviMacip",
zvrf->advertise_svi_macip ? "Yes"
: "No");
json_object_string_add(json, "advertiseSviMac",
zebra_evpn_mh_do_adv_svi_mac() ? "Yes"
: "No");
json_object_int_add(json, "numVnis", num_vnis);
json_object_int_add(json, "numL2Vnis", num_l2vnis);
json_object_int_add(json, "numL3Vnis", num_l3vnis);
Expand Down

0 comments on commit a16563b

Please sign in to comment.