1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-04-25 09:18:56 +00:00
thatmattlove-hyperglass/hyperglass/models/parsing
Tan Siewert 79d235c2ff
frr: return AS0 if AS_PATH length is zero
Local prefixes usually do not have an AS_PATH:
```
vtysh -c "show bgp ipv4 unicast 10.10.10.10 json" | jq '.paths[].aspath'
{
  "string": "Local",
  "segments": [],
  "length": 0
}
```

Set AS0 as a temporary solution when AS_PATH length is zero. This
avoids parser failures for local prefixes, though ideally we should
use the device's actual ASN (see TODO in code).

Signed-off-by: Tan Siewert <tan@siewert.io>
2025-10-04 21:35:30 +02:00
..
__init__.py clean up data models [skip ci] 2020-12-13 01:48:35 -07:00
arista_eos.py Removed Union import 2025-05-17 23:34:15 +10:00
frr.py frr: return AS0 if AS_PATH length is zero 2025-10-04 21:35:30 +02:00
juniper.py logging overhaul 2024-04-01 23:42:07 -04:00