Populate image storage objects with locations everywhere.

This commit is contained in:
Jake Moshenko 2014-06-27 20:04:26 -04:00
parent e68d6a7302
commit 684c26bc1a
4 changed files with 40 additions and 49 deletions

View file

@ -23,7 +23,7 @@ def image_view(image):
'ancestors': image.ancestors,
'dbid': image.id,
'size': extended_props.image_size,
'locations': [l.location.name for l in image.storage.locations]
'locations': list(image.storage.locations),
}

View file

@ -84,7 +84,7 @@ class RepositoryTagImages(RepositoryParamResource):
except model.DataModelException:
raise NotFound()
parent_images = model.get_parent_images(tag_image)
parent_images = model.get_parent_images(namespace, repository, tag_image)
parents = list(parent_images)
parents.reverse()

View file

@ -449,7 +449,7 @@ def process_image_changes(namespace, repository, image_id):
return image_trie_path
image = model.get_image_by_id(namespace, repository, image_id)
parents = model.get_parent_images(image)
parents = model.get_parent_images(namespace, repository, image)
# Compute the diffs and fs for the parent first if necessary
parent_trie_path = None