Get a network by its ID. Args: network_id (str): The ID of the network. verbose (bool): Retrieve the service details across the cluster in swarm mode. scope (str): Filter the network by scope (``swarm``, ``global``
(self, network_id, *args, **kwargs)
| 157 | return self.get(resp['Id']) |
| 158 | |
| 159 | def get(self, network_id, *args, **kwargs): |
| 160 | """ |
| 161 | Get a network by its ID. |
| 162 | |
| 163 | Args: |
| 164 | network_id (str): The ID of the network. |
| 165 | verbose (bool): Retrieve the service details across the cluster in |
| 166 | swarm mode. |
| 167 | scope (str): Filter the network by scope (``swarm``, ``global`` |
| 168 | or ``local``). |
| 169 | |
| 170 | Returns: |
| 171 | (:py:class:`Network`) The network. |
| 172 | |
| 173 | Raises: |
| 174 | :py:class:`docker.errors.NotFound` |
| 175 | If the network does not exist. |
| 176 | |
| 177 | :py:class:`docker.errors.APIError` |
| 178 | If the server returns an error. |
| 179 | |
| 180 | """ |
| 181 | return self.prepare_model( |
| 182 | self.client.api.inspect_network(network_id, *args, **kwargs) |
| 183 | ) |
| 184 | |
| 185 | def list(self, *args, **kwargs): |
| 186 | """ |
no test coverage detected