Facts, ports, management address, LLDP (per-port and top-level shapes), MAC table and PoE from a UniFi device record, which a controller's stat/device and the device's own mca-dump share. Fixtures from aiounifi (MIT) and abates/napalm-unifi (Apache-2.0), anonymised with tools/sanitize.py. Refs NetOrk/netork#2787
74 lines
2.0 KiB
TOML
74 lines
2.0 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=77"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "napalm-ubiquiti"
|
|
version = "0.1.0"
|
|
description = "NAPALM drivers for Ubiquiti UniFi: switches and access points (through the controller or over SSH) and the UniFi Network controller"
|
|
readme = "README.md"
|
|
license = "Apache-2.0"
|
|
requires-python = ">=3.12"
|
|
authors = [{ name = "Christian Manivong", email = "christian@manivong.de" }]
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3",
|
|
"Operating System :: OS Independent",
|
|
"Topic :: System :: Networking",
|
|
]
|
|
dependencies = [
|
|
"napalm>=5.1", # older releases import pkg_resources, which a 3.12 venv lacks
|
|
"napalm-device-types>=4.60", # NetworkControllerDriver, VlanDetailDict
|
|
"paramiko>=5.0.0", # CVE-2026-44405
|
|
"requests>=2.31.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=8", "pytest-cov>=5", "mypy>=1.11", "ruff>=0.6", "types-requests", "types-paramiko"]
|
|
|
|
[project.urls]
|
|
Repository = "https://git.netork.io/NAPALM/napalm-ubiquiti"
|
|
Issues = "https://git.netork.io/NAPALM/napalm-ubiquiti/issues"
|
|
|
|
[project.entry-points."napalm.drivers"]
|
|
unifi_switch = "napalm_ubiquiti:UnifiSwitchDriver"
|
|
unifi_ap = "napalm_ubiquiti:UnifiAccessPointDriver"
|
|
unifi_network = "napalm_ubiquiti:UnifiNetworkDriver"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["napalm_ubiquiti*"]
|
|
|
|
[tool.setuptools.package-data]
|
|
napalm_ubiquiti = ["py.typed"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py312"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "UP", "B"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Recorded device output keeps its lines.
|
|
"tests/**" = ["E501"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
strict = true
|
|
# napalm itself is untyped, so every driver subclasses Any.
|
|
disallow_subclassing_any = false
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["napalm.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
pythonpath = ["."]
|
|
|
|
[tool.coverage.run]
|
|
source = ["napalm_ubiquiti"]
|
|
|
|
[tool.coverage.report]
|
|
fail_under = 90
|
|
exclude_also = ["pragma: no cover - live I/O"]
|