summaryrefslogtreecommitdiff
path: root/docker/api/container.py
diff options
context:
space:
mode:
authorAanand Prasad <aanand.prasad@gmail.com>2016-01-14 16:33:26 +0000
committerAanand Prasad <aanand.prasad@gmail.com>2016-01-14 18:19:35 +0000
commitd00a5bb08671dc43c4db1fb8dc2ea90b68bbc1d9 (patch)
tree85c95101938ddfdb5fe38d8389d0ea98823bf808 /docker/api/container.py
parente2878cbcc3a7eef99917adc1be252800b0e41ece (diff)
downloaddocker-py-d00a5bb08671dc43c4db1fb8dc2ea90b68bbc1d9.tar.gz
Implement support for network-scoped aliases
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Diffstat (limited to 'docker/api/container.py')
-rw-r--r--docker/api/container.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/docker/api/container.py b/docker/api/container.py
index 78cd216..ceac173 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -4,6 +4,7 @@ from datetime import datetime
from .. import errors
from .. import utils
+from ..utils.utils import create_networking_config, create_endpoint_config
class ContainerApiMixin(object):
@@ -98,7 +99,7 @@ class ContainerApiMixin(object):
cpu_shares=None, working_dir=None, domainname=None,
memswap_limit=None, cpuset=None, host_config=None,
mac_address=None, labels=None, volume_driver=None,
- stop_signal=None):
+ stop_signal=None, networking_config=None):
if isinstance(volumes, six.string_types):
volumes = [volumes, ]
@@ -113,7 +114,7 @@ class ContainerApiMixin(object):
tty, mem_limit, ports, environment, dns, volumes, volumes_from,
network_disabled, entrypoint, cpu_shares, working_dir, domainname,
memswap_limit, cpuset, host_config, mac_address, labels,
- volume_driver, stop_signal
+ volume_driver, stop_signal, networking_config,
)
return self.create_container_from_config(config, name)
@@ -139,6 +140,12 @@ class ContainerApiMixin(object):
kwargs['version'] = self._version
return utils.create_host_config(*args, **kwargs)
+ def create_networking_config(self, *args, **kwargs):
+ return create_networking_config(*args, **kwargs)
+
+ def create_endpoint_config(self, *args, **kwargs):
+ return create_endpoint_config(self._version, *args, **kwargs)
+
@utils.check_resource
def diff(self, container):
return self._result(