Skip to content

Commit 9412e21

Browse files
lyagershin-
authored andcommitted
Network model functions 'connect' and 'disconnect' did not accept or passthrough keyword arguments.
Signed-off-by: Jesper L. Nielsen <[email protected]>
1 parent bd84beb commit 9412e21

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docker/models/networks.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def containers(self):
2525
(self.attrs.get('Containers') or {}).keys()
2626
]
2727

28-
def connect(self, container):
28+
def connect(self, container, *args, **kwargs):
2929
"""
3030
Connect a container to this network.
3131
@@ -52,9 +52,12 @@ def connect(self, container):
5252
"""
5353
if isinstance(container, Container):
5454
container = container.id
55-
return self.client.api.connect_container_to_network(container, self.id)
55+
return self.client.api.connect_container_to_network(container,
56+
self.id,
57+
*args,
58+
**kwargs)
5659

57-
def disconnect(self, container):
60+
def disconnect(self, container, *args, **kwargs):
5861
"""
5962
Disconnect a container from this network.
6063
@@ -72,7 +75,9 @@ def disconnect(self, container):
7275
if isinstance(container, Container):
7376
container = container.id
7477
return self.client.api.disconnect_container_from_network(container,
75-
self.id)
78+
self.id,
79+
*args,
80+
**kwargs)
7681

7782
def remove(self):
7883
"""

0 commit comments

Comments
 (0)