fix: no account of netOrk's own on QTS either (NetOrk/netork#1817) #16
No files matched your search
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
`lock_local_account` = `None`). napalm-linux now adds and locks accounts with
|
`lock_local_account` = `None`). napalm-linux now adds and locks accounts with
|
||||||
`useradd`/`usermod` (NetOrk/netork#1793); QTS manages its users in its own UI and
|
`useradd`/`usermod` (NetOrk/netork#1793); QTS manages its users in its own UI and
|
||||||
ships no shadow-utils. A QTS variant follows once it can be built against a real box.
|
ships no shadow-utils. A QTS variant follows once it can be built against a real box.
|
||||||
|
- netOrk's own account (`add_service_account`, NetOrk/netork#1817) is switched off for the
|
||||||
|
same reason.
|
||||||
- `set_hostname` is switched off (`= None`). napalm-linux now renames a host through
|
- `set_hostname` is switched off (`= None`). napalm-linux now renames a host through
|
||||||
`hostnamectl` and `/etc/hostname` (NAPALM/napalm-linux#45), which QTS would report as
|
`hostnamectl` and `/etc/hostname` (NAPALM/napalm-linux#45), which QTS would report as
|
||||||
done and lose on the next boot: its name lives in `uLinux.conf`, `/etc` in RAM. netOrk
|
done and lose on the next boot: its name lives in `uLinux.conf`, `/etc` in RAM. netOrk
|
||||||
|
|||||||
@@ -90,10 +90,12 @@ class QnapQtsDriver(StorageDriver, HypervisorDriver, LinuxDriver):
|
|||||||
set_hostname = None # type: ignore[assignment]
|
set_hostname = None # type: ignore[assignment]
|
||||||
#: QTS manages its users in its own UI and ships no shadow-utils (useradd,
|
#: QTS manages its users in its own UI and ships no shadow-utils (useradd,
|
||||||
#: usermod, gpasswd) for LinuxDriver's accounts. Off until a QTS variant is
|
#: usermod, gpasswd) for LinuxDriver's accounts. Off until a QTS variant is
|
||||||
#: built against a real box (NetOrk/netork#1793).
|
#: built against a real box (NetOrk/netork#1793), netOrk's own account
|
||||||
|
#: included (NetOrk/netork#1817).
|
||||||
get_local_accounts = None # type: ignore[assignment]
|
get_local_accounts = None # type: ignore[assignment]
|
||||||
add_local_account = None # type: ignore[assignment]
|
add_local_account = None # type: ignore[assignment]
|
||||||
lock_local_account = None # type: ignore[assignment]
|
lock_local_account = None # type: ignore[assignment]
|
||||||
|
add_service_account = None # type: ignore[assignment]
|
||||||
|
|
||||||
SNMP_OBJECT_ID_PREFIX = QNAP_ENTERPRISE_OID
|
SNMP_OBJECT_ID_PREFIX = QNAP_ENTERPRISE_OID
|
||||||
SNMP_FINGERPRINT = [
|
SNMP_FINGERPRINT = [
|
||||||
|
|||||||
@@ -237,10 +237,12 @@ def test_hostname_is_not_set_here():
|
|||||||
|
|
||||||
def test_personal_accounts_are_not_managed_here():
|
def test_personal_accounts_are_not_managed_here():
|
||||||
"""QTS manages its users in its own UI and ships no shadow-utils for the
|
"""QTS manages its users in its own UI and ships no shadow-utils for the
|
||||||
``useradd``/``usermod`` inherited from LinuxDriver (NetOrk/netork#1793)."""
|
``useradd``/``usermod`` inherited from LinuxDriver (NetOrk/netork#1793), and
|
||||||
|
so no account of netOrk's own either (NetOrk/netork#1817)."""
|
||||||
from napalm_linux.linux import LinuxDriver
|
from napalm_linux.linux import LinuxDriver
|
||||||
|
|
||||||
for action in ("get_local_accounts", "add_local_account", "lock_local_account"):
|
actions = ("get_local_accounts", "add_local_account", "lock_local_account")
|
||||||
|
for action in (*actions, "add_service_account"):
|
||||||
assert callable(getattr(LinuxDriver, action, None))
|
assert callable(getattr(LinuxDriver, action, None))
|
||||||
assert not callable(getattr(QnapQtsDriver, action, None))
|
assert not callable(getattr(QnapQtsDriver, action, None))
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user