Merge pull request 'fix: an unknown IPv6 neighbour age is -1.0, not 0.0' (#36) from fix/arp-unknown-age into main
driver / standard (push) Successful in 18s
driver / lint (push) Successful in 15s
driver / types (push) Successful in 1m32s
driver / test (3.12) (push) Successful in 1m36s
driver / test (3.13) (push) Successful in 1m35s
driver / lowest (push) Successful in 36s
driver / build (push) Successful in 36s
driver / security (push) Successful in 1m27s
CI / driver (push) Successful in 3m37s
driver / publish (push) Skipped
driver / standard (push) Successful in 18s
driver / lint (push) Successful in 15s
driver / types (push) Successful in 1m32s
driver / test (3.12) (push) Successful in 1m36s
driver / test (3.13) (push) Successful in 1m35s
driver / lowest (push) Successful in 36s
driver / build (push) Successful in 36s
driver / security (push) Successful in 1m27s
CI / driver (push) Successful in 3m37s
driver / publish (push) Skipped
This commit was merged in pull request #36.
This commit is contained in:
commit
d5ae2e2915
3 files changed
+16
-2
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
|
||||
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.
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user