feat: hand the container engine connection Container Station's docker
CI / test (3.11) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 30s
CI / test (3.10) (push) Successful in 29s
CI / test (3.11) (push) Successful in 27s
CI / test (3.12) (push) Successful in 28s
CI / test (3.10) (pull_request) Successful in 29s
CI / test (3.11) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 30s
CI / test (3.10) (push) Successful in 29s
CI / test (3.11) (push) Successful in 27s
CI / test (3.12) (push) Successful in 28s
CI / test (3.10) (pull_request) Successful in 29s
napalm-device-types 2.6.0 opens a host's container engine through `open_container_engine()`, and asks the driver for the binary through `_container_engine_binary()`. Under QTS docker is not on PATH; the hook now returns the path `open()` already discovers, so the Engine API stream (`<path> system dial-stdio`) and the CLI reach Container Station while callers only pass arguments (NetOrk/netork#765). Version 0.2.0, requires napalm-device-types >= 2.6.0 and napalm-linux >= 0.2.0. Refs NAPALM/napalm-device-types#17
This commit is contained in:
@@ -154,6 +154,12 @@ class QnapQtsDriver(StorageDriver, HypervisorDriver, LinuxDriver):
|
||||
"""Override LinuxDriver's hook: docker is not on PATH under QTS."""
|
||||
return getattr(self, "_docker_path", None) or "docker"
|
||||
|
||||
def _container_engine_binary(self, engine: str) -> str:
|
||||
"""Container Station keeps docker off PATH; callers never see the path."""
|
||||
if engine == "docker":
|
||||
return self._docker_bin()
|
||||
return super()._container_engine_binary(engine)
|
||||
|
||||
# ── QPKG, not apt ─────────────────────────────────────────────────────────
|
||||
#
|
||||
# QTS is Linux, so LinuxDriver's package methods are in the MRO and would
|
||||
|
||||
Reference in New Issue
Block a user