mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-04-26 01:38:32 +00:00
The metric and used fields might not be returned, causing the parser to
fail if they are not present. The absence was observed in FRR 10.4.1
with a multipath IPv6 route that has two next-hops (one GUA, one LL):
```
$ vtysh -c "show bgp ipv6 unicast 2003::/19 json" | jq '.paths[].nexthops'
[
{
"ip": "2a0d:2146:bdff:120::1",
"afi": "ipv6",
"scope": "global",
"linkLocalOnly": false,
"length": 32,
"metric": 0,
"accessible": true
},
{
"ip": "fe80::3e61:408:1e3e:cff0",
"afi": "ipv6",
"scope": "link-local",
"length": 32,
"accessible": true,
"used": true
}
]
[
{
"ip": "2a0d:2146:bdff:120::1",
"afi": "ipv6",
"scope": "global",
"linkLocalOnly": false,
"length": 32,
"metric": 0,
"accessible": true
},
{
"ip": "fe80::3e61:408:1e3e:cff0",
"afi": "ipv6",
"scope": "link-local",
"length": 32,
"accessible": true,
"used": true
}
]
```
Tested: Query a prefix with multiple next-hops where the metric or used
attributes are missing on one of them.
Signed-off-by: Tan Siewert <tan@siewert.io>
|
||
|---|---|---|
| .. | ||
| api | ||
| cli | ||
| compat | ||
| configuration | ||
| defaults | ||
| exceptions | ||
| execution | ||
| external | ||
| frontend | ||
| images | ||
| models | ||
| plugins | ||
| state | ||
| ui | ||
| util | ||
| .gitignore | ||
| __init__.py | ||
| console.py | ||
| constants.py | ||
| log.py | ||
| main.py | ||
| settings.py | ||
| types.py | ||