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.
This commit is contained in:
Christian Manivong committed 2026-10-17 01:17:37 +02:00
1 parent 088d47f47c
commit 95ec6ad33b
4 files changed
+44 -4

No files matched your search

+9
View File
@@ -78,6 +78,15 @@ class QnapQtsDriver(StorageDriver, HypervisorDriver, LinuxDriver):
get_available_updates = None # type: ignore[assignment]
refresh_available_updates = None # type: ignore[assignment]
apply_updates = None # type: ignore[assignment]
#: The fix templates LinuxDriver carries need a package manager or net-snmp
#: from packages; QTS has neither, and its SNMP agent is set in its own UI.
configure_snmp_agent = None # type: ignore[assignment]
configure_package_proxy = None # type: ignore[assignment]
ensure_package = None # type: ignore[assignment]
def get_device_warnings(self) -> list:
"""Nothing to report: the inherited one asks for updates QTS cannot list."""
return []
SNMP_OBJECT_ID_PREFIX = QNAP_ENTERPRISE_OID
SNMP_FINGERPRINT = [