Rename the new images method to a slightly better name
This commit is contained in:
parent
e70343d849
commit
31260d50f5
3 changed files with 5 additions and 4 deletions
|
@ -104,8 +104,8 @@ class BuildJob(object):
|
|||
return None
|
||||
|
||||
# Build an in-memory tree of the full heirarchy of images in the repository.
|
||||
all_images = model.get_repository_images_directly(repo_build.repository,
|
||||
with_ancestor=base_image)
|
||||
all_images = model.get_repository_images_without_placements(repo_build.repository,
|
||||
with_ancestor=base_image)
|
||||
|
||||
all_tags = model.list_repository_tags(repo_namespace, repo_name)
|
||||
tree = ImageTree(all_images, all_tags, base_filter=base_image.id)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
def get_repository_images_directly(repository, with_ancestor=None):
|
||||
def get_repository_images_without_placements(repository, with_ancestor=None):
|
||||
query = (Image
|
||||
.select(Image, ImageStorage)
|
||||
.join(ImageStorage)
|
||||
|
|
|
@ -102,7 +102,8 @@ class TestImageTree(unittest.TestCase):
|
|||
def checker(index, image):
|
||||
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]))
|
||||
|
||||
tree = ImageTree(filtered_images, all_tags)
|
||||
|
|
Reference in a new issue