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:
1 parent
dd3e3f1543
commit
634bc9c793
18 files changed
+2108
-40
No files matched your search
@@ -7,6 +7,34 @@ recorded here; their history is the git log.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- napalm-device-types' declared AP writes (NetOrk/netork#695), so an application no longer
|
||||
sends UCI itself:
|
||||
- `push_ssid_config(ssid, config)` writes the SSID settings it is given (encryption, key,
|
||||
hidden, enabled, disassoc_low_ack, max_inactivity) to every wifi-iface carrying the
|
||||
SSID and reloads wifi, each step checked (#35). An SSID no wifi-iface carries raises.
|
||||
- `set_radio_channels({radio: channel})` sets every radio's channel (`0` is `auto`) in
|
||||
one commit with one full wifi restart.
|
||||
- `set_vlan_name(vlan_id, name)` names the VLAN's `bridge-vlan` sections; False where none
|
||||
carries it.
|
||||
- `apply_ap_config(config, parts)` writes the parts of an access point's desired
|
||||
configuration that differ, as one script run detached on the AP: radios, remote
|
||||
syslog, LuCI, dropbear, the `br-ap` bridge and its VLANs, spanning tree, and each
|
||||
SSID's VLAN, bands, presence, encryption, key, flags, limits, MAC filter and 802.11r.
|
||||
It answers which parts it wrote, which it could not (`skipped`: unknown, or a keyed
|
||||
mode without its key), whether the AP restarts (a new bridge), and the script with
|
||||
every passphrase masked. `wireless/<ssid>/passphrase` now writes the key, where
|
||||
netOrk's own builder wrote nothing for it.
|
||||
- `get_dhcp_leases()` (`DhcpLeasesMixin`): dnsmasq's DHCPv4 leases from its lease file;
|
||||
`[]` where dnsmasq never ran, a raise where the file cannot be read.
|
||||
|
||||
### Changed
|
||||
- Needs napalm-device-types 4.54.0 or later.
|
||||
|
||||
### Removed
|
||||
- `push_radio_channel(radio, channel)`, which no contract declared: `set_radio_channels`
|
||||
replaces it. A breaking change before 1.0.0.
|
||||
|
||||
## [0.10.0] - 2026-11-28
|
||||
|
||||
### Added
|
||||
|
||||
Reference in new issue
Block a user