Skip to content

Commit d2ebc6a

Browse files
committed
Merge branch 'lyager-connect_argparse'
2 parents bd84beb + 16d32b4 commit d2ebc6a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docker/models/networks.py

Lines changed: 8 additions & 5 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,11 @@ 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(
56+
container, self.id, *args, **kwargs
57+
)
5658

57-
def disconnect(self, container):
59+
def disconnect(self, container, *args, **kwargs):
5860
"""
5961
Disconnect a container from this network.
6062
@@ -71,8 +73,9 @@ def disconnect(self, container):
7173
"""
7274
if isinstance(container, Container):
7375
container = container.id
74-
return self.client.api.disconnect_container_from_network(container,
75-
self.id)
76+
return self.client.api.disconnect_container_from_network(
77+
container, self.id, *args, **kwargs
78+
)
7679

7780
def remove(self):
7881
"""

0 commit comments

Comments
 (0)