fix: an unknown IPv6 neighbour age is -1.0, not 0.0 #36

Merged
christianmanivong merged 1 commits from fix/arp-unknown-age into main 2026-10-30 09:11:46 +00:00
3 changed files with 16 additions and 2 deletions

No files matched your search

+5
View File
@@ -18,6 +18,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
the task — the contracts `HostShutdownMixin` and `VmStopRequestMixin` of
napalm-device-types (NetOrk/netork#1636).
### Fixed
- `get_ipv6_neighbors_table()` reports an unknown age as `-1.0`, as `get_arp_table()`
already did (napalm-device-types' `ARP_AGE_UNKNOWN`), instead of `0.0`, which
means "confirmed just now" (NetOrk/netork#1327).
## [0.8.0] - 2026-10-23
The first release on PyPI. It collects everything since 0.1.0.
+4 -2
View File
@@ -148,8 +148,10 @@ class ProxmoxInterfaceMixin:
"interface": iface,
"mac": utils.normalize_mac(mac),
"ip": parts[0],
# `ip neigh` reports no age; NAPALM's shape requires the key.
"age": 0.0,
# `ip neigh` reports no age; NAPALM's shape requires the key,
# and -1.0 is napalm-device-types' ARP_AGE_UNKNOWN -- 0.0
# would mean "confirmed just now".
"age": -1.0,
"state": state,
}
)
+7
View File
@@ -320,6 +320,13 @@ class TestIPv6Neighbors:
states = {e["state"] for e in result}
assert "REACHABLE" in states
def test_age_is_unknown(self, driver):
# `ip neigh` reports no age, as for the IPv4 table; 0.0 would read as
# "confirmed just now" (NetOrk/netork#1327).
driver._node_api().execute.post.return_value = {"data": self.IPV6_NEIGH}
result = driver.get_ipv6_neighbors_table()
assert {e["age"] for e in result} == {-1.0}
class TestNotImplemented:
def test_get_bgp_config_raises(self, driver):