removed obsolete code
This commit is contained in:
parent
020cad6e5b
commit
ee9b0117f6
@ -81,25 +81,14 @@ def docker_compose(sleep_seconds=30):
|
||||
compose.stop()
|
||||
|
||||
|
||||
# def get_endpoint_from_running_container(container_name, config):
|
||||
# port = config.endpoint.split(":")[-1]
|
||||
# endpoint = f"{docker.get_ip_address(container_name)}:{port}"
|
||||
# return endpoint
|
||||
|
||||
|
||||
def get_pika_connection_params():
|
||||
params = get_connection_params()
|
||||
# params.host = docker.get_ip_address("rabbitmq")
|
||||
return params
|
||||
|
||||
|
||||
def get_s3_params(s3_backend):
|
||||
params = CONFIG.storage[s3_backend]
|
||||
|
||||
# if s3_backend == "minio":
|
||||
# port = params.endpoint.split(":")[-1]
|
||||
# params.endpoint = f"{docker.get_ip_address(s3_backend)}:{port}"
|
||||
|
||||
return params
|
||||
|
||||
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
# import docker
|
||||
#
|
||||
# from pyinfra.exceptions import NoSuchContainer
|
||||
#
|
||||
#
|
||||
# def filter_by_name(containers, container_name, exact=False):
|
||||
# def matches(container):
|
||||
# return container_name == container.name if exact else container_name in container.name
|
||||
#
|
||||
# containers = filter(matches, containers)
|
||||
# return containers
|
||||
#
|
||||
#
|
||||
# def get_container(container_name, exact=False):
|
||||
# client = docker.from_env()
|
||||
# containers = client.containers.list()
|
||||
# containers = filter_by_name(containers, container_name, exact=exact)
|
||||
#
|
||||
# try:
|
||||
# return next(containers)
|
||||
# except StopIteration:
|
||||
# raise NoSuchContainer(f"No container found for '{container_name}'")
|
||||
#
|
||||
#
|
||||
# def get_ip_address(container_name, exact=False):
|
||||
# container = get_container(container_name, exact=exact)
|
||||
# ip_address = container.attrs["NetworkSettings"]["Networks"]["bridge"]["IPAddress"]
|
||||
# return ip_address
|
||||
Loading…
x
Reference in New Issue
Block a user