fix: an unknown ARP age is -1.0, not 0.0 #17

Merged
christianmanivong merged 1 commits from fix/arp-unknown-age into main 2026-10-30 09:11:54 +00:00
Owner

get_arp_table() on Smart switches wrote 0.0 as the age and ignored the "Age (min)" column of show arp. 0.0 means "confirmed just now", and an application ranking sightings by freshness takes it at its word. The driver now reports -1.0 (napalm-device-types' ARP_AGE_UNKNOWN, NAPALM's own value for "not reported"). CHANGELOG under Unreleased/Fixed.

Parsing the column waits for real switch output: the docstring example and the test fixture are not taken from a switch. The docstring says so; the change is line-neutral to stay within the quality baseline.

Test: TestGetArpTable::test_age_is_unknown in tests/unit/test_driver.py.

Refs NetOrk/netork#1327. Depends on NAPALM/napalm-device-types#57 for the contract (ARP_AGE_UNKNOWN).

Priority: P4 (blocks NetOrk/netork#1190)

`get_arp_table()` on Smart switches wrote `0.0` as the age and ignored the "Age (min)" column of `show arp`. `0.0` means "confirmed just now", and an application ranking sightings by freshness takes it at its word. The driver now reports `-1.0` (napalm-device-types' `ARP_AGE_UNKNOWN`, NAPALM's own value for "not reported"). CHANGELOG under Unreleased/Fixed. Parsing the column waits for real switch output: the docstring example and the test fixture are not taken from a switch. The docstring says so; the change is line-neutral to stay within the quality baseline. Test: `TestGetArpTable::test_age_is_unknown` in `tests/unit/test_driver.py`. Refs NetOrk/netork#1327. Depends on NAPALM/napalm-device-types#57 for the contract (`ARP_AGE_UNKNOWN`). Priority: P4 (blocks NetOrk/netork#1190)
christianmanivong added 1 commit 2026-10-30 07:38:18 +00:00
fix: an unknown ARP age is -1.0, not 0.0
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 14s
driver / test (3.12) (pull_request) Successful in 1m1s
driver / types (pull_request) Successful in 1m7s
driver / test (3.13) (pull_request) Successful in 57s
driver / lowest (pull_request) Successful in 30s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m7s
CI / driver (pull_request) Successful in 2m42s
driver / publish (pull_request) Skipped
7b179383c6
get_arp_table on Smart switches wrote 0.0 ("confirmed just now") and
ignored the "Age (min)" column of show arp. It now reports ARP_AGE_UNKNOWN;
parsing the column waits for real switch output, since the docstring
example and the test fixture are not taken from a switch.

NetOrk/netork#1327
christianmanivong merged commit fa56ed4cfa into main 2026-10-30 09:11:54 +00:00
christianmanivong deleted branch fix/arp-unknown-age 2026-10-30 09:11:54 +00:00
Sign in to join this conversation.