feat(lldp): configure_lldp_agent sets up lldpd on the given interfaces #25

Merged
christianmanivong merged 3 commits from feat/lldp-agent-setup into main 2026-11-02 00:08:09 +00:00
Owner

Implements napalm-device-types' new configure_lldp_agent(interfaces) template: new module napalm_openwrt/lldp_agent.py writes lldpd.config.interface in UCI (creates the section if missing, replaces the list, uci commit, exit-status checked). A VLAN device (br-ap.10) is written as its parent (br-ap), as the removed getter helper did; names are checked against a safe pattern. Install and start come from the generic template steps.

Depends on napalm-device-types feat/lldp-agent-template (raise the floor to the release containing LldpAgentMixin) and on #24 (read-only getters, commit 783a4ee) — without #24 the getter would overwrite the interface list on every poll, so #24 must merge before or with this. git merge-tree against fix/bugs-2026-11 is clean; the merged tree passes 223 tests.

Tested: fixtures only, tests/unit/test_lldp_agent.py (6, failed first). pytest 202 passed, ruff, mypy, napalm-standard check/ratchet green.

Refs #8

Implements napalm-device-types' new `configure_lldp_agent(interfaces)` template: new module `napalm_openwrt/lldp_agent.py` writes `lldpd.config.interface` in UCI (creates the section if missing, replaces the list, `uci commit`, exit-status checked). A VLAN device (`br-ap.10`) is written as its parent (`br-ap`), as the removed getter helper did; names are checked against a safe pattern. Install and start come from the generic template steps. **Depends on** napalm-device-types `feat/lldp-agent-template` (raise the floor to the release containing `LldpAgentMixin`) and on #24 (read-only getters, commit 783a4ee) — without #24 the getter would overwrite the interface list on every poll, so #24 must merge before or with this. `git merge-tree` against `fix/bugs-2026-11` is clean; the merged tree passes 223 tests. Tested: fixtures only, `tests/unit/test_lldp_agent.py` (6, failed first). pytest 202 passed, ruff, mypy, `napalm-standard check`/`ratchet` green. Refs #8
christianmanivong added 1 commit 2026-11-01 21:32:41 +00:00
feat(lldp): configure_lldp_agent sets up lldpd on the given interfaces
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Failing after 1m1s
driver / test (3.12) (pull_request) Failing after 59s
driver / test (3.13) (pull_request) Failing after 49s
driver / lowest (pull_request) Failing after 25s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m1s
CI / driver (pull_request) Failing after 2m28s
driver / publish (pull_request) Skipped
5cce38b2bb
The LLDP getters started lldpd and rewrote its interface list on every
poll; with read-only getters that setup needs an action. The driver
mixes in napalm-device-types' LldpAgentMixin and writes the step the
template leaves to it: lldpd.config.interface in UCI. A VLAN device is
written as the device under it, as the old helper did, since lldpd
sends on the L2 device. Which interfaces is the caller's choice.

Refs #8
christianmanivong added 2 commits 2026-11-02 00:03:08 +00:00
chore(deps): floor napalm-device-types at 4.23.0
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 1m5s
driver / lowest (pull_request) Successful in 27s
driver / test (3.13) (pull_request) Successful in 55s
driver / build (pull_request) Successful in 25s
driver / security (pull_request) Successful in 59s
CI / driver (pull_request) Successful in 2m36s
driver / publish (pull_request) Skipped
6802e4d7df
4.23.0 is on PyPI with everything this branch uses; the git pre-install
in CI is no longer needed.
christianmanivong merged commit d04a969eb1 into main 2026-11-02 00:08:09 +00:00
christianmanivong deleted branch feat/lldp-agent-setup 2026-11-02 00:08:09 +00:00
Sign in to join this conversation.