The local interface was the second dotted part of the key, so the neighbours of eth0.1 landed under eth0 with every field missed. The remote port was read from port.ifname or port.id.value, and lldpd prints a port given by MAC or local id as port.mac / port.local, never as id.value, so that port came back empty. lldpd's output now goes through napalm-device-types' parse_lldpctl_keyvalue and its two NAPALM projections, which keep the interface name up to the neighbour's first field and read the ids under whatever type lldpd prints. The detail gains the system description and capabilities on the way. The module is under strict mypy now; the floor on napalm-device-types rises to 4.24.0. Closes #26
71 lines
3.9 KiB
Markdown
71 lines
3.9 KiB
Markdown
# Changelog
|
||
|
||
All notable changes to napalm-openwrt. The format follows
|
||
[Keep a Changelog](https://keepachangelog.com/), versions follow
|
||
[Semantic Versioning](https://semver.org/). Versions up to 0.6.0 were not
|
||
recorded here; their history is the git log.
|
||
|
||
## [Unreleased]
|
||
|
||
### Added
|
||
- `configure_lldp_agent(interfaces)` (napalm-device-types `LldpAgentMixin`): installs
|
||
lldpd where it is missing, writes the interfaces given as lldpd's interface list in
|
||
UCI, enables lldpd at boot and restarts it. A VLAN device (`br-ap.10`) is written as
|
||
the device under it (`br-ap`). It is the action for the setup the LLDP getters used
|
||
to do on every poll (#8). Needs napalm-device-types with `LldpAgentMixin`.
|
||
|
||
### Changed
|
||
- The floor on napalm-device-types is 4.24.0, the first release with what this driver
|
||
uses (its shared `lldpctl` parser).
|
||
- 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 is 5.1: older releases import `pkg_resources`, which a Python
|
||
3.12 venv no longer has.
|
||
- `get_lldp_neighbors()` and `get_lldp_neighbors_detail()` only read. They no longer
|
||
enable and start a stopped lldpd, and no longer rewrite lldpd's interface list
|
||
and restart it, which could happen on every poll. A device whose lldpd is stopped
|
||
now reports no neighbours until lldpd is started, for example with
|
||
`manage_service("lldpd", "enable")` and `manage_service("lldpd", "start")` (#8).
|
||
|
||
### Fixed
|
||
- `get_lldp_neighbors()` and `get_lldp_neighbors_detail()` keep an interface name with
|
||
a dot whole: the neighbours of a VLAN interface such as `eth0.1` used to come back
|
||
under `eth0` with every field empty (#26). A neighbour that names its port by MAC
|
||
address or a local id is reported with that port instead of an empty one, and a
|
||
chassis named by a local id or an address with that id. The detail now also
|
||
carries the neighbour's system description and capabilities, which were always
|
||
empty. lldpd's output is parsed by napalm-device-types' shared parser.
|
||
- `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": neither
|
||
`ip neigh` nor `/proc/net/arp` has an age (NetOrk/netork#1327).
|
||
- The driver no longer removes `port` from the `optional_args` dict it is given:
|
||
the caller's dict stays as it was (#19).
|
||
- `manage_service()` reports a failed action or a missing init script as failed:
|
||
only the init script's exit status decides, where any action used to come back
|
||
as a success (#3).
|
||
- `apply_updates()` reports a failed upgrade as failed, with the package manager's
|
||
exit status in `error`; it used to report every upgrade as done (#11).
|
||
- `get_environment()` reports the CPU usage of the last second, from two reads of
|
||
`/proc/stat` one second apart; it used to report the average since boot, so a box
|
||
busy for the last minute could show a low figure (#10).
|
||
- `get_lldp_neighbors()` and `get_lldp_neighbors_detail()` report every neighbour
|
||
on a port (a phone with a PC behind it, a switch without LLDP of its own); only
|
||
the last one came back, mixed with fields of the others (#9).
|
||
|
||
## [0.7.0] - 2026-10-23
|
||
|
||
The first release on PyPI.
|
||
|
||
### Changed
|
||
- The driver follows the NAPALM driver standard
|
||
(https://git.netork.io/NAPALM/driver-standard): CI on Gitea runs ruff, mypy, the
|
||
tests on Python 3.10–3.13 and at the lowest declared versions, bandit, pip-audit and
|
||
a build check, and a release tag publishes to PyPI. The package now ships `py.typed`
|
||
and a LICENSE file. **Python 3.8 and 3.9 are no longer supported**;
|
||
napalm-device-types never ran on them.
|
||
- napalm-device-types 4.21.1 or newer is required.
|
||
- Exceptions the driver deliberately ignores (the snmpd community in
|
||
`get_snmp_config()`, the network VLANs in `get_ssids()`) are now logged at debug
|
||
level.
|
||
- The project links point at git.netork.io instead of GitHub.
|