feat: import Sophos access points from a Sophos Central CSV export
- New "Access Points" page: load the Sophos Central export, check missing sites and duplicate IPs, serial numbers and MAC addresses - Find existing APs globally by serial number and MAC (chunked queries) and by name within the tenant group; list NetBox APs missing in the export - Map Sophos sites to NetBox sites of the tenant group (suggested by name, stored per profile, per-AP choice for APs without site) - Create or update devices with Sophos device type, role, site, serial, firmware, interface, MAC and primary IP; tenant from the site or the chosen tenant, devices of other tenants are never changed; preview before writing Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
8f20bcf795
commit
9ce25d820a
8 files changed
+924
-4
No files matched your search
@@ -124,6 +124,9 @@ def empty_profile(name):
|
||||
"vlan_map": {},
|
||||
# Switch network decisions: "<network>" -> {"vrf_id", "vrf_name" (new VRF), "create": prefix}.
|
||||
"network_map": {},
|
||||
# Sophos AP import: tenant, role, rename option and site choices
|
||||
# ("site_map": Sophos site -> NetBox site ID, "ap_sites": AP key -> NetBox site ID).
|
||||
"access_points": {},
|
||||
# Windows client scan: targets and options, never a password.
|
||||
"clients": dict(DEFAULT_CLIENT_OPTIONS),
|
||||
}
|
||||
@@ -174,6 +177,7 @@ class ProfileStore:
|
||||
"host_map": dict(record.get("host_map", {})),
|
||||
"vlan_map": dict(record.get("vlan_map", {})),
|
||||
"network_map": dict(record.get("network_map", {})),
|
||||
"access_points": dict(record.get("access_points", {})),
|
||||
"clients": {**DEFAULT_CLIENT_OPTIONS, **{key: value for key, value in record.get("clients", {}).items()
|
||||
if key in DEFAULT_CLIENT_OPTIONS}},
|
||||
})
|
||||
@@ -249,6 +253,7 @@ class ProfileStore:
|
||||
"host_map": dict(profile.get("host_map", {})),
|
||||
"vlan_map": dict(profile.get("vlan_map", {})),
|
||||
"network_map": dict(profile.get("network_map", {})),
|
||||
"access_points": dict(profile.get("access_points", {})),
|
||||
"clients": dict(profile.get("clients", DEFAULT_CLIENT_OPTIONS)),
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user