Implements napalm-device-types' declared AP writes and the DHCP lease reader (NetOrk/netork#695), so that netOrk no longer builds UCI itself. This is the 0.11.0 release.
Added
push_ssid_config(ssid, config): a partial write to every wifi-iface carrying the SSID, then wifi reload.
set_radio_channels({radio: channel}): one commit and one full wifi restart.
set_vlan_name(vlan_id, name): names the VLAN's bridge-vlan sections; False where none carries it.
All three run as checked uci steps (#35): a refused step raises and reverts what was staged.
apply_ap_config(config, parts): netOrk's UCI builder, moved here (napalm_openwrt/ap_config/), with the changes it writes unchanged.
The changes are staged by a script the call waits for. A change uci refuses raises CommandErrorException naming its part, and every config is reverted, so nothing is applied (#54).
The commits, LuCI's service, the reloads and the restart (after a bridge rebuild) then run detached.
Passphrases are masked in what it returns.
wireless/<ssid>/passphrase now writes the key.
get_dhcp_leases(): dnsmasq's DHCPv4 leases from its lease file; [] where dnsmasq never ran.
Removed: the undeclared push_radio_channel; set_radio_channels replaces it. This is breaking, before 1.0.0.
Needs napalm-device-types 4.54.0 (NAPALM/napalm-device-types#142). ci.yml pre-installs it from that branch's commit until 4.54.0 is on PyPI; drop the pre-install line after the release.
Tested: fixtures only: recorded uci show and dnsmasq output, and the stage script run through /bin/sh against a fake uci. 530 passed, coverage 83 %. mypy strict, ruff, and napalm-standard check --tag v0.11.0 plus ratchet are clean. A test on a real AP follows after the netOrk merge.
Implements napalm-device-types' declared AP writes and the DHCP lease reader (NetOrk/netork#695), so that netOrk no longer builds UCI itself. This is the 0.11.0 release.
**Added**
- `push_ssid_config(ssid, config)`: a partial write to every wifi-iface carrying the SSID, then `wifi reload`.
- `set_radio_channels({radio: channel})`: one commit and one full `wifi` restart.
- `set_vlan_name(vlan_id, name)`: names the VLAN's `bridge-vlan` sections; False where none carries it.
All three run as checked uci steps (#35): a refused step raises and reverts what was staged.
- `apply_ap_config(config, parts)`: netOrk's UCI builder, moved here (`napalm_openwrt/ap_config/`), with the changes it writes unchanged.
- The changes are staged by a script the call waits for. A change uci refuses raises `CommandErrorException` naming its part, and every config is reverted, so nothing is applied (#54).
- The commits, LuCI's service, the reloads and the restart (after a bridge rebuild) then run detached.
- Passphrases are masked in what it returns.
- `wireless/<ssid>/passphrase` now writes the key.
- `get_dhcp_leases()`: dnsmasq's DHCPv4 leases from its lease file; `[]` where dnsmasq never ran.
**Removed:** the undeclared `push_radio_channel`; `set_radio_channels` replaces it. This is breaking, before 1.0.0.
**Needs** napalm-device-types 4.54.0 (NAPALM/napalm-device-types#142). `ci.yml` pre-installs it from that branch's commit until 4.54.0 is on PyPI; drop the `pre-install` line after the release.
**Tested:** fixtures only: recorded `uci show` and dnsmasq output, and the stage script run through /bin/sh against a fake `uci`. 530 passed, coverage 83 %. mypy strict, ruff, and `napalm-standard check --tag v0.11.0` plus ratchet are clean. A test on a real AP follows after the netOrk merge.
Closes #54
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.
The configuration ran as one detached script, so a refused uci step
only reached its log while the call reported the part as applied. The
changes are now staged by a script the call waits for: a uci wrapper
records each refused set, add, add_list or delete with its part, and at
the end every config is reverted and the script exits 3, which raises
CommandErrorException naming each part, passphrases masked. Quiet -q
calls stay tests. The commits, LuCI's service, the reloads and the
restart run detached afterwards, as before.
Closes#54
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements napalm-device-types' declared AP writes and the DHCP lease reader (NetOrk/netork#695), so that netOrk no longer builds UCI itself. This is the 0.11.0 release.
Added
push_ssid_config(ssid, config): a partial write to every wifi-iface carrying the SSID, thenwifi reload.set_radio_channels({radio: channel}): one commit and one fullwifirestart.set_vlan_name(vlan_id, name): names the VLAN'sbridge-vlansections; False where none carries it.All three run as checked uci steps (#35): a refused step raises and reverts what was staged.
apply_ap_config(config, parts): netOrk's UCI builder, moved here (napalm_openwrt/ap_config/), with the changes it writes unchanged.CommandErrorExceptionnaming its part, and every config is reverted, so nothing is applied (#54).wireless/<ssid>/passphrasenow writes the key.get_dhcp_leases(): dnsmasq's DHCPv4 leases from its lease file;[]where dnsmasq never ran.Removed: the undeclared
push_radio_channel;set_radio_channelsreplaces it. This is breaking, before 1.0.0.Needs napalm-device-types 4.54.0 (NAPALM/napalm-device-types#142).
ci.ymlpre-installs it from that branch's commit until 4.54.0 is on PyPI; drop thepre-installline after the release.Tested: fixtures only: recorded
uci showand dnsmasq output, and the stage script run through /bin/sh against a fakeuci. 530 passed, coverage 83 %. mypy strict, ruff, andnapalm-standard check --tag v0.11.0plus ratchet are clean. A test on a real AP follows after the netOrk merge.Closes #54