Rename Image.image_id to Image.docker_image_id to reduce confusion.
This commit is contained in:
parent
4746f9c324
commit
96896b9067
7 changed files with 33 additions and 20 deletions
|
@ -154,7 +154,7 @@ def delete_repository(namespace, repository):
|
|||
|
||||
def image_view(image):
|
||||
return {
|
||||
'id': image.image_id,
|
||||
'id': image.docker_image_id,
|
||||
'created': image.created,
|
||||
'comment': image.comment,
|
||||
}
|
||||
|
|
|
@ -123,8 +123,8 @@ def create_repository(namespace, repository):
|
|||
new_repo_images = {desc['id']: desc for desc in image_descriptions}
|
||||
added_images = dict(new_repo_images)
|
||||
for existing in model.get_repository_images(namespace, repository):
|
||||
if existing.image_id in new_repo_images:
|
||||
added_images.pop(existing.image_id)
|
||||
if existing.docker_image_id in new_repo_images:
|
||||
added_images.pop(existing.docker_image_id)
|
||||
else:
|
||||
existing.repositoryimage.delete()
|
||||
|
||||
|
@ -169,7 +169,7 @@ def get_repository_images(namespace, repository):
|
|||
all_images = []
|
||||
for image in model.get_repository_images(namespace, repository):
|
||||
new_image_view = {
|
||||
'id': image.image_id,
|
||||
'id': image.docker_image_id,
|
||||
'checksum': image.checksum,
|
||||
}
|
||||
all_images.append(new_image_view)
|
||||
|
|
|
@ -291,7 +291,7 @@ def put_image_json(namespace, repository, image_id):
|
|||
# on a failed push
|
||||
# save the metadata
|
||||
if parent_id:
|
||||
parent_obj = model.get_image_by_id(parent_id)
|
||||
parent_obj = model.get_image_by_id(namespace, repository, parent_id)
|
||||
else:
|
||||
parent_obj = None
|
||||
|
||||
|
|
Reference in a new issue