refactor!: drop the Docker model
CI / test (3.10) (push) Successful in 25s
CI / test (3.11) (push) Successful in 22s
CI / test (3.12) (push) Successful in 24s
CI / test (3.10) (pull_request) Successful in 24s
CI / test (3.11) (pull_request) Successful in 22s
CI / test (3.12) (pull_request) Successful in 23s
CI / test (3.10) (push) Successful in 25s
CI / test (3.11) (push) Successful in 22s
CI / test (3.12) (push) Successful in 24s
CI / test (3.10) (pull_request) Successful in 24s
CI / test (3.11) (pull_request) Successful in 22s
CI / test (3.12) (pull_request) Successful in 23s
DockerInfoDict, DockerContainerDict, DockerImageDict, DockerVolumeDict, DockerNetworkDict and the OSDriver declaration of get_docker_info() go. They described napalm-linux' old CLI reading, which napalm-linux 0.3.0 dropped. There is no container model here: netOrk reads and handles containers over the Engine API (NetOrk/netork#765, phase 9); this package only gives access to the engine. Version 4.0.0.
This commit is contained in:
@@ -157,3 +157,22 @@ class TestPrivilegedCli:
|
||||
driver.open_container_engine("docker").stream_cli(["pull", "nginx"], privileged=True)
|
||||
|
||||
assert driver.streams == [("docker pull nginx", True)]
|
||||
|
||||
|
||||
class TestNoDockerModel:
|
||||
"""There is no container model here (NetOrk/netork#765): netOrk reads and
|
||||
handles containers over the Engine API, so the CLI-shaped types and the
|
||||
``get_docker_info()`` declaration that served napalm-linux' old reading are gone."""
|
||||
|
||||
def test_the_docker_types_are_gone(self):
|
||||
import napalm_device_types
|
||||
from napalm_device_types import models
|
||||
|
||||
for name in ("DockerInfoDict", "DockerContainerDict", "DockerImageDict"):
|
||||
assert not hasattr(models, name), name
|
||||
assert not hasattr(napalm_device_types, name), name
|
||||
|
||||
def test_an_os_driver_declares_no_docker_reading(self):
|
||||
from napalm_device_types import os as os_role
|
||||
|
||||
assert "get_docker_info" not in os_role.__dict__.get("OSDriver", object).__dict__
|
||||
|
||||
Reference in New Issue
Block a user