feat(fixes): configure_lldp_agent(interfaces) template #73

Merged
christianmanivong merged 3 commits from feat/lldp-agent-template into main 2026-11-01 23:06:48 +00:00
Owner

New fix template LldpAgentMixin.configure_lldp_agent(interfaces) in fixes.py, built like SnmpAgentMixin: install (ensure_package(LLDP_AGENT_PACKAGE)), configure (_write_lldp_agent_config(names), the one step a driver implements), start (manage_service(LLDP_AGENT_SERVICE, "enable") then "restart", so lldpd reads the new interface list). Both attributes default to lldpd; an empty interface list raises ValueError before anything changes. Not mixed into any role base.

Why: NAPALM/napalm-openwrt#8 — the LLDP getters used to start lldpd and rewrite its interface list on every poll. Decision: getters only read; the caller (netOrk, NetOrk/netork#1842) sets lldpd up on the interfaces it chooses.

Tested: 6 new tests (failed first at import) + the check that no role base offers it. pytest 1054 passed, ruff, mypy, napalm-standard check/ratchet green. CHANGELOG [Unreleased] → Added (MINOR).

Merge order: this → release → napalm-openwrt (#24, then feat/lldp-agent-setup with the floor raised) → netOrk pins + NetOrk/netork#1842.

New fix template `LldpAgentMixin.configure_lldp_agent(interfaces)` in `fixes.py`, built like `SnmpAgentMixin`: **install** (`ensure_package(LLDP_AGENT_PACKAGE)`), **configure** (`_write_lldp_agent_config(names)`, the one step a driver implements), **start** (`manage_service(LLDP_AGENT_SERVICE, "enable")` then `"restart"`, so lldpd reads the new interface list). Both attributes default to `lldpd`; an empty interface list raises `ValueError` before anything changes. Not mixed into any role base. Why: NAPALM/napalm-openwrt#8 — the LLDP getters used to start lldpd and rewrite its interface list on every poll. Decision: getters only read; the caller (netOrk, NetOrk/netork#1842) sets lldpd up on the interfaces it chooses. Tested: 6 new tests (failed first at import) + the check that no role base offers it. pytest 1054 passed, ruff, mypy, `napalm-standard check`/`ratchet` green. CHANGELOG [Unreleased] → Added (MINOR). Merge order: this → release → napalm-openwrt (#24, then feat/lldp-agent-setup with the floor raised) → netOrk pins + NetOrk/netork#1842.
christianmanivong added 1 commit 2026-11-01 21:32:40 +00:00
feat(fixes): configure_lldp_agent(interfaces) template
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 57s
driver / test (3.12) (pull_request) Successful in 1m7s
driver / test (3.13) (pull_request) Successful in 56s
driver / lowest (pull_request) Successful in 30s
driver / build (pull_request) Successful in 28s
driver / security (pull_request) Successful in 58s
CI / driver (pull_request) Successful in 2m32s
driver / publish (pull_request) Skipped
bc17862a44
LLDP getters used to install, start and reconfigure lldpd on their own,
on every poll. Getters only read now, so starting the agent needs an
action the application calls. The template installs the agent through
ensure_package, has the driver write the interfaces it runs on, then
enables and restarts it through manage_service. The caller names the
interfaces: an agent on every interface also advertises on a WAN port.

Refs NAPALM/napalm-openwrt#8
christianmanivong added 2 commits 2026-11-01 23:01:46 +00:00
# Conflicts:
#	CHANGELOG.md
Merge remote-tracking branch 'origin/main' into feat/lldp-agent-template
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m6s
driver / test (3.13) (pull_request) Successful in 1m6s
driver / test (3.12) (pull_request) Successful in 1m14s
driver / lowest (pull_request) Successful in 38s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Successful in 1m10s
CI / driver (pull_request) Successful in 2m45s
driver / publish (pull_request) Skipped
51e8c849bb
# Conflicts:
#	CHANGELOG.md
christianmanivong merged commit 8d32e70cd7 into main 2026-11-01 23:06:48 +00:00
christianmanivong deleted branch feat/lldp-agent-template 2026-11-01 23:06:48 +00:00
Sign in to join this conversation.