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.
This commit is contained in:
Christian Manivong committed 2026-10-31 23:24:27 +01:00
1 parent 2234875423
commit 737ceb7cde
3 files changed
+20

No files matched your search

+10
View File
@@ -235,6 +235,16 @@ def test_hostname_is_not_set_here():
assert not callable(getattr(QnapQtsDriver, "set_hostname", None))
def test_personal_accounts_are_not_managed_here():
"""QTS manages its users in its own UI and ships no shadow-utils for the
``useradd``/``usermod`` inherited from LinuxDriver (NetOrk/netork#1793)."""
from napalm_linux.linux import LinuxDriver
for action in ("get_local_accounts", "add_local_account", "lock_local_account"):
assert callable(getattr(LinuxDriver, action, None))
assert not callable(getattr(QnapQtsDriver, action, None))
class TestFixesQtsCannotTake:
"""QTS has no apt, dnf or opkg, and its SNMP agent is configured in its own UI:
the fix templates inherited from LinuxDriver are switched off (#7), so a