Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: Fix memberCount bgp peer-grp json output
memberCount object is moved to outer dict as better not to add into existing collections. Supported commands: ``` show bgp peer-group json ==> default vrf show bgp vrf tenant1 peer-group json => non default vrf ``` Before Fix: ``` leaf-11# show bgp peer-group json { "ISL":{ "remoteAs":0, "type":"external", "addressFamiliesConfigured":[ "IPv4 Unicast" ], "members":{ "swp1":{ "status":"Established" }, "swp2":{ "status":"Established" }, "swp3":{ "status":"Established" }, "swp4":{ "status":"Established" }, "memberCount":4 } } } leaf-11# ``` ``` superspine1# show bgp vrf tenant1 peer-group json { "vrfpeers":{ "remoteAs":0, "type":"external", "addressFamiliesConfigured":[ "IPv4 Unicast", "IPv6 Unicast" ], "dynamicRanges":{ "IPv4":{ "count":1, "ranges":[ "0.0.0.0/0" ] }, "IPv6":{ "count":1, "ranges":[ "::/0" ] } }, "members":{ "101.101.1.1":{ "status":"Established", "dynamic":true }, "memberCount":1 } } } ``` After fix: ``` leaf-11# show bgp peer-group json { "ISL":{ "remoteAs":0, "type":"external", "addressFamiliesConfigured":[ "IPv4 Unicast" ], "memberCount":4, "members":{ "swp1":{ "status":"Established" }, "swp2":{ "status":"Established" }, "swp3":{ "status":"Established" }, "swp4":{ "status":"Established" } } } } leaf-11# ``` ``` superspine1# show bgp vrf tenant1 peer-group json { "vrfpeers":{ "remoteAs":0, "type":"external", "addressFamiliesConfigured":[ "IPv4 Unicast", "IPv6 Unicast" ], "dynamicRanges":{ "IPv4":{ "count":1, "ranges":[ "0.0.0.0/0" ] }, "IPv6":{ "count":1, "ranges":[ "::/0" ] } }, "memberCount":1, "members":{ "101.101.1.1":{ "status":"Established", "dynamic":true } } } } ``` UT done Ticket:#4152925 Issue: 4152925 Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
- Loading branch information