1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-04-26 01:38:32 +00:00
thatmattlove-hyperglass/hyperglass
Tan Siewert 32873934cf
frr: set default values for optional next-hop fields
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>
2025-10-04 21:35:27 +02:00
..
api format and lint 2025-06-14 21:44:20 -04:00
cli format and lint 2025-06-14 21:44:20 -04:00
compat logging overhaul 2024-04-01 23:42:07 -04:00
configuration logging overhaul 2024-04-01 23:42:07 -04:00
defaults fix: timeout when fetching bgp routes 2025-06-09 21:37:14 -04:00
exceptions format and lint 2025-06-14 21:44:20 -04:00
execution Update ssh.py 2025-09-29 20:29:05 -04:00
external format and lint 2025-06-14 21:44:20 -04:00
frontend fix logging issues 2024-06-30 23:22:46 -04:00
images update defaults & docs with new logo 2020-07-04 15:01:25 -07:00
models frr: set default values for optional next-hop fields 2025-10-04 21:35:27 +02:00
plugins bgp_route_frr: skip empty route query results 2025-10-04 21:35:17 +02:00
state format and lint 2025-06-14 21:44:20 -04:00
ui fixes formatting 2025-09-25 23:40:58 -04:00
util logging overhaul 2024-04-01 23:42:07 -04:00
.gitignore cleanup 2020-04-12 02:17:16 -07:00
__init__.py update module docstring 2022-12-26 10:07:04 -05:00
console.py Migrate to typer for hyperglass CLI, implement new setup 2021-09-27 01:40:49 -07:00
constants.py feat: Add FRR structured output for BGP Routes 2025-06-09 21:12:18 -04:00
log.py remove unnecessary logging 2024-06-30 23:54:37 -04:00
main.py fix prepending of HYPERGLASS_APP_PATH to values; closes #253 2024-06-01 15:08:59 -04:00
settings.py Refactor HyperglassSettings name 2021-09-22 22:30:16 -07:00
types.py Add is_series type guard, with tests 2021-09-16 15:57:12 -07:00