aboutsummaryrefslogtreecommitdiff
path: root/ansible/netbox
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/netbox')
-rw-r--r--ansible/netbox/pyproject.toml10
-rw-r--r--ansible/netbox/sync-unifi.py363
-rw-r--r--ansible/netbox/uv.lock129
3 files changed, 502 insertions, 0 deletions
diff --git a/ansible/netbox/pyproject.toml b/ansible/netbox/pyproject.toml
new file mode 100644
index 0000000..84c0d6d
--- /dev/null
+++ b/ansible/netbox/pyproject.toml
@@ -0,0 +1,10 @@
+[project]
+name = "netbox"
+version = "0.1.0"
+description = "Add your description here"
+readme = "README.md"
+requires-python = ">=3.12"
+dependencies = [
+ "unifi-controller-api",
+ "pynetbox",
+]
diff --git a/ansible/netbox/sync-unifi.py b/ansible/netbox/sync-unifi.py
new file mode 100644
index 0000000..4427b20
--- /dev/null
+++ b/ansible/netbox/sync-unifi.py
@@ -0,0 +1,363 @@
+import os
+import sys
+from unifi_controller_api import UnifiController, UnifiDevice
+from unifi_controller_api.exceptions import UnifiAuthenticationError, UnifiAPIError
+from pprint import pprint
+
+import pynetbox
+from pynetbox.core.response import Record
+
+class Db():
+ def __init__(self):
+ self.devices = []
+ self.interfaces = []
+ self.ips = []
+ self.macs = []
+ self.cables = []
+
+class NotFoundException(Exception):
+ def __init__(self, msg):
+ super().__init__(msg)
+
+class Query():
+ def __init__(self, args, query, projection=lambda x: x.id):
+ self.args = args
+ self.query = query
+ self.projection = projection
+
+ def run(self, nb):
+ try:
+ ret = self.query()
+ except Exception as e:
+ print("Query failed: ")
+ print(f"Arguments: {value.args}")
+ print(e)
+ raise e
+
+ if ret is None:
+ raise NotFoundException(f"resource not found, args={self.args}")
+
+# if len(ret) != 1:
+# raise NotFoundException(f"multiple resources found, args={self.args}, result={ret}")
+
+ return self.projection(ret)
+
+def find_device(nb, name: str):
+ return Query({}, lambda: nb.dcim.devices.get(name=name))
+
+def find_interface_by_mac(nb, mac_address: str):
+ args = locals()
+ del args["nb"]
+ return Query(args, lambda: nb.dcim.interfaces.get(mac_address=mac_address))
+
+def find_interface(nb, device: str, name: str):
+ args = locals()
+ del args["nb"]
+ return Query(args, lambda: nb.dcim.interfaces.get(device=device, name=name))
+
+class NetboxCache():
+ def __init__(self, nb):
+ self.nb = nb
+ self.device_roles = {}
+ self.device_types = {}
+ self.ip_addresses = {}
+
+ def get_device_role(self, slug):
+ dt = self.device_roles.get(slug)
+
+ if dt is not None:
+ return dt
+
+ dt = self.nb.dcim.device_roles.get(slug=slug)
+ if dt is None:
+ raise Exception(f"No such device type: {slug}")
+
+ self.device_roles[slug] = dt
+ return dt
+
+ def get_device_type(self, slug):
+ dt = self.device_types.get(slug)
+
+ if dt is not None:
+ return dt
+
+ dt = self.nb.dcim.device_types.get(slug=slug)
+ if dt is None:
+ raise Exception(f"No such device type: {slug}")
+
+ self.device_types[slug] = dt
+ return dt
+
+ def get_or_create_ip_address(self, addr: str, vrf: Record | None, data):
+ vrf_id = vrf.id if vrf is not None else None
+ key = (addr, vrf_id)
+ ip = self.ip_addresses.get(key)
+ if ip is not None:
+ return ip
+
+ ip = self.nb.ipam.ip_addresses.get(address=addr, vrf_id=vrf_id)
+ if ip is not None:
+ print(f"Found IP address {ip.id} address={ip.address}, vrf={ip.vrf}")
+ ip.update(data)
+ ip = self.nb.ipam.ip_addresses.get(address=addr, vrf_id=vrf_id)
+ self.ip_addresses[key] = ip
+ return ip
+
+ ip = self.nb.ipam.ip_addresses.create(address=addr, vrf=vrf_id, status="active")
+ self.ip_addresses[key] = ip
+ return ip
+
+def create_or_update_device(nb, d):
+ device = nb.dcim.devices.get(name = d["name"])
+ if device is None:
+ device = nb.dcim.devices.create(d)
+ print(f"Created device id={device.id}, name={device.name}")
+
+ return device
+
+ print(f"Updating device id={device.id}, name={device.name}")
+ device.update(d)
+
+ return nb.dcim.devices.get(id=device.id)
+
+def create_or_update_interface(nb, i):
+ iface = nb.dcim.interfaces.get(device_id=i["device"], name=i["name"])
+ if iface is None:
+ iface = nb.dcim.interfaces.create(i)
+ print(f"Created interface id={iface.id}, name={iface.name}")
+
+ return iface
+
+ print(f"Updating interface id={iface.id}, name={iface.name}")
+ iface.update(i)
+ return nb.dcim.interfaces.get(id=iface.id)
+
+def create_or_update_mac_address(nb, data):
+ ma = nb.dcim.mac_addresses.get(mac_address=data["mac_address"])
+ if ma is None:
+ ma = nb.dcim.mac_addresses.create(data)
+ print(f"Created MAC address id={ma.id}, address={ma.mac_address}")
+
+ return ma
+
+ print(f"Updating MAC address id={ma.id}, address={ma.mac_address}")
+ ma.update(data)
+ return nb.dcim.mac_addresses.get(id=ma.id)
+
+def create_or_update_ip_address(nb, data):
+ ip = nb.ipam.ip_addresses.get(address=data["address"])
+ if ip is None:
+ ip = nb.ipam.ip_addresses.create(data)
+ print(f"Created IP address id={ip.id}, ip={ip.address}")
+
+ return ip
+
+ print(f"Updating IP address id={ip.id}, ip={ip.address}")
+ ip.update(data)
+ return nb.ipam.ip_addresses.get(id=ip.id)
+
+def create_or_update_cable(nb, data):
+ if len(data["a_terminations"]) == 1:
+ a = data["a_terminations"][0]
+ else:
+ raise Exception("only single termination is supported")
+
+ if len(data["b_terminations"]) == 1:
+ b = data["b_terminations"][0]
+ else:
+ raise Exception("only single termination is supported")
+
+ cable = nb.dcim.cables.get(
+ termination_a_type=a["object_type"],
+ termination_a_id=a["object_id"],
+ termination_b_type=b["object_type"],
+ termination_b_id=b["object_id"],
+ )
+ if cable is None:
+ cable = nb.dcim.cables.create(data)
+ print(f"Created Cable address id={ip.id}")
+
+ return cable
+
+ print(f"Updating cable id={ip.id}")
+ cable.update(data)
+ return nb.dcim.cables.get(id=cable.id)
+
+def process_switch(d: UnifiDevice, db: Db, nb: NetboxCache, site, vrf):
+# db.devices.append({
+# "name": d.name,
+# "device_type": nb.get_device_type("ubiquiti-us-8-150w").id,
+# "role": nb.get_device_role("switch").id,
+# "serial": d.serial,
+# "site_name": site,
+# })
+#
+# db.interfaces.append({
+# "device": find_device(nb.nb, name=d.name),
+# "name": "switch0",
+# "type": "virtual",
+# })
+#
+# db.ips.append({
+# "address": f"{d.ip}/32",
+# "is_primary": "true",
+# "vrf": vrf.id,
+# "assigned_object_id": find_interface(nb.nb, device=d.name, name="switch0"),
+# "assigned_object_type": "dcim.interface",
+## "is_primary": "true" TODO: does not work
+# })
+#
+# db.macs.append({
+# "mac_address": d.mac,
+# "assigned_object_id": find_interface(nb.nb, device=d.name, name="switch0"),
+# "assigned_object_type": "dcim.interface",
+## "is_primary": "true" TODO: does not work
+# })
+
+ pprint(d.lldp_info)
+
+ for e in d.lldp_info:
+ a = [
+ {
+ "object_type": "dcim.interface",
+ "object_id": find_interface(nb.nb, device=d.name, name=f"Port {e.local_port_idx} (PoE)"),
+ }
+ ]
+ b = [
+ {
+ "object_type": "dcim.interface",
+ "object_id": find_interface_by_mac(nb.nb, e.chassis_id),
+ }
+ ]
+
+ if e.chassis_id > d.mac:
+ a, b = b, a
+
+ db.cables.append({
+ "a_terminations": a,
+ "b_terminations": b,
+ "status": "connected",
+ })
+
+def sync_db(db: Db, nb):
+ def resolve_query(value):
+ if value is None or isinstance(value, str) or isinstance(value, int):
+ return value
+ elif isinstance(value, Query):
+ return value.run(nb)
+ elif isinstance(value, dict):
+ for k, v in value.items():
+ value[k] = resolve_query(v)
+ elif isinstance(value, list):
+ for i, item in enumerate(value):
+ value[i] = resolve_query(item)
+ else:
+ raise Exception(f"unsupported type: {value}")
+ return value
+
+ for device in db.devices:
+ device = resolve_query(device)
+ create_or_update_device(nb, device)
+
+ for iface in db.interfaces:
+ iface = resolve_query(iface)
+ create_or_update_interface(nb, iface)
+
+ for mac in db.macs:
+ mac = resolve_query(mac)
+ create_or_update_mac_address(nb, mac)
+
+ for ip in db.ips:
+ ip = resolve_query(ip)
+ create_or_update_ip_address(nb, ip)
+
+ for cable in db.cables:
+ try:
+ cable = resolve_query(cable)
+ pprint(cable)
+ create_or_update_cable(nb, cable)
+ except NotFoundException:
+ print("Cable failed, could not find endpoint")
+ continue
+
+def main():
+ unifi_url=os.getenv("UNIFI_URL")
+ unifi_username=os.getenv("UNIFI_USERNAME")
+ unifi_password=os.getenv("UNIFI_PASSWORD")
+ unifi_site=os.getenv("UNIFI_SITE")
+
+ netbox_url=os.getenv("NETBOX_URL")
+ netbox_token=os.getenv("NETBOX_TOKEN")
+ netbox_vrf_name=os.getenv("NETBOX_VRF")
+ netbox_site_name=os.getenv("NETBOX_SITE")
+
+ controller = controller_login(unifi_url, unifi_username, unifi_password)
+
+ (nb, netbox_site, netbox_vrf) = netbox_login(netbox_url, netbox_token, netbox_site_name, netbox_vrf_name)
+ status = nb.status()
+ print(f"NetBox status: {status}")
+
+ devices = collect_devices(controller, unifi_site)
+
+ nb_cache = NetboxCache(nb)
+ db = Db()
+ for d in devices:
+# pprint(d)
+ if d.model == "US8P150":
+ process_switch(d, db, nb_cache, netbox_site, netbox_vrf)
+
+ sync_db(db, nb)
+
+def controller_login(url, username, password) -> UnifiController:
+# try:
+ controller = UnifiController(
+ controller_url=url,
+ username=username,
+ password=password,
+ is_udm_pro=False,
+ verify_ssl=True,
+ )
+
+ # Just to check that there is a valid authentication
+ controller.get_unifi_site(include_health=False, raw=False)
+
+ return controller
+# except UnifiAuthenticationError:
+# print("Authentication failed - please check your UniFi Controller credentials and URL.")
+# except UnifiAPIError as e:
+# print(f"UniFi API error: {e}")
+# except Exception as e:
+# print(f"An unexpected error occurred: {e}")
+
+def collect_devices(controller: UnifiController, site_name: str) -> list[UnifiDevice]:
+ try:
+ return controller.get_unifi_site_device(site_name=site_name, detailed=True, raw=False)
+ except UnifiAPIError as e:
+ print(f"Error fetching device information: {e}")
+ except Exception as e:
+ print(f"An unexpected error occurred: {e}")
+
+def netbox_login(url: str, token: str, site_name: str, vrf_name: str) -> pynetbox.core.api.Api:
+ nb = pynetbox.api(url, token=token)
+
+ site = nb.dcim.sites.get(name=site_name)
+ if site is None:
+ site = nb.dcim.sites.get(slug=site_name)
+ if site is None:
+ print(f"Could not look up site by name or slug: {site_name}")
+ exit(1)
+ print(f"NetBox site {site.name}")
+
+ vrf = None
+ vrf_id = None
+ if vrf_name is not None:
+ vrf = nb.ipam.vrfs.get(site=site, name=vrf_name)
+ if vrf is None:
+ print(f"Could not look up VRF by slug: {vrf_name}")
+ exit(1)
+ vrf_id = vrf.id
+
+ return nb, site, vrf
+
+if __name__ == "__main__":
+ main()
diff --git a/ansible/netbox/uv.lock b/ansible/netbox/uv.lock
new file mode 100644
index 0000000..96a71dd
--- /dev/null
+++ b/ansible/netbox/uv.lock
@@ -0,0 +1,129 @@
+version = 1
+revision = 2
+requires-python = ">=3.12"
+
+[[package]]
+name = "certifi"
+version = "2025.4.26"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/e8/9e/c05b3920a3b7d20d3d3310465f50348e5b3694f4f88c6daf736eef3024c4/certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6", size = 160705, upload-time = "2025-04-26T02:12:29.51Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/4a/7e/3db2bd1b1f9e95f7cddca6d6e75e2f2bd9f51b1246e546d88addca0106bd/certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3", size = 159618, upload-time = "2025-04-26T02:12:27.662Z" },
+]
+
+[[package]]
+name = "charset-normalizer"
+version = "3.4.2"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63", size = 126367, upload-time = "2025-05-02T08:34:42.01Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/d7/a4/37f4d6035c89cac7930395a35cc0f1b872e652eaafb76a6075943754f095/charset_normalizer-3.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7", size = 199936, upload-time = "2025-05-02T08:32:33.712Z" },
+ { url = "https://files.pythonhosted.org/packages/ee/8a/1a5e33b73e0d9287274f899d967907cd0bf9c343e651755d9307e0dbf2b3/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3", size = 143790, upload-time = "2025-05-02T08:32:35.768Z" },
+ { url = "https://files.pythonhosted.org/packages/66/52/59521f1d8e6ab1482164fa21409c5ef44da3e9f653c13ba71becdd98dec3/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a", size = 153924, upload-time = "2025-05-02T08:32:37.284Z" },
+ { url = "https://files.pythonhosted.org/packages/86/2d/fb55fdf41964ec782febbf33cb64be480a6b8f16ded2dbe8db27a405c09f/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214", size = 146626, upload-time = "2025-05-02T08:32:38.803Z" },
+ { url = "https://files.pythonhosted.org/packages/8c/73/6ede2ec59bce19b3edf4209d70004253ec5f4e319f9a2e3f2f15601ed5f7/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a", size = 148567, upload-time = "2025-05-02T08:32:40.251Z" },
+ { url = "https://files.pythonhosted.org/packages/09/14/957d03c6dc343c04904530b6bef4e5efae5ec7d7990a7cbb868e4595ee30/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd", size = 150957, upload-time = "2025-05-02T08:32:41.705Z" },
+ { url = "https://files.pythonhosted.org/packages/0d/c8/8174d0e5c10ccebdcb1b53cc959591c4c722a3ad92461a273e86b9f5a302/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981", size = 145408, upload-time = "2025-05-02T08:32:43.709Z" },
+ { url = "https://files.pythonhosted.org/packages/58/aa/8904b84bc8084ac19dc52feb4f5952c6df03ffb460a887b42615ee1382e8/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c", size = 153399, upload-time = "2025-05-02T08:32:46.197Z" },
+ { url = "https://files.pythonhosted.org/packages/c2/26/89ee1f0e264d201cb65cf054aca6038c03b1a0c6b4ae998070392a3ce605/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b", size = 156815, upload-time = "2025-05-02T08:32:48.105Z" },
+ { url = "https://files.pythonhosted.org/packages/fd/07/68e95b4b345bad3dbbd3a8681737b4338ff2c9df29856a6d6d23ac4c73cb/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d", size = 154537, upload-time = "2025-05-02T08:32:49.719Z" },
+ { url = "https://files.pythonhosted.org/packages/77/1a/5eefc0ce04affb98af07bc05f3bac9094513c0e23b0562d64af46a06aae4/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f", size = 149565, upload-time = "2025-05-02T08:32:51.404Z" },
+ { url = "https://files.pythonhosted.org/packages/37/a0/2410e5e6032a174c95e0806b1a6585eb21e12f445ebe239fac441995226a/charset_normalizer-3.4.2-cp312-cp312-win32.whl", hash = "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c", size = 98357, upload-time = "2025-05-02T08:32:53.079Z" },
+ { url = "https://files.pythonhosted.org/packages/6c/4f/c02d5c493967af3eda9c771ad4d2bbc8df6f99ddbeb37ceea6e8716a32bc/charset_normalizer-3.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e", size = 105776, upload-time = "2025-05-02T08:32:54.573Z" },
+ { url = "https://files.pythonhosted.org/packages/ea/12/a93df3366ed32db1d907d7593a94f1fe6293903e3e92967bebd6950ed12c/charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0", size = 199622, upload-time = "2025-05-02T08:32:56.363Z" },
+ { url = "https://files.pythonhosted.org/packages/04/93/bf204e6f344c39d9937d3c13c8cd5bbfc266472e51fc8c07cb7f64fcd2de/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf", size = 143435, upload-time = "2025-05-02T08:32:58.551Z" },
+ { url = "https://files.pythonhosted.org/packages/22/2a/ea8a2095b0bafa6c5b5a55ffdc2f924455233ee7b91c69b7edfcc9e02284/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e", size = 153653, upload-time = "2025-05-02T08:33:00.342Z" },
+ { url = "https://files.pythonhosted.org/packages/b6/57/1b090ff183d13cef485dfbe272e2fe57622a76694061353c59da52c9a659/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1", size = 146231, upload-time = "2025-05-02T08:33:02.081Z" },
+ { url = "https://files.pythonhosted.org/packages/e2/28/ffc026b26f441fc67bd21ab7f03b313ab3fe46714a14b516f931abe1a2d8/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c", size = 148243, upload-time = "2025-05-02T08:33:04.063Z" },
+ { url = "https://files.pythonhosted.org/packages/c0/0f/9abe9bd191629c33e69e47c6ef45ef99773320e9ad8e9cb08b8ab4a8d4cb/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691", size = 150442, upload-time = "2025-05-02T08:33:06.418Z" },
+ { url = "https://files.pythonhosted.org/packages/67/7c/a123bbcedca91d5916c056407f89a7f5e8fdfce12ba825d7d6b9954a1a3c/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0", size = 145147, upload-time = "2025-05-02T08:33:08.183Z" },
+ { url = "https://files.pythonhosted.org/packages/ec/fe/1ac556fa4899d967b83e9893788e86b6af4d83e4726511eaaad035e36595/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b", size = 153057, upload-time = "2025-05-02T08:33:09.986Z" },
+ { url = "https://files.pythonhosted.org/packages/2b/ff/acfc0b0a70b19e3e54febdd5301a98b72fa07635e56f24f60502e954c461/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff", size = 156454, upload-time = "2025-05-02T08:33:11.814Z" },
+ { url = "https://files.pythonhosted.org/packages/92/08/95b458ce9c740d0645feb0e96cea1f5ec946ea9c580a94adfe0b617f3573/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b", size = 154174, upload-time = "2025-05-02T08:33:13.707Z" },
+ { url = "https://files.pythonhosted.org/packages/78/be/8392efc43487ac051eee6c36d5fbd63032d78f7728cb37aebcc98191f1ff/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148", size = 149166, upload-time = "2025-05-02T08:33:15.458Z" },
+ { url = "https://files.pythonhosted.org/packages/44/96/392abd49b094d30b91d9fbda6a69519e95802250b777841cf3bda8fe136c/charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7", size = 98064, upload-time = "2025-05-02T08:33:17.06Z" },
+ { url = "https://files.pythonhosted.org/packages/e9/b0/0200da600134e001d91851ddc797809e2fe0ea72de90e09bec5a2fbdaccb/charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980", size = 105641, upload-time = "2025-05-02T08:33:18.753Z" },
+ { url = "https://files.pythonhosted.org/packages/20/94/c5790835a017658cbfabd07f3bfb549140c3ac458cfc196323996b10095a/charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0", size = 52626, upload-time = "2025-05-02T08:34:40.053Z" },
+]
+
+[[package]]
+name = "idna"
+version = "3.10"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", size = 190490, upload-time = "2024-09-15T18:07:39.745Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442, upload-time = "2024-09-15T18:07:37.964Z" },
+]
+
+[[package]]
+name = "netbox"
+version = "0.1.0"
+source = { virtual = "." }
+dependencies = [
+ { name = "pynetbox" },
+ { name = "unifi-controller-api" },
+]
+
+[package.metadata]
+requires-dist = [
+ { name = "pynetbox" },
+ { name = "unifi-controller-api" },
+]
+
+[[package]]
+name = "packaging"
+version = "25.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" },
+]
+
+[[package]]
+name = "pynetbox"
+version = "7.5.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "packaging" },
+ { name = "requests" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/d3/0b/695021a23c373991d07c1e4cb510287a521318cfc4b29f68ebbecb19fcd2/pynetbox-7.5.0.tar.gz", hash = "sha256:780064c800fb8c079c9828df472203146442ed3dd0b522a28a501204eb00c066", size = 73850, upload-time = "2025-05-20T16:03:03.831Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/44/b7/a24bc58f0e27f0cd847bf14ffbe9722604f5abe3ec9c12dd8f89cb965be8/pynetbox-7.5.0-py3-none-any.whl", hash = "sha256:ab755a0020c0abb09b4d24c8f8ba89df26f04fa56c35de73302e29a39352f031", size = 35808, upload-time = "2025-05-20T16:03:02.445Z" },
+]
+
+[[package]]
+name = "requests"
+version = "2.32.3"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "certifi" },
+ { name = "charset-normalizer" },
+ { name = "idna" },
+ { name = "urllib3" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", size = 131218, upload-time = "2024-05-29T15:37:49.536Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", size = 64928, upload-time = "2024-05-29T15:37:47.027Z" },
+]
+
+[[package]]
+name = "unifi-controller-api"
+version = "0.3.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "requests" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/a6/62/0e12da83245655872fed6fdfea66fa05b36b76dd31994a8dc17fafe164c8/unifi_controller_api-0.3.0.tar.gz", hash = "sha256:a5ebaf0e739b825921ed3b94c80b0113cad6e295539397653571ad2286c81287", size = 54194, upload-time = "2025-04-14T18:57:24.028Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/33/32/38c5483b2a8dc57d3d76c3dcffbe3a47b1dfc671753ee2b62bfb529683a6/unifi_controller_api-0.3.0-py3-none-any.whl", hash = "sha256:b312aab9b460ee5d5189d704b7855d03452bfe0649cc569d8ce20c4417c75d71", size = 59134, upload-time = "2025-04-14T18:57:22.674Z" },
+]
+
+[[package]]
+name = "urllib3"
+version = "2.4.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz", hash = "sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466", size = 390672, upload-time = "2025-04-10T15:23:39.232Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/6b/11/cc635220681e93a0183390e26485430ca2c7b5f9d33b15c74c2861cb8091/urllib3-2.4.0-py3-none-any.whl", hash = "sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813", size = 128680, upload-time = "2025-04-10T15:23:37.377Z" },
+]