Merge pull request 'fix: an unknown ARP age is -1.0, not 0.0' (#11) from fix/arp-unknown-age into main
driver / standard (push) Successful in 17s
driver / lint (push) Successful in 13s
driver / types (push) Successful in 1m1s
driver / test (3.12) (push) Successful in 1m3s
driver / lowest (push) Failing after 6s
driver / test (3.13) (push) Successful in 58s
driver / build (push) Failing after 8s
driver / security (push) Successful in 1m6s
CI / driver (push) Failing after 2m39s
driver / publish (push) Skipped

This commit was merged in pull request #11.
This commit is contained in:
christianmanivong committed 2026-10-30 09:20:28 +00:00
commit 086dd8e3ed
3 files changed
+11 -1

No files matched your search

+5
View File
@@ -19,6 +19,11 @@ All notable changes to this driver. The format follows
- The floor on napalm is 5.1: older releases import `pkg_resources`, which a Python
3.12 venv no longer has.
### Fixed
- `get_arp_table()` reports an unknown age as `-1.0` (napalm-device-types'
`ARP_AGE_UNKNOWN`) instead of `0.0`, which means "confirmed just now": `show arp`
has no age column (NetOrk/netork#1327).
## [0.5.0] - 2026-10-23
The first release on PyPI through the shared workflow; 0.1.0 and 0.1.1 there are an old upload.
+1 -1
View File
@@ -634,7 +634,7 @@ class TPLinkJetstreamDriver(ConfigLifecycleMixin, SnmpAgentMixin, SwitchDriver):
"interface": interface,
"mac": mac_addr,
"ip": ip_addr,
"age": 0.0,
"age": -1.0, # no age column: unknown, never 0.0 ("just now")
}
)
+5
View File
@@ -177,6 +177,11 @@ class TestGetArpTable:
for key in ("interface", "mac", "ip", "age"):
assert key in entry
def test_age_is_unknown(self, driver):
# `show arp` has no age column; 0.0 would read as "just now" (NetOrk/netork#1327).
driver._send_command = lambda cmd: SHOW_ARP
assert {e["age"] for e in driver.get_arp_table()} == {-1.0}
def test_ip_value(self, driver):
driver._send_command = lambda cmd: SHOW_ARP
ips = {e["ip"] for e in driver.get_arp_table()}