]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Detail option for nexthop and import-check to display paths
authorPooja Jagadeesh Doijode <pdoijode@nvidia.com>
Wed, 28 Dec 2022 22:13:32 +0000 (14:13 -0800)
committerPooja Jagadeesh Doijode <pdoijode@nvidia.com>
Wed, 28 Dec 2022 22:13:32 +0000 (14:13 -0800)
commit8da79d08ada15049d61573c01189c48580d5884b
treec1d2f27a3efc6314f989abc0bc0544d8b80f880f
parentbf85e4c5f1008a12faea6e52de01b910d2b20e2c
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>
bgpd/bgp_nexthop.c