pyarchops_helpers package

Submodules

pyarchops_helpers.helpers module

Helpers for pyarchops tests packages.

pyarchops_helpers.helpers.docker_container_port(container_id: str) → int[source]

returns the ssh port number for a docker instance

params:
string container: docker container id
returns:
string: port number
pyarchops_helpers.helpers.docker_down(container_id: str) → None[source]

kills the docker container

params:
string container: docker id of the container to stop
pyarchops_helpers.helpers.docker_rm(container_id: str) → None[source]

removes a docker container

params:
string container: docker id of the container to remove
pyarchops_helpers.helpers.docker_up(image: str, privileged: bool = False) → str[source]

runs a docker container

params:
string image: name of the docker image bool privileged: use docker –privileged flag
returns:
string: stdout of the docker run
pyarchops_helpers.helpers.dockerd_ip() → str[source]

returns the ip address of the docker daemon

params:
string docker_host_string: URL of the docker daemon
returns:
string: ip address of the docker host
pyarchops_helpers.helpers.ephemeral_docker_container(**kwargs) → Iterator[dict][source]

prepares a docker container, yelding a dict with its configuration before deleting the container

pyarchops_helpers.helpers.wait_for_ssh(host: dict, initial_wait: int = 0, interval: int = 0, retries: int = 1) → bool[source]

waits for ssh to become available

Module contents

__init__.py for pyarchops_helpers