update `pull` method docs

Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
aiordache 2020-09-21 10:23:29 +02:00
parent cec152db5f
commit aed5700985
2 changed files with 6 additions and 3 deletions

View File

@ -349,7 +349,8 @@ class ImageApiMixin(object):
Args:
repository (str): The repository to pull
tag (str): The tag to pull
tag (str): The tag to pull. If ``tag`` is ``None`` or empty, it
is set to ``latest``.
stream (bool): Stream the output as a generator. Make sure to
consume the generator, otherwise pull might get cancelled.
auth_config (dict): Override the credentials that are found in the
@ -358,7 +359,8 @@ class ImageApiMixin(object):
decode (bool): Decode the JSON data from the server into dicts.
Only applies with ``stream=True``
platform (str): Platform in the format ``os[/arch[/variant]]``
all_tags (bool): Pull all image tags.
all_tags (bool): Pull all image tags, the ``tag`` parameter is
ignored.
Returns:
(generator or str): The output

View File

@ -399,6 +399,7 @@ class ImageCollection(Collection):
"""
Pull an image of the given name and return it. Similar to the
``docker pull`` command.
If ``tag`` is ``None`` or empty, it is set to ``latest``.
If ``all_tags`` is set, the ``tag`` parameter is ignored and all image
tags will be pulled.
@ -417,7 +418,7 @@ class ImageCollection(Collection):
Returns:
(:py:class:`Image` or list): The image that has been pulled.
If ``tag`` is None, the method will return a list
If ``all_tags`` is True, the method will return a list
of :py:class:`Image` objects belonging to this repository.
Raises: