Rename the new images method to a slightly better name

This commit is contained in:
Joseph Schorr 2015-04-24 16:37:37 -04:00
parent e70343d849
commit 31260d50f5
3 changed files with 5 additions and 4 deletions

View file

@ -104,7 +104,7 @@ class BuildJob(object):
return None return None
# Build an in-memory tree of the full heirarchy of images in the repository. # Build an in-memory tree of the full heirarchy of images in the repository.
all_images = model.get_repository_images_directly(repo_build.repository, all_images = model.get_repository_images_without_placements(repo_build.repository,
with_ancestor=base_image) with_ancestor=base_image)
all_tags = model.list_repository_tags(repo_namespace, repo_name) all_tags = model.list_repository_tags(repo_namespace, repo_name)

View file

@ -1752,7 +1752,7 @@ def get_matching_repository_images(namespace_name, repository_name, docker_image
return _get_repository_images_base(namespace_name, repository_name, modify_query) return _get_repository_images_base(namespace_name, repository_name, modify_query)
def get_repository_images_directly(repository, with_ancestor=None): def get_repository_images_without_placements(repository, with_ancestor=None):
query = (Image query = (Image
.select(Image, ImageStorage) .select(Image, ImageStorage)
.join(ImageStorage) .join(ImageStorage)

View file

@ -102,7 +102,8 @@ class TestImageTree(unittest.TestCase):
def checker(index, image): def checker(index, image):
return True return True
filtered_images = model.get_repository_images_directly(repository, with_ancestor=base_image) filtered_images = model.get_repository_images_without_placements(repository,
with_ancestor=base_image)
self.assertEquals(set([f.id for f in filtered_images]), set([a.id for a in all_images])) self.assertEquals(set([f.id for f in filtered_images]), set([a.id for a in all_images]))
tree = ImageTree(filtered_images, all_tags) tree = ImageTree(filtered_images, all_tags)