feat: network controller role and get_vlans_detail, 4.60.0
driver / lint (pull_request) Successful in 14s
driver / standard (pull_request) Successful in 24s
driver / types (pull_request) Successful in 1m10s
driver / lowest (pull_request) Successful in 1m3s
driver / test (3.13) (pull_request) Successful in 1m18s
driver / build (pull_request) Successful in 43s
driver / test (3.12) (pull_request) Successful in 2m13s
driver / security (pull_request) Successful in 1m5s
CI / driver (pull_request) Successful in 2m18s
driver / publish (pull_request) Skipped

NetworkControllerDriver (network_controller) is a role for a controller that
manages switches, access points and gateways. It declares
get_managed_devices(), returning ManagedDeviceDict per managed or pending
device; each such device is polled with a driver of its own, so the
controller never reports their ports or neighbours as its own.

SwitchDriver now declares get_vlans_detail() with VlanDetailDict, which
several switch drivers already offered and netOrk's poll already read.

The new shapes live in network_controller_models.py and switch_models.py:
models.py is over the size limit and may not grow.

Refs NetOrk/netork#2787
This commit is contained in:
christianmanivong committed 2026-12-05 17:12:43 +01:00
1 parent 70a8195f7e
commit d5ffb0f0fa
12 files changed
+297 -2

No files matched your search

+10
View File
@@ -47,6 +47,15 @@ UUID and NIC MACs -- what ties the BMC to the host it manages. Its sensors come
NAPALM's `get_environment`, with `cpu` and `memory` empty, since a BMC does not know the
host OS's load; it has no `HealthMetricsMixin` (SNMP) and no command channel.
A network controller (UniFi Network, TP-Link Omada, Aruba Instant On) is a role of its
own, `NetworkControllerDriver` (`network_controller`), reached over its API
(`USES_SSH = False`). It is not the switches, access points and gateways it manages:
`get_managed_devices` reports *which* devices it manages (`ManagedDeviceDict`: MAC, name,
model, role, state, site, address, and where known serial and firmware), and each of them is
polled as a device of its own with its own driver. Its `get_interfaces`,
`get_lldp_neighbors` and `get_mac_address_table` are the controller's own, never its
children's (NetOrk/netork#2787).
A backup server (Proxmox Backup Server) is a role of its own too, `BackupServerDriver`
(`backup_server`). Its datastores, the backup groups in them (each with its newest
snapshot), its jobs (garbage collection, verify, prune, sync, tape) and its remotes have
@@ -748,6 +757,7 @@ Requires Python ≥ 3.12 (tested up to 3.13) and NAPALM ≥ 4.0.
| `PhoneDriver` | IP telephony endpoints | Yealink |
| `MediaDriver` | Speakers, streamers, media renderers | Sonos, Chromecast |
| `ManagementControllerDriver` | Server baseboard management controllers | Supermicro BMC, Dell iDRAC, HPE iLO, Lenovo XCC |
| `NetworkControllerDriver` | Controllers that manage switches, APs and gateways | UniFi Network, TP-Link Omada |
| `BackupServerDriver` | Backup servers: datastores, backup groups, GC/verify/prune/sync/tape jobs | Proxmox Backup Server |
Mixins that come with the classes above: `PingSweepMixin` (subnet sweeps, in