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.
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
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
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.
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.
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).
netOrk runs every driver in its own containers on Python 3.12, so 3.10
and 3.11 are no longer supported or tested. requires-python, mypy and
ruff move to 3.12, along with what ruff's pyupgrade rules then rewrite.
- 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.
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.
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.
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.
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.
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
The same job as napalm-fritzbox and napalm-opnsense: Python 3.10, 3.11 and
3.12, pytest, then wheel and sdist. napalm-device-types comes from
git.netork.io first, because PyPI has an unrelated package of that name.
napalm-linux, which this driver builds on, is installed from git as well:
it is not on PyPI either.
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.
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.
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.
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.