def docker_client(self): docker_client = self._docker_client if not docker_client: from tobiko import docker self._docker_client = docker_client = docker.get_docker_client( ssh_client=self.ssh_client) return docker_client
def docker_client(self): docker_client = self._docker_client if not docker_client: self._docker_client = docker_client = docker.get_docker_client( ssh_client=self.ssh_client) return docker_client
def test_connect_docker_client(self): client = docker.get_docker_client(ssh_client=self.ssh_client).connect() self.assertIsInstance(client, docker_client.DockerClient) client.ping()
def test_get_docker_client(self): client = docker.get_docker_client(ssh_client=self.ssh_client) self.assertIsInstance(client, docker.DockerClientFixture)
def test_list_docker_containers(self): client = docker.get_docker_client(ssh_client=self.ssh_client, sudo=self.sudo) for container in docker.list_docker_containers( client=client): self.assertIsInstance(container, containers.Container)
def _get_client(self, ssh_client): return docker.get_docker_client(ssh_client=ssh_client, sudo=True).connect()