feat(access-point): SSID settings, radio channels, VLAN names, the AP configuration and DHCP leases through declared methods (NetOrk/netork#695)

push_ssid_config, set_radio_channels and set_vlan_name run as checked
uci steps (#35): a refused step raises naming itself and reverts what
was staged. set_radio_channels replaces the undeclared push_radio_channel.

apply_ap_config takes napalm-device-types' ApConfigDict and the parts
the caller found different and writes them as one detached script: the
builder netOrk had in _uci_builders.py, moved here. It answers which
parts it wrote and which it could not, whether the AP restarts, and the
script with every passphrase masked. A passphrase part now writes the
key.

get_dhcp_leases reads dnsmasq's lease file.

Needs napalm-device-types 4.54.0; CI pre-installs it from its branch
until it is on PyPI.
This commit is contained in:
Christian Manivong committed 2026-11-29 20:51:27 +01:00
1 parent dd3e3f1543
commit 634bc9c793
18 files changed
+2108 -40

No files matched your search

+6
View File
@@ -42,7 +42,10 @@ from napalm_device_types.ssh_host_keys import HostKeyCheck, SshHostKeyMismatch
from netmiko import ConnectHandler
from netmiko.exceptions import NetmikoAuthenticationException, NetmikoTimeoutException
from napalm_openwrt.ap_config import OpenWrtApConfigMixin
from napalm_openwrt.ap_writes_mixin import OpenWrtApWritesMixin
from napalm_openwrt.config_mixin import OpenWrtConfigMixin
from napalm_openwrt.dhcp_leases_mixin import OpenWrtDhcpLeasesMixin
from napalm_openwrt.firmware_mixin import OpenWrtFirmwareMixin
from napalm_openwrt.interfaces_mixin import OpenWrtInterfaceMixin
from napalm_openwrt.lldp_agent import OpenWrtLldpAgentMixin
@@ -77,6 +80,9 @@ class OpenWrtDriver(
OpenWrtInterfaceMixin,
OpenWrtVLANMixin,
OpenWrtWirelessMixin,
OpenWrtApWritesMixin,
OpenWrtApConfigMixin,
OpenWrtDhcpLeasesMixin,
OpenWrtLLDPMixin,
OpenWrtConfigMixin,
OpenWrtTimeSyncMixin,