File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -168,14 +168,23 @@ def remove_network(self, net_id):
168
168
self ._raise_for_status (res )
169
169
170
170
@minimum_version ('1.21' )
171
- def inspect_network (self , net_id ):
171
+ def inspect_network (self , net_id , verbose = False ):
172
172
"""
173
173
Get detailed information about a network.
174
174
175
175
Args:
176
176
net_id (str): ID of network
177
+ verbose (bool): If set shows the service details across the cluster
178
+ in swarm mode
177
179
"""
178
- url = self ._url ("/networks/{0}" , net_id )
180
+ if verbose is True :
181
+ if version_lt (self ._version , '1.28' ):
182
+ raise InvalidVersion (
183
+ 'Verbose option was introduced in API 1.28'
184
+ )
185
+ url = self ._url ("/networks/{0}?verbose=true" , net_id )
186
+ else :
187
+ url = self ._url ("/networks/{0}" , net_id )
179
188
res = self ._get (url )
180
189
return self ._result (res , json = True )
181
190
You can’t perform that action at this time.
0 commit comments