Fix image replication for images with remote layers

This commit is contained in:
Joseph Schorr 2018-11-26 16:15:48 +02:00
parent 0eb84f8077
commit 180d8847db
7 changed files with 103 additions and 40 deletions

View file

@ -584,5 +584,15 @@ class PreOCIModel(SharedModel, RegistryDataInterface):
"""
return self._list_manifest_layers(repository_ref._db_id, parsed_manifest, include_placements)
def get_manifest_local_blobs(self, manifest, include_placements=False):
""" Returns the set of local blobs for the given manifest or None if none. """
try:
tag_manifest = database.TagManifest.get(id=manifest._db_id)
except database.TagManifest.DoesNotExist:
return None
return self._get_manifest_local_blobs(manifest, tag_manifest.tag.repository_id,
include_placements)
pre_oci_model = PreOCIModel()