Commit Graph
16 Commits
Author SHA1 Message Date
Christian Manivong f1d191c52a fix(time-sync): switch off the POSIX time sync on QTS
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m9s
driver / test (3.12) (pull_request) Successful in 1m6s
driver / test (3.13) (pull_request) Successful in 1m1s
driver / lowest (pull_request) Successful in 34s
driver / build (pull_request) Successful in 28s
driver / security (pull_request) Successful in 1m12s
CI / driver (pull_request) Successful in 2m51s
driver / publish (pull_request) Skipped
napalm-linux now brings napalm-device-types' PosixTimeSyncMixin (4.35.0). QTS has no systemd and no timedatectl, and its NTP client and time zone are QTS settings: the inherited reading finds no client there and every write fails its step, a difference netOrk could report on every poll but never fix (NetOrk/netork#2370). get_time_sync and configure_time_sync are None, so a capability check answers no, until a QTS variant is built against a real box. The floor rises to napalm-device-types 4.35.0.
2026-11-11 15:18:56 +01:00
Christian Manivong f3f263cf61 fix(accounts): switch off remove_local_account_keys on QTS
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 19s
driver / types (pull_request) Successful in 1m16s
driver / test (3.12) (pull_request) Successful in 1m14s
driver / test (3.13) (pull_request) Successful in 1m5s
driver / lowest (pull_request) Successful in 41s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m11s
CI / driver (pull_request) Successful in 3m2s
driver / publish (pull_request) Skipped
napalm-linux 0.17.0 brings napalm-device-types' new
remove_local_account_keys to every LinuxDriver. QTS has the other
personal-account actions switched off, as it manages its users in its
own UI; without this one a capability check would say QTS can take keys
off an account.

See NetOrk/netork#2013
2026-11-04 11:49:38 +01:00
Christian Manivong 2a4403101a feat(scheduled-jobs): scheduled jobs on QTS's crontab (#17)
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
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
Christian Manivong c999822d59 fix: no account of netOrk's own on QTS either (NetOrk/netork#1817)
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 1m1s
driver / test (3.12) (pull_request) Successful in 1m1s
driver / lowest (pull_request) Successful in 31s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m9s
CI / driver (pull_request) Successful in 2m36s
driver / publish (pull_request) Skipped
QTS manages its users in its own UI and ships no shadow-utils, so
add_service_account, inherited from LinuxDriver, is switched off like the
personal accounts.
2026-11-01 12:03:02 +01:00
Christian Manivong 737ceb7cde fix: switch off the inherited personal accounts (NetOrk/netork#1793)
driver / standard (pull_request) Successful in 19s
driver / lint (pull_request) Successful in 20s
driver / types (pull_request) Failing after 1m23s
driver / test (3.12) (pull_request) Failing after 1m25s
driver / test (3.13) (pull_request) Failing after 1m0s
driver / security (pull_request) Failing after 5s
driver / lowest (pull_request) Failing after 30s
driver / build (pull_request) Successful in 30s
CI / driver (pull_request) Failing after 2m31s
driver / publish (pull_request) Skipped
napalm-linux now adds and locks accounts with useradd/usermod. QTS
manages its users in its own UI and ships no shadow-utils, so
get_local_accounts, add_local_account and lock_local_account are None
until a QTS variant can be built against a real box.
2026-10-31 23:24:27 +01:00
Christian Manivong 00c8391cab fix: switch off the inherited set_hostname (#13)
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m8s
driver / test (3.12) (pull_request) Successful in 1m7s
driver / test (3.13) (pull_request) Successful in 59s
driver / lowest (pull_request) Successful in 28s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m6s
CI / driver (pull_request) Successful in 2m44s
driver / publish (pull_request) Skipped
napalm-linux now renames a host through hostnamectl and /etc/hostname
(NAPALM/napalm-linux#45). On QTS that would report success and be gone
after the next boot: the name lives in uLinux.conf, /etc in RAM. Off like
the other inherited actions QTS cannot take, so netOrk says the name is
kept in netOrk only; a QTS rename follows once it can be built against a
real box (#13).
2026-10-29 23:11:05 +01:00
Christian Manivong dd785da94f chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 54s
driver / test (3.10) (pull_request) Successful in 59s
driver / test (3.11) (pull_request) Successful in 55s
driver / test (3.12) (pull_request) Successful in 57s
driver / lowest (pull_request) Successful in 30s
driver / test (3.13) (pull_request) Successful in 49s
driver / build (pull_request) Successful in 25s
driver / security (pull_request) Successful in 57s
CI / driver (pull_request) Successful in 3m6s
driver / publish (pull_request) Skipped
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard; napalm-device-types and napalm-linux come from
  git until napalm-linux 0.15.0 is on PyPI.
- requires-python >=3.10 (napalm-device-types needs it), SPDX license
  string, setuptools>=77, LICENSE file, py.typed, Issues and Changelog
  links.
- Dependencies: napalm-device-types>=4.22.0, napalm-linux>=0.15.0; the
  floors napalm>=4.0, netmiko>=4.0.0 and paramiko>=5.0.0 stay and pass
  the tests at exactly those versions. The dev extra gets floors and
  drops black (ruff formats).
- mypy strict for the whole package, no exempt module. install_package
  and uninstall_package keep napalm-device-types' PackagesMixin
  signatures, which LinuxDriver's differ from: type: ignore[override]
  on those two lines, with the reason above them.
- Coverage floor 76 % (measured 76.19 %); the quality baseline is empty
  apart from it.
2026-10-23 12:09:52 +02:00
Christian Manivong 991cae7e8d style: ruff format and the lint rules of the driver standard
Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM
driver uses (E, F, I, UP, B at line length 100, Python 3.10). What ruff
cannot fix comes in the next commit.
2026-10-23 12:08:18 +02:00
Christian Manivong 472518576e feat: name no warnings and report no package proxy (0.5.0)
CI / test (3.10) (push) Successful in 28s
CI / test (3.11) (push) Successful in 26s
CI / test (3.12) (push) Successful in 27s
CI / test (3.10) (pull_request) Successful in 27s
CI / test (3.11) (pull_request) Successful in 26s
CI / test (3.12) (pull_request) Successful in 27s
napalm-linux 0.9.0 names no warnings (netOrk #1111), so the override that
kept the inherited get_device_warnings from asking for updates goes. The
package proxy it now reports is switched off with the template that sets
it: QTS has no apt. Requires napalm-linux 0.9.0.
2026-10-17 10:35:10 +02:00
Christian Manivong 95ec6ad33b feat: switch off the fix templates QTS cannot take (0.4.0)
CI / test (3.10) (push) Successful in 38s
CI / test (3.11) (push) Successful in 35s
CI / test (3.12) (push) Successful in 35s
CI / test (3.10) (pull_request) Successful in 31s
CI / test (3.11) (pull_request) Successful in 30s
CI / test (3.12) (pull_request) Successful in 32s
napalm-linux 0.8 implements napalm-device-types' fix templates. QTS has
no apt, dnf or opkg and sets its SNMP agent in its own UI, so
configure_snmp_agent, configure_package_proxy and ensure_package are
None here: a capability check answers no instead of offering a fix
that fails, as the inherited fix_snmp and fix_apt_proxy did.

get_device_warnings returns nothing: the inherited one asked for
updates, which is None here, and logged a TypeError on every poll.

The role test follows napalm-linux's get_os_users.

Closes #6. Part of #7.
2026-10-17 01:17:37 +02:00
Christian Manivong 912469bdc0 refactor!: drop the _docker_bin override
CI / test (3.10) (pull_request) Successful in 29s
CI / test (3.11) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 29s
CI / test (3.10) (push) Successful in 28s
CI / test (3.11) (push) Successful in 26s
CI / test (3.12) (push) Successful in 28s
napalm-linux 0.3.0 drops the Docker CLI methods the override served.
_container_engine_binary("docker") returns Container Station's path
itself, which is all netOrk needs: it reaches the engine through
open_container_engine (NetOrk/netork#765, phase 9).

Requires napalm-linux >= 0.3.0. Version 0.3.0.
2026-10-08 08:43:57 +02:00
Christian Manivong 5838685690 feat: hand the container engine connection Container Station's docker
CI / test (3.11) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 30s
CI / test (3.10) (push) Successful in 29s
CI / test (3.11) (push) Successful in 27s
CI / test (3.12) (push) Successful in 28s
CI / test (3.10) (pull_request) Successful in 29s
napalm-device-types 2.6.0 opens a host's container engine through
`open_container_engine()`, and asks the driver for the binary through
`_container_engine_binary()`. Under QTS docker is not on PATH; the hook
now returns the path `open()` already discovers, so the Engine API stream
(`<path> system dial-stdio`) and the CLI reach Container Station while
callers only pass arguments (NetOrk/netork#765).

Version 0.2.0, requires napalm-device-types >= 2.6.0 and
napalm-linux >= 0.2.0.

Refs NAPALM/napalm-device-types#17
2026-10-07 17:59:55 +02:00
Christian Manivong 5e371db3af fix: do not claim update reading or applying QTS cannot do
QTS has no apt, dnf or opkg, so the update readers inherited from
LinuxDriver find no package manager, and QPKG updates are not implemented.
get_available_updates, refresh_available_updates and apply_updates are None,
the same opt-out as manage_service: netOrk's patch groups and compliance
report include a driver only when these are callable.
2026-10-06 00:20:12 +02:00
Christian Manivong 77313ca436 fix: do not claim service control QTS cannot do
QnapQtsDriver inherits LinuxDriver, which now has manage_service() through
napalm-device-types' SystemdServicesMixin. QTS has no systemd, so every
action would fail. manage_service = None makes every capability check --
is manage_service callable -- answer no, so netOrk offers no controls that
cannot work.
2026-10-05 13:12:16 +02:00
Christian Manivong 927e39bf36 feat: declare all three roles, and refuse QPKG writes deliberately
A QNAP is a NAS, a hypervisor and a Linux host. It can now say so, because role
bases in napalm-device-types v1.0 declare their methods without implementing
them:

    class QnapQtsDriver(StorageDriver, HypervisorDriver, LinuxDriver):

device_class comes from the first base, so DEVICE_CLASS is gone. The get_services
forwarder is gone with it — nothing shadows LinuxDriver's version any more — and
so is the TestMroForwarding class that guarded the collisions.

Removing the shadowing exposed something the shadowing had been hiding by
accident. This driver never implemented package management; StorageDriver's stub
for install_package covered LinuxDriver's working one, so calling it raised and
looked correct. It was a coincidence, not a decision: without the stub the call
falls through to LinuxDriver, which would run apt or dnf against a NAS that has
neither. QTS uses QPKG.

get_packages, install_package and uninstall_package are therefore overridden
here to refuse with a reason, until the device harvest supplies real QPKG
parsing. See netork#114.
2026-08-21 12:50:27 +07:00
christianmanivong 26d723f417 feat: initial QNAP QTS driver scaffold
QTS is a Linux distribution, so the driver inherits the OS surface from
LinuxDriver and adds QNAP's storage, QPKG and virtualisation layers.

What is here: the class with its discovery fingerprints, per-session
detection of the QTS major version and of the QPKG-local docker and virsh
binaries, and explicit resolution of the MRO collisions that StorageDriver
creates over LinuxDriver.

What is not: the storage, QPKG and VM parsers. Those need real command
output from QTS 4 and QTS 5 hardware to be written against, which is what
tools/harvest.sh collects and tools/sanitize.py anonymises. Two tests are
marked xfail(strict) as the specification for that work.
2026-08-21 09:53:13 +07:00