feat: ARP_AGE_UNKNOWN, the age of a neighbour the device does not report
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 18s
driver / types (pull_request) Successful in 1m12s
driver / test (3.12) (pull_request) Successful in 1m13s
driver / test (3.13) (pull_request) Successful in 1m8s
driver / lowest (pull_request) Successful in 31s
driver / build (pull_request) Successful in 35s
driver / security (pull_request) Successful in 1m15s
CI / driver (pull_request) Successful in 3m3s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 18s
driver / types (pull_request) Successful in 1m12s
driver / test (3.12) (pull_request) Successful in 1m13s
driver / test (3.13) (pull_request) Successful in 1m8s
driver / lowest (pull_request) Successful in 31s
driver / build (pull_request) Successful in 35s
driver / security (pull_request) Successful in 1m15s
CI / driver (pull_request) Successful in 3m3s
driver / publish (pull_request) Skipped
NAPALM requires an age on every entry of get_arp_table and get_ipv6_neighbors_table. Many devices do not report one, and drivers filled in 0.0, which means "confirmed just now". ARP_AGE_UNKNOWN (-1.0, as NAPALM's IOS driver reports) is the value for "not reported"; the README states the contract. NetOrk/netork#1327
This commit is contained in:
1 parent
145c2c668b
commit
874c6c5a92
5 files changed
+57
No files matched your search
@@ -74,6 +74,7 @@ from napalm_device_types.apt_proxy import (
|
||||
parse_apt_proxy,
|
||||
same_proxy_url,
|
||||
)
|
||||
from napalm_device_types.arp import ARP_AGE_UNKNOWN
|
||||
from napalm_device_types.base import DeviceTypeDriver, FingerprintRule, PortSpec, rules_max_weight
|
||||
from napalm_device_types.channel import (
|
||||
ByteStream,
|
||||
@@ -278,6 +279,7 @@ __all__ = [
|
||||
"InterfaceFilterMixin",
|
||||
"MacAclMixin",
|
||||
"ManagementControllerDriver",
|
||||
"ARP_AGE_UNKNOWN",
|
||||
"POWER_ACTIONS",
|
||||
"PowerAction",
|
||||
"PowerStateDict",
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
"""The ``age`` of an entry in NAPALM's neighbour tables when the device does not say.
|
||||
|
||||
NAPALM requires an ``age`` on every entry of ``get_arp_table`` and
|
||||
``get_ipv6_neighbors_table``: seconds since the device last confirmed that
|
||||
neighbour. Many devices do not report one. ``0.0`` means "confirmed just now"
|
||||
and must never stand in for "not reported": a caller ranking sightings by
|
||||
freshness takes it at its word (NetOrk/netork#1327). An expiry countdown is not
|
||||
an age either. The value is NAPALM's own; its IOS driver reports ``-1.0``.
|
||||
"""
|
||||
|
||||
from typing import Final
|
||||
|
||||
ARP_AGE_UNKNOWN: Final[float] = -1.0
|
||||
Reference in new issue
Block a user