Merge branch 'lyager-connect_argparse'

This commit is contained in:
Joffrey F 2017-04-27 15:47:35 -07:00
commit d2ebc6ade4
1 changed files with 8 additions and 5 deletions

View File

@ -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):
"""