Files
JakeHillion 89b3444ee8
commit-validation / validate-single-commit (pull_request) Successful in 8s
buildbot/nix-eval Build done. (709 warnings)
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
switches: manage desk-switch from the network registry
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
2026-11-20 21:00:42 +00:00
..