Merge pull request 'fix: switch off the inherited set_hostname (#13)' (#14) from fix/opt-out-set-hostname into main
driver / lint (push) Successful in 17s
driver / standard (push) Successful in 18s
driver / test (3.12) (push) Successful in 1m10s
driver / types (push) Successful in 1m13s
driver / lowest (push) Failing after 8s
driver / build (push) Successful in 38s
driver / test (3.13) (push) Successful in 1m21s
driver / security (push) Successful in 1m25s
CI / driver (push) Failing after 2m56s
driver / publish (push) Skipped
driver / lint (push) Successful in 17s
driver / standard (push) Successful in 18s
driver / test (3.12) (push) Successful in 1m10s
driver / types (push) Successful in 1m13s
driver / lowest (push) Failing after 8s
driver / build (push) Successful in 38s
driver / test (3.13) (push) Successful in 1m21s
driver / security (push) Successful in 1m25s
CI / driver (push) Failing after 2m56s
driver / publish (push) Skipped
This commit was merged in pull request #14.
This commit is contained in:
commit
2234875423
3 files changed
+19
No files matched your search
@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- `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
|
||||||
|
done and lose on the next boot: its name lives in `uLinux.conf`, `/etc` in RAM. netOrk
|
||||||
|
then says the name is kept in netOrk only. A QTS rename follows once it can be built
|
||||||
|
against a real box (#13).
|
||||||
- Python 3.12 is the floor (`requires-python = ">=3.12"`): netOrk runs every driver
|
- Python 3.12 is the floor (`requires-python = ">=3.12"`): netOrk runs every driver
|
||||||
on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6).
|
on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6).
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,9 @@ class QnapQtsDriver(StorageDriver, HypervisorDriver, LinuxDriver):
|
|||||||
configure_package_proxy = None # type: ignore[assignment]
|
configure_package_proxy = None # type: ignore[assignment]
|
||||||
get_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]
|
||||||
|
#: QTS keeps its name in uLinux.conf and /etc in RAM: LinuxDriver's rename
|
||||||
|
#: would report success and be gone after a boot. Off until #13.
|
||||||
|
set_hostname = None # type: ignore[assignment]
|
||||||
|
|
||||||
SNMP_OBJECT_ID_PREFIX = QNAP_ENTERPRISE_OID
|
SNMP_OBJECT_ID_PREFIX = QNAP_ENTERPRISE_OID
|
||||||
SNMP_FINGERPRINT = [
|
SNMP_FINGERPRINT = [
|
||||||
|
|||||||
@@ -224,6 +224,17 @@ def test_updates_are_not_read_or_applied_here():
|
|||||||
assert not callable(getattr(QnapQtsDriver, method, None)), method
|
assert not callable(getattr(QnapQtsDriver, method, None)), method
|
||||||
|
|
||||||
|
|
||||||
|
def test_hostname_is_not_set_here():
|
||||||
|
"""QTS keeps its name in ``/etc/config/uLinux.conf`` and ``/etc`` in RAM: the
|
||||||
|
``hostnamectl``/``/etc/hostname`` rename inherited from LinuxDriver would report
|
||||||
|
success and be gone after the next boot. Off until a QTS rename is built against
|
||||||
|
harvested output (#13)."""
|
||||||
|
from napalm_linux.linux import LinuxDriver
|
||||||
|
|
||||||
|
assert callable(getattr(LinuxDriver, "set_hostname", None))
|
||||||
|
assert not callable(getattr(QnapQtsDriver, "set_hostname", None))
|
||||||
|
|
||||||
|
|
||||||
class TestFixesQtsCannotTake:
|
class TestFixesQtsCannotTake:
|
||||||
"""QTS has no apt, dnf or opkg, and its SNMP agent is configured in its own UI:
|
"""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
|
the fix templates inherited from LinuxDriver are switched off (#7), so a
|
||||||
|
|||||||
Reference in new issue
Block a user