Compare commits
1
Commits
a97c460cc3
...
472518576e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
472518576e |
No files matched your search
@@ -78,16 +78,14 @@ 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.
|
||||
#: The fix templates LinuxDriver carries, and the package proxy it reports,
|
||||
#: 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]
|
||||
get_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 = [
|
||||
FingerprintRule("qnap", weight=9.0),
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "napalm-qnap-qts"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
description = "NAPALM driver for QNAP NAS systems running QTS via SSH"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
@@ -44,7 +44,7 @@ classifiers = [
|
||||
dependencies = [
|
||||
"napalm>=4.0",
|
||||
"napalm-device-types>=2.6.0",
|
||||
"napalm-linux>=0.8.0",
|
||||
"napalm-linux>=0.9.0",
|
||||
"netmiko>=4.0.0",
|
||||
"paramiko>=5.0.0", # CVE-2026-44405
|
||||
]
|
||||
|
||||
@@ -232,14 +232,15 @@ class TestFixesQtsCannotTake:
|
||||
capability check -- is it callable? -- answers no."""
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"name", ["configure_snmp_agent", "configure_package_proxy", "ensure_package"]
|
||||
"name",
|
||||
["configure_snmp_agent", "configure_package_proxy", "get_package_proxy", "ensure_package"],
|
||||
)
|
||||
def test_switched_off(self, name):
|
||||
assert getattr(QnapQtsDriver, name) is None
|
||||
|
||||
|
||||
def test_device_warnings_do_not_ask_for_updates_qts_cannot_list():
|
||||
"""The inherited get_device_warnings called get_available_updates, which is
|
||||
None here, and logged a TypeError on every poll (#6)."""
|
||||
driver = QnapQtsDriver("nas", "admin", "pw")
|
||||
assert driver.get_device_warnings() == []
|
||||
def test_no_warnings_of_its_own():
|
||||
"""napalm-linux names no warnings any more (netOrk #1111), so neither does
|
||||
this driver; the override that kept the inherited one from asking for updates
|
||||
QTS cannot list (#6) is gone with it."""
|
||||
assert not callable(getattr(QnapQtsDriver, "get_device_warnings", None))
|
||||
Reference in new issue
Block a user