Add manifest creation to new registry data model interface
This commit is contained in:
parent
818ed32f87
commit
0ae062be62
9 changed files with 195 additions and 5 deletions
|
@ -35,6 +35,19 @@ class RegistryDataInterface(object):
|
|||
""" Looks up the manifest with the given digest under the given repository and returns it
|
||||
or None if none. """
|
||||
|
||||
@abstractmethod
|
||||
def create_manifest_and_retarget_tag(self, repository_ref, manifest_interface_instance, tag_name):
|
||||
""" Creates a manifest in a repository, adding all of the necessary data in the model.
|
||||
|
||||
The `manifest_interface_instance` parameter must be an instance of the manifest
|
||||
interface as returned by the image/docker package.
|
||||
|
||||
Note that all blobs referenced by the manifest must exist under the repository or this
|
||||
method will fail and return None.
|
||||
|
||||
Returns a reference to the (created manifest, tag) or (None, None) on error.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def get_legacy_images(self, repository_ref):
|
||||
"""
|
||||
|
@ -255,3 +268,9 @@ class RegistryDataInterface(object):
|
|||
operations if an existing blob from another repositroy is being pushed. Returns False if
|
||||
the mounting fails.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def set_tags_expiration_for_manifest(self, manifest, expiration_sec):
|
||||
"""
|
||||
Sets the expiration on all tags that point to the given manifest to that specified.
|
||||
"""
|
||||
|
|
Reference in a new issue