Classes | |
| class | DockerJob |
Functions | |
| def | docker_ip_address (cid, timeout_seconds=15) |
| def | docker_kill (cid) |
| def | docker_mapped_port (cid, port, timeout_seconds=15) |
| def | finish_jobs (jobs, suppress_failure=True) |
| def | image_exists (image) |
| def | random_name (base_name) |
| def | remove_image (image, skip_nonexistent=False, max_retries=10) |
| def | wait_for_healthy (cid, shortname, timeout_seconds) |
Variables | |
| _DEVNULL = open(os.devnull, 'w') | |
| def python_utils.dockerjob.docker_ip_address | ( | cid, | |
timeout_seconds = 15 |
|||
| ) |
Get port mapped to internal given internal port for given container.
Definition at line 60 of file dockerjob.py.
| def python_utils.dockerjob.docker_kill | ( | cid | ) |
Kills a docker container. Returns True if successful.
Definition at line 37 of file dockerjob.py.
| def python_utils.dockerjob.docker_mapped_port | ( | cid, | |
| port, | |||
timeout_seconds = 15 |
|||
| ) |
Get port mapped to internal given internal port for given container.
Definition at line 45 of file dockerjob.py.
| def python_utils.dockerjob.finish_jobs | ( | jobs, | |
suppress_failure = True |
|||
| ) |
Kills given docker containers and waits for corresponding jobs to finish
Definition at line 98 of file dockerjob.py.
| def python_utils.dockerjob.image_exists | ( | image | ) |
Returns True if given docker image exists.
Definition at line 107 of file dockerjob.py.
| def python_utils.dockerjob.random_name | ( | base_name | ) |
Randomizes given base name.
Definition at line 32 of file dockerjob.py.
| def python_utils.dockerjob.remove_image | ( | image, | |
skip_nonexistent = False, |
|||
max_retries = 10 |
|||
| ) |
Attempts to remove docker image with retries.
Definition at line 115 of file dockerjob.py.
| def python_utils.dockerjob.wait_for_healthy | ( | cid, | |
| shortname, | |||
| timeout_seconds | |||
| ) |
Wait timeout_seconds for the container to become healthy
Definition at line 80 of file dockerjob.py.
|
private |
Definition at line 29 of file dockerjob.py.