Get detailed information about a network. Args: net_id (str): ID of network verbose (bool): Show the service details across the cluster in swarm mode. scope (str): Filter the network by scope (``swarm``, ``global``
(self, net_id, verbose=None, scope=None)
| 187 | |
| 188 | @check_resource('net_id') |
| 189 | def inspect_network(self, net_id, verbose=None, scope=None): |
| 190 | """ |
| 191 | Get detailed information about a network. |
| 192 | |
| 193 | Args: |
| 194 | net_id (str): ID of network |
| 195 | verbose (bool): Show the service details across the cluster in |
| 196 | swarm mode. |
| 197 | scope (str): Filter the network by scope (``swarm``, ``global`` |
| 198 | or ``local``). |
| 199 | """ |
| 200 | params = {} |
| 201 | if verbose is not None: |
| 202 | if version_lt(self._version, '1.28'): |
| 203 | raise InvalidVersion('verbose was introduced in API 1.28') |
| 204 | params['verbose'] = verbose |
| 205 | if scope is not None: |
| 206 | if version_lt(self._version, '1.31'): |
| 207 | raise InvalidVersion('scope was introduced in API 1.31') |
| 208 | params['scope'] = scope |
| 209 | |
| 210 | url = self._url("/networks/{0}", net_id) |
| 211 | res = self._get(url, params=params) |
| 212 | return self._result(res, json=True) |
| 213 | |
| 214 | @check_resource('container') |
| 215 | def connect_container_to_network(self, container, net_id, |