Upload remove default for pull_source
Currently the pull_source defaults to "docker.io". This is unnecessary
as docker.io is the default registry anyway when no registry is
specified in the namespace.
Also having this default prevents fully qualified image paths being
specified in the imagename. This is desirable now that we use full
paths in the heat parameters.
This also allows the prepare command to deprecate the --pull-source
argument and document having full image paths in the --namespace
argument.
Change-Id: I1769c7cf1c058328a8490228bdc4719e8d216ccb
Partial-Bug: #1708967
(cherry picked from commit c58ac826df
)
This commit is contained in:
parent
a96c4c47f0
commit
45acbce815
|
@ -51,7 +51,7 @@ class ImageUploadManager(BaseImageManager):
|
|||
for item in upload_images:
|
||||
image_name = item.get('imagename')
|
||||
uploader = item.get('uploader', 'docker')
|
||||
pull_source = item.get('pull_source', 'docker.io')
|
||||
pull_source = item.get('pull_source')
|
||||
push_destination = item.get('push_destination',
|
||||
default_push_destination)
|
||||
|
||||
|
@ -103,14 +103,17 @@ class DockerImageUploader(ImageUploader):
|
|||
else:
|
||||
image = image_name
|
||||
tag = 'latest'
|
||||
repo = pull_source + '/' + image
|
||||
if pull_source:
|
||||
repo = pull_source + '/' + image
|
||||
else:
|
||||
repo = image
|
||||
|
||||
response = [line for line in dockerc.pull(repo,
|
||||
tag=tag, stream=True)]
|
||||
self.logger.debug(response)
|
||||
|
||||
full_image = repo + ':' + tag
|
||||
new_repo = push_destination + '/' + image
|
||||
new_repo = push_destination + '/' + repo.partition('/')[2]
|
||||
response = dockerc.tag(image=full_image, repository=new_repo,
|
||||
tag=tag, force=True)
|
||||
self.logger.debug(response)
|
||||
|
|
Loading…
Reference in New Issue