Files
napalm-qnap-qts/pyproject.toml
T
Christian Manivong 2a4403101a
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Failing after 56s
driver / test (3.12) (pull_request) Failing after 46s
driver / lowest (pull_request) Failing after 20s
driver / test (3.13) (pull_request) Failing after 47s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Failing after 1m4s
CI / driver (pull_request) Failing after 2m18s
driver / publish (pull_request) Skipped
feat(scheduled-jobs): scheduled jobs on QTS's crontab (#17)
napalm-linux now brings napalm-device-types' POSIX scheduled jobs, with
Debian's paths. On QTS they are wrong: the crontab that survives a boot
is /etc/config/crontab (admin's, no user field), crond runs a copy of
it, and a change made only through crontab is gone after the next boot.
BusyBox crond reads no /etc/crontab, cron.d, run-parts or anacron, and
there is no systemd.

QtsScheduledJobsMixin reads /etc/config/crontab as admin's and the other
users' crontabs from crond's spool in one round trip, and writes the
file first, then loads it and restarts crond. The firmware's own lines
are platform by a conservative command list and only run, until a real
box shows whether QTS leaves one switched off alone. An application's
job is marked lines in admin's crontab; a run is bounded without
timeout, which QTS's BusyBox cannot be relied on to have.

Requires napalm-device-types 4.26.0 and napalm-linux 0.16.0.

Closes #17
2026-11-03 05:47:32 +01:00

96 lines
2.4 KiB
TOML

[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "napalm-qnap-qts"
version = "0.6.0"
description = "NAPALM driver for QNAP NAS systems running QTS via SSH"
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
authors = [
{ name = "Christian Manivong", email = "christian@manivong.de" },
]
keywords = [
"napalm",
"network",
"automation",
"qnap",
"qts",
"nas",
"storage",
"ssh",
"driver",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: System :: Networking",
"Topic :: System :: Systems Administration",
"Typing :: Typed",
]
# napalm-linux is a hard dependency, not an optional one: QTS is a Linux system
# and this driver inherits the whole OS surface (packages, services, users,
# processes, Docker) from LinuxDriver rather than reimplementing it.
dependencies = [
"napalm>=4.0",
"napalm-device-types>=4.26.0",
"napalm-linux>=0.16.0",
"netmiko>=4.0.0",
"paramiko>=5.0.0", # CVE-2026-44405
]
[project.optional-dependencies]
dev = ["pytest>=8", "pytest-cov>=5", "mypy>=1.11", "ruff>=0.6"]
[project.entry-points."napalm.drivers"]
qnap_qts = "napalm_qnap_qts:QnapQtsDriver"
[project.urls]
Repository = "https://git.netork.io/NAPALM/napalm-qnap-qts"
Issues = "https://git.netork.io/NAPALM/napalm-qnap-qts/issues"
Changelog = "https://git.netork.io/NAPALM/napalm-qnap-qts/src/branch/main/CHANGELOG.md"
[tool.setuptools.packages.find]
where = ["."]
include = ["napalm_qnap_qts*"]
[tool.setuptools.package-data]
napalm_qnap_qts = ["py.typed"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[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.*"]
ignore_missing_imports = true
[tool.coverage.run]
source = ["napalm_qnap_qts"]
[tool.coverage.report]
fail_under = 76