MCPcopy Index your code
hub / github.com/docker/docker-py / get

Method get

docker/models/services.py:238–261  ·  view source on GitHub ↗

Get a service. Args: service_id (str): The ID of the service. insert_defaults (boolean): If true, default values will be merged into the output. Returns: :py:class:`Service`: The service. Raises: :py:

(self, service_id, insert_defaults=None)

Source from the content-addressed store, hash-verified

236 return self.get(service_id)
237
238 def get(self, service_id, insert_defaults=None):
239 """
240 Get a service.
241
242 Args:
243 service_id (str): The ID of the service.
244 insert_defaults (boolean): If true, default values will be merged
245 into the output.
246
247 Returns:
248 :py:class:`Service`: The service.
249
250 Raises:
251 :py:class:`docker.errors.NotFound`
252 If the service does not exist.
253 :py:class:`docker.errors.APIError`
254 If the server returns an error.
255 :py:class:`docker.errors.InvalidVersion`
256 If one of the arguments is not supported with the current
257 API version.
258 """
259 return self.prepare_model(
260 self.client.api.inspect_service(service_id, insert_defaults)
261 )
262
263 def list(self, **kwargs):
264 """

Callers 4

createMethod · 0.95
versionMethod · 0.45
updateMethod · 0.45
logsMethod · 0.45

Calls 2

prepare_modelMethod · 0.80
inspect_serviceMethod · 0.80

Tested by

no test coverage detected