MCPcopy
hub / github.com/docker/docker-py / get

Method get

docker/models/networks.py:159–183  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 3

createMethod · 0.95
nameMethod · 0.45
containersMethod · 0.45

Calls 2

prepare_modelMethod · 0.80
inspect_networkMethod · 0.80

Tested by

no test coverage detected