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]
|
get_available_updates = None # type: ignore[assignment]
|
||||||
refresh_available_updates = None # type: ignore[assignment]
|
refresh_available_updates = None # type: ignore[assignment]
|
||||||
apply_updates = None # type: ignore[assignment]
|
apply_updates = None # type: ignore[assignment]
|
||||||
#: The fix templates LinuxDriver carries need a package manager or net-snmp
|
#: The fix templates LinuxDriver carries, and the package proxy it reports,
|
||||||
#: from packages; QTS has neither, and its SNMP agent is set in its own UI.
|
#: 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_snmp_agent = None # type: ignore[assignment]
|
||||||
configure_package_proxy = None # type: ignore[assignment]
|
configure_package_proxy = None # type: ignore[assignment]
|
||||||
|
get_package_proxy = None # type: ignore[assignment]
|
||||||
ensure_package = 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_OBJECT_ID_PREFIX = QNAP_ENTERPRISE_OID
|
||||||
SNMP_FINGERPRINT = [
|
SNMP_FINGERPRINT = [
|
||||||
FingerprintRule("qnap", weight=9.0),
|
FingerprintRule("qnap", weight=9.0),
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "napalm-qnap-qts"
|
name = "napalm-qnap-qts"
|
||||||
version = "0.4.0"
|
version = "0.5.0"
|
||||||
description = "NAPALM driver for QNAP NAS systems running QTS via SSH"
|
description = "NAPALM driver for QNAP NAS systems running QTS via SSH"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.9"
|
requires-python = ">=3.9"
|
||||||
@@ -44,7 +44,7 @@ classifiers = [
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"napalm>=4.0",
|
"napalm>=4.0",
|
||||||
"napalm-device-types>=2.6.0",
|
"napalm-device-types>=2.6.0",
|
||||||
"napalm-linux>=0.8.0",
|
"napalm-linux>=0.9.0",
|
||||||
"netmiko>=4.0.0",
|
"netmiko>=4.0.0",
|
||||||
"paramiko>=5.0.0", # CVE-2026-44405
|
"paramiko>=5.0.0", # CVE-2026-44405
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -232,14 +232,15 @@ class TestFixesQtsCannotTake:
|
|||||||
capability check -- is it callable? -- answers no."""
|
capability check -- is it callable? -- answers no."""
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@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):
|
def test_switched_off(self, name):
|
||||||
assert getattr(QnapQtsDriver, name) is None
|
assert getattr(QnapQtsDriver, name) is None
|
||||||
|
|
||||||
|
|
||||||
def test_device_warnings_do_not_ask_for_updates_qts_cannot_list():
|
def test_no_warnings_of_its_own():
|
||||||
"""The inherited get_device_warnings called get_available_updates, which is
|
"""napalm-linux names no warnings any more (netOrk #1111), so neither does
|
||||||
None here, and logged a TypeError on every poll (#6)."""
|
this driver; the override that kept the inherited one from asking for updates
|
||||||
driver = QnapQtsDriver("nas", "admin", "pw")
|
QTS cannot list (#6) is gone with it."""
|
||||||
assert driver.get_device_warnings() == []
|
assert not callable(getattr(QnapQtsDriver, "get_device_warnings", None))
|
||||||
Reference in new issue
Block a user