mirror of https://github.com/docker/docker-py.git
Network model functions 'connect' and 'disconnect' did not accept or passthrough keyword arguments.
Signed-off-by: Jesper L. Nielsen <lyager@gmail.com>
This commit is contained in:
parent
bd84bebfa9
commit
9412e21f1a
|
|
@ -25,7 +25,7 @@ class Network(Model):
|
||||||
(self.attrs.get('Containers') or {}).keys()
|
(self.attrs.get('Containers') or {}).keys()
|
||||||
]
|
]
|
||||||
|
|
||||||
def connect(self, container):
|
def connect(self, container, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
Connect a container to this network.
|
Connect a container to this network.
|
||||||
|
|
||||||
|
|
@ -52,9 +52,12 @@ class Network(Model):
|
||||||
"""
|
"""
|
||||||
if isinstance(container, Container):
|
if isinstance(container, Container):
|
||||||
container = container.id
|
container = container.id
|
||||||
return self.client.api.connect_container_to_network(container, self.id)
|
return self.client.api.connect_container_to_network(container,
|
||||||
|
self.id,
|
||||||
|
*args,
|
||||||
|
**kwargs)
|
||||||
|
|
||||||
def disconnect(self, container):
|
def disconnect(self, container, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
Disconnect a container from this network.
|
Disconnect a container from this network.
|
||||||
|
|
||||||
|
|
@ -72,7 +75,9 @@ class Network(Model):
|
||||||
if isinstance(container, Container):
|
if isinstance(container, Container):
|
||||||
container = container.id
|
container = container.id
|
||||||
return self.client.api.disconnect_container_from_network(container,
|
return self.client.api.disconnect_container_from_network(container,
|
||||||
self.id)
|
self.id,
|
||||||
|
*args,
|
||||||
|
**kwargs)
|
||||||
|
|
||||||
def remove(self):
|
def remove(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue