mirror of https://github.com/docker/docker-py.git
Merge branch 'lyager-connect_argparse'
This commit is contained in:
commit
d2ebc6ade4
|
|
@ -25,7 +25,7 @@ class Network(Model):
|
|||
(self.attrs.get('Containers') or {}).keys()
|
||||
]
|
||||
|
||||
def connect(self, container):
|
||||
def connect(self, container, *args, **kwargs):
|
||||
"""
|
||||
Connect a container to this network.
|
||||
|
||||
|
|
@ -52,9 +52,11 @@ class Network(Model):
|
|||
"""
|
||||
if isinstance(container, Container):
|
||||
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.
|
||||
|
||||
|
|
@ -71,8 +73,9 @@ class Network(Model):
|
|||
"""
|
||||
if isinstance(container, Container):
|
||||
container = container.id
|
||||
return self.client.api.disconnect_container_from_network(container,
|
||||
self.id)
|
||||
return self.client.api.disconnect_container_from_network(
|
||||
container, self.id, *args, **kwargs
|
||||
)
|
||||
|
||||
def remove(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue