summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <f.joffrey@gmail.com>2018-01-31 15:41:08 -0800
committerGitHub <noreply@github.com>2018-01-31 15:41:08 -0800
commit0a86ff0bcc33209cf1c3db38f71c30192851df3a (patch)
treeef02c2eae0eb774733bfb8fca1bbc4555984cc5a
parentea44212969542bfc8c9f6720ace2abf1735f4b2b (diff)
parentbf2ea4dcb01ffa3329fef91570fe3bd40fad4d7d (diff)
downloaddocker-py-0a86ff0bcc33209cf1c3db38f71c30192851df3a.tar.gz
Merge pull request #1889 from docker/1441-pull-repository-name
Rename `name` parameter in `pull` method to `repository`
-rw-r--r--docker/models/images.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/docker/models/images.py b/docker/models/images.py
index 97c5503..0f3c71a 100644
--- a/docker/models/images.py
+++ b/docker/models/images.py
@@ -266,7 +266,7 @@ class ImageCollection(Collection):
return [self.get(i) for i in images]
- def pull(self, name, tag=None, **kwargs):
+ def pull(self, repository, tag=None, **kwargs):
"""
Pull an image of the given name and return it. Similar to the
``docker pull`` command.
@@ -280,7 +280,6 @@ class ImageCollection(Collection):
Args:
name (str): The repository to pull
tag (str): The tag to pull
- insecure_registry (bool): Use an insecure registry
auth_config (dict): Override the credentials that
:py:meth:`~docker.client.DockerClient.login` has set for
this request. ``auth_config`` should contain the ``username``
@@ -305,12 +304,12 @@ class ImageCollection(Collection):
>>> images = client.images.pull('busybox')
"""
if not tag:
- name, tag = parse_repository_tag(name)
+ repository, tag = parse_repository_tag(repository)
- self.client.api.pull(name, tag=tag, **kwargs)
+ self.client.api.pull(repository, tag=tag, **kwargs)
if tag:
- return self.get('{0}:{1}'.format(name, tag))
- return self.list(name)
+ return self.get('{0}:{1}'.format(repository, tag))
+ return self.list(repository)
def push(self, repository, tag=None, **kwargs):
return self.client.api.push(repository, tag=tag, **kwargs)