Files
napalm-fritzbox/pyproject.toml
T
Christian Manivong fe0e0b3e7d
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 12s
driver / test (3.12) (pull_request) Successful in 53s
driver / types (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 52s
driver / lowest (pull_request) Successful in 26s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 1m0s
CI / driver (pull_request) Successful in 2m26s
driver / publish (pull_request) Skipped
feat(time-sync): the box's NTP servers through TimeSyncMixin
netOrk keeps one list of NTP servers per site and aligns a device that
differs (NetOrk/netork#2360). The Fritz!Box takes part through TR-064's
Time:1 service: GetInfo reads NewNTPServer1/2, SetNTPServers writes
them.

AVM documents Time:1's zone fields as not supported, and the box keeps
its zone as a POSIX rule or nothing, so the zone is read as None unless
the box names an IANA zone, and time_sync_writes is {"ntp_servers"}.
The box has two server slots: a longer list is refused before anything
is written, and a list the box already has is not written again, so a
poll that aligns the box every time does not churn.

TR-064 says neither whether the clock is synchronised nor whether the
box serves time to its LAN (NetOrk/netork#2371); both stay unreported.

Needs napalm-device-types 4.35.0.

Refs NetOrk/netork#2367
2026-11-11 15:15:52 +01:00

82 lines
2.0 KiB
TOML

[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "napalm-fritzbox"
version = "0.3.0"
description = "NAPALM driver for AVM FritzBox (TR-064 via fritzconnection)."
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",
"Programming Language :: Python :: 3.13",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Typing :: Typed",
]
dependencies = [
"napalm>=5.1", # older releases import pkg_resources, which a 3.12 venv lacks
"napalm-device-types>=4.35.0",
"fritzconnection>=1.13.0",
]
[project.optional-dependencies]
dev = ["pytest>=8", "pytest-cov>=5", "mypy>=1.11", "ruff>=0.6"]
[project.entry-points."napalm.drivers"]
fritzbox = "napalm_fritzbox.fritzbox:FritzBoxDriver"
[project.urls]
Repository = "https://git.netork.io/NAPALM/napalm-fritzbox"
Issues = "https://git.netork.io/NAPALM/napalm-fritzbox/issues"
Changelog = "https://git.netork.io/NAPALM/napalm-fritzbox/src/branch/main/CHANGELOG.md"
[tool.setuptools.packages.find]
where = ["."]
include = ["napalm_fritzbox*"]
[tool.setuptools.package-data]
napalm_fritzbox = ["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.*", "fritzconnection.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# Not yet under strict mypy (quality baseline); may only shrink.
module = ["napalm_fritzbox.fritzbox"]
ignore_errors = true
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.coverage.run]
source = ["napalm_fritzbox"]
[tool.coverage.report]
fail_under = 81