fix(lldp): list every neighbour of a port, with its chassis MAC
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 15s
driver / test (3.12) (pull_request) Failing after 48s
driver / types (pull_request) Failing after 1m0s
driver / lowest (pull_request) Failing after 22s
driver / test (3.13) (pull_request) Failing after 48s
driver / build (pull_request) Successful in 38s
driver / security (pull_request) Failing after 1m20s
CI / driver (pull_request) Failing after 2m46s
driver / publish (pull_request) Skipped

lldpctl -f keyvalue was grouped by interface, so a second neighbour on a
port overwrote the first. The driver looked for chassis.id.value and
port.id.value, keys lldpd never prints (it names an id by its type,
chassis.mac, port.local), so the chassis MAC was never reported and a
port given by MAC or local id came back empty; and eth0.100 was cut at
its dot. The output now goes through napalm-device-types'
parse_lldpctl_keyvalue, which splits neighbours at their via line and
keeps the interface name whole; the floor on napalm-device-types rises
to 4.24.0 for it.

Closes #58
This commit is contained in:
Christian Manivong committed 2026-11-02 08:44:15 +01:00
1 parent 5687f5d9a1
commit 3d2de27988
5 files changed
+150 -29

No files matched your search

+7
View File
@@ -43,8 +43,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Python 3.12 is the floor (`requires-python = ">=3.12"`): netOrk runs every driver
on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6).
- The floor on napalm-device-types is 4.24.0, for its shared `lldpctl` parser.
### Fixed
- `get_lldp_neighbors()` lists every neighbour of a port (#58): a phone and the PC
behind it, or the devices behind an unmanaged switch, used to merge into one entry
and only the last one was left. A neighbour whose chassis id is a MAC address now
carries it as `mac` (it never did), a port given as a MAC address or local id is
reported instead of coming back empty, and an interface with a dot in its name
(`eth0.100`) keeps its whole name.
- dnf and yum hosts read pending updates and security advisories from the cached
metadata only (`--cacheonly`), as apt reads its local index (#59). With an expired
cache `check-update` downloaded the repositories' metadata first, and on an Oracle