fix: an unknown IPv6 neighbour age is -1.0, not 0.0 #36
No files matched your search
@@ -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
|
the task — the contracts `HostShutdownMixin` and `VmStopRequestMixin` of
|
||||||
napalm-device-types (NetOrk/netork#1636).
|
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
|
## [0.8.0] - 2026-10-23
|
||||||
|
|
||||||
The first release on PyPI. It collects everything since 0.1.0.
|
The first release on PyPI. It collects everything since 0.1.0.
|
||||||
|
|||||||
@@ -148,8 +148,10 @@ class ProxmoxInterfaceMixin:
|
|||||||
"interface": iface,
|
"interface": iface,
|
||||||
"mac": utils.normalize_mac(mac),
|
"mac": utils.normalize_mac(mac),
|
||||||
"ip": parts[0],
|
"ip": parts[0],
|
||||||
# `ip neigh` reports no age; NAPALM's shape requires the key.
|
# `ip neigh` reports no age; NAPALM's shape requires the key,
|
||||||
"age": 0.0,
|
# and -1.0 is napalm-device-types' ARP_AGE_UNKNOWN -- 0.0
|
||||||
|
# would mean "confirmed just now".
|
||||||
|
"age": -1.0,
|
||||||
"state": state,
|
"state": state,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -320,6 +320,13 @@ class TestIPv6Neighbors:
|
|||||||
states = {e["state"] for e in result}
|
states = {e["state"] for e in result}
|
||||||
assert "REACHABLE" in states
|
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:
|
class TestNotImplemented:
|
||||||
def test_get_bgp_config_raises(self, driver):
|
def test_get_bgp_config_raises(self, driver):
|
||||||
|
|||||||
Reference in new issue
Block a user