feat(access-point): declared writes for SSIDs, radios, VLAN names and the AP configuration, and a DHCP lease reader (NetOrk/netork#695)
WirelessWritesMixin declares push_ssid_config(ssid, SsidConfigDict), a
partial write, and set_radio_channels({radio: channel}), every radio in
one restart; AccessPointDriver and ResidentialGatewayDriver carry it.
AccessPointDriver declares set_vlan_name(vlan_id, name) and, through
ApConfigMixin, apply_ap_config(ApConfigDict, parts): the desired state
in vendor-neutral terms, of which the driver writes the parts the caller
found different, answered by ApConfigResultDict. The part names and
their I/O-free readers live in ap_config.
DhcpLeasesMixin declares get_dhcp_leases() with DhcpLeaseDict, apart
from DhcpServerMixin, so an access point can report the leases it serves.
This commit is contained in:
1 parent
059d97f6de
commit
0db9c9ba65
12 files changed
+678
-2
No files matched your search
@@ -651,6 +651,23 @@ since both commonly run the DHCP server for their networks).
|
||||
`ConfigLifecycleMixin` (config load/compare/commit/rollback) is mixed in by a
|
||||
driver itself.
|
||||
|
||||
An access point's writes (NetOrk/netork#695): `WirelessWritesMixin` declares
|
||||
`push_ssid_config(ssid, SsidConfigDict)`, a partial write of an SSID's settings, and
|
||||
`set_radio_channels({radio: channel})`, every radio in one go with one restart of the
|
||||
wireless stack (`AUTO_CHANNEL`, 0, lets a radio choose); both come with
|
||||
`AccessPointDriver` and `ResidentialGatewayDriver`. `AccessPointDriver` also declares
|
||||
`set_vlan_name(vlan_id, name)`, a narrow write instead of the switch's `set_vlan`, and
|
||||
`ApConfigMixin.apply_ap_config(ApConfigDict, parts)`: the access point's desired
|
||||
configuration, of which the driver writes the parts the caller names
|
||||
(`AP_CONFIG_PARTS`, `network/vlan/<vid>`, `wireless/<ssid>/<attribute>`; read them with
|
||||
`ap_config_ssid_part`, `ap_config_vlan_part`, `is_ap_config_part`). The caller compares,
|
||||
the driver writes; it answers with `ApConfigResultDict`.
|
||||
|
||||
`DhcpLeasesMixin` (`get_dhcp_leases()`, a list of `DhcpLeaseDict`) reads the leases a
|
||||
DHCP server handed out. It is apart from `DhcpServerMixin`, since an access point serves
|
||||
leases without being a DHCP server anybody manages; a driver mixes it in itself. A failed
|
||||
read raises; a device that serves none returns `[]`.
|
||||
|
||||
### Fingerprints
|
||||
|
||||
`DeviceTypeDriver` carries what discovery matches a device against: `PORT_SPECS`,
|
||||
|
||||
Reference in new issue
Block a user