Commit 1317e8b
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>1 parent e76ef7f commit 1317e8b
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17029 | 17029 | | |
17030 | 17030 | | |
17031 | 17031 | | |
17032 | | - | |
17033 | | - | |
| 17032 | + | |
| 17033 | + | |
17034 | 17034 | | |
17035 | 17035 | | |
17036 | 17036 | | |
| |||
0 commit comments