fix: an unknown IPv6 neighbour age is -1.0, not 0.0
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 56s
driver / test (3.12) (pull_request) Successful in 1m5s
driver / test (3.13) (pull_request) Successful in 59s
driver / lowest (pull_request) Successful in 38s
driver / build (pull_request) Successful in 39s
driver / security (pull_request) Successful in 1m17s
CI / driver (pull_request) Successful in 2m50s
driver / publish (pull_request) Skipped

get_ipv6_neighbors_table reports ARP_AGE_UNKNOWN, as get_arp_table already
did, instead of 0.0 ("confirmed just now").

NetOrk/netork#1327
This commit is contained in:
Christian Manivong committed 2026-10-30 08:37:08 +01:00
1 parent d577e7aae2
commit cc9752499e
3 files changed
+16 -2

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):