The port settings of the desk switch, a UniFi switch, are configured by hand in the UniFi controller. Added unifi.py, which configures a UniFi switch through the controller's API: it diffs the desired state against the port settings the controller holds for the switch and writes the port overrides that close the gap, matching each VLAN to the controller's network with that VLAN ID. The switches service picks a switch's script, credentials and connection details by its kind. Registered desk-switch as a unifi switch with its full port table, taken from the controller. The controller's password is a master-tier secret. Test plan: - CI - A dry run from maverick reports desk-switch as up to date - Applied two test configurations to spare port 2 from maverick, one with a subset of tagged VLANs and one with all of them, then restored the port - cyclone's toplevel derivation is unchanged
225 B
225 B