bgpd: Detail option for nexthop and import-check to display paths
1. Updated "show bgp vrf <vrf-name> nexthop detail"
and "show bgp vrf <vrf-name> import-check-table
detail" show commands to display paths associated with
nexthop. "detail" option was previously unused.
2. Added 'ipv4' and 'ipv6' JSON object under top level JSON.
3. Removed the "nexthops" JSON object which was under the top
level JSON object
4. Renamed "ifname" to "interfaceName"
5. Renamed "gates" JSON obejct to "nexthops"
6. Changed "flags" JSON array to JSON object and changed the
flags from string to boolean
7. "lastUpdate" will display only epoch time for "detail" option
JSON output:
r4# show bgp vrf default nexthop detail json
{
"ipv4":{
"10.0.7.1":{
"valid":true,
"complete":true,
"igpMetric":0,
"pathCount":3,
"peer":"10.0.7.1",
"nexthops":[
{
"interfaceName":"r4-r2-eth0"
}
],
"lastUpdate":
1672265350,
"paths":[
{
"afi":"IPv4",
"safi":"unicast",
"prefix":"11.0.20.2/32",
"vrf":"default",
"flags":{
"igpChanged":false,
"damped":false,
"history":false,
"bestpath":true,
"valid":true,
"attrChanged":false,
"deterministicMedCheck":false,
"deterministicMedSelected":false,
"stale":false,
"removed":false,
"counted":true,
"multipath":false,
"multipathChanged":false,
"ribAttributeChanged":false,
"nexthopSelf":false,
"linkBandwidthChanged":false,
"acceptOwn":false
}
}
]
}
}
}
}
Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>