vantage6.common.docker.addons.get_network

get_network(docker_client, **filters)

Return network if it exists after searching using kwargs

Parameters:
  • docker_client (DockerClient) – Python docker client

  • **filters – These are arguments that will be passed to the client.network.list() function. They should yield 0 or 1 networks as result (e.g. name=’something’)

Returns:

Container if it exists, else None

Return type:

Container or None