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

Method list

docker/models/services.py:263–284  ·  view source on GitHub ↗

List services. Args: filters (dict): Filters to process on the nodes list. Valid filters: ``id``, ``name`` , ``label`` and ``mode``. Default: ``None``. status (bool): Include the service task count of running and

(self, **kwargs)

Source from the content-addressed store, hash-verified

261 )
262
263 def list(self, **kwargs):
264 """
265 List services.
266
267 Args:
268 filters (dict): Filters to process on the nodes list. Valid
269 filters: ``id``, ``name`` , ``label`` and ``mode``.
270 Default: ``None``.
271 status (bool): Include the service task count of running and
272 desired tasks. Default: ``None``.
273
274 Returns:
275 list of :py:class:`Service`: The services.
276
277 Raises:
278 :py:class:`docker.errors.APIError`
279 If the server returns an error.
280 """
281 return [
282 self.prepare_model(s)
283 for s in self.client.api.services(**kwargs)
284 ]
285
286
287# kwargs to copy straight over to ContainerSpec

Callers

nothing calls this directly

Calls 2

prepare_modelMethod · 0.80
servicesMethod · 0.45

Tested by

no test coverage detected