driver / lint (pull_request) Successful in 15s
driver / standard (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m2s
driver / test (3.13) (pull_request) Successful in 1m3s
driver / test (3.12) (pull_request) Successful in 1m6s
driver / lowest (pull_request) Successful in 33s
driver / build (pull_request) Successful in 42s
driver / security (pull_request) Successful in 1m17s
CI / driver (pull_request) Successful in 2m36s
driver / publish (pull_request) Skipped
DHCP option 42 counts (NetOrk/netork#2380): a router that gets the site's time giver from its lease is aligned. The first time sync commit set use_dhcp=0 on every write, which cut a router off from the giver its DHCP server hands out. A write now leaves use_dhcp as the router has it, and the "already has these servers" check no longer rewrites a router only because use_dhcp is on. get_time_sync() reads what sysntpd adds to ntpd's list while use_dhcp is on -- each interface's data.ntpserver in ubus call network.interface dump, which /lib/netifd/dhcp.script fills from udhcpc's ntpsrv, only the dhcp_interface list's where it names any -- in the same round trip as uci, into dhcp_ntp_servers: [] while use_dhcp or the client is off, None where netifd gives no answer. Needs napalm-device-types 4.36.0 (TimeSyncDict.dhcp_ntp_servers).
91 lines
2.4 KiB
TOML
91 lines
2.4 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=77"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "napalm-openwrt"
|
|
version = "0.7.0"
|
|
description = "NAPALM driver for OpenWrt routers/access-points"
|
|
readme = "README.md"
|
|
license = "Apache-2.0"
|
|
requires-python = ">=3.12"
|
|
authors = [
|
|
{ name = "Christian Manivong" },
|
|
]
|
|
classifiers = [
|
|
"Topic :: Utilities",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Operating System :: POSIX :: Linux",
|
|
"Operating System :: MacOS",
|
|
]
|
|
dependencies = [
|
|
"napalm>=5.1", # older releases import pkg_resources, which a 3.12 venv lacks
|
|
"napalm_device_types>=4.36.0", # TimeSyncMixin with dhcp_ntp_servers, posix_tz
|
|
"netmiko>=4.0.0",
|
|
"paramiko>=5.0.0", # CVE-2026-44405
|
|
"netaddr>=0.7.19", # IPAddress; below it the package has none (CI lowest job)
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=8", "pytest-cov>=5", "mypy>=1.11", "ruff>=0.6"]
|
|
|
|
[project.entry-points."napalm.drivers"]
|
|
openwrt = "napalm_openwrt:OpenWrtDriver"
|
|
|
|
[project.urls]
|
|
Repository = "https://git.netork.io/NAPALM/napalm-openwrt"
|
|
Issues = "https://git.netork.io/NAPALM/napalm-openwrt/issues"
|
|
Changelog = "https://git.netork.io/NAPALM/napalm-openwrt/src/branch/main/CHANGELOG.md"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["napalm_openwrt*"]
|
|
|
|
[tool.setuptools.package-data]
|
|
napalm_openwrt = ["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.*", "netmiko.*", "paramiko.*", "netaddr.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
# Not yet under strict mypy (quality baseline); may only shrink.
|
|
module = [
|
|
"napalm_openwrt.config_mixin",
|
|
"napalm_openwrt.interfaces_mixin",
|
|
"napalm_openwrt.openwrt",
|
|
"napalm_openwrt.packages_mixin",
|
|
"napalm_openwrt.routing_mixin",
|
|
"napalm_openwrt.system_mixin",
|
|
"napalm_openwrt.vlan_mixin",
|
|
"napalm_openwrt.wireless_mixin",
|
|
]
|
|
ignore_errors = true
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
|
|
[tool.coverage.run]
|
|
source = ["napalm_openwrt"]
|
|
|
|
[tool.coverage.report]
|
|
fail_under = 65
|