Implement support for blob mounting via the mount parameter on blob uploads

Fixes https://jira.coreos.com/browse/QUAY-893
This commit is contained in:
Joseph Schorr 2018-04-15 14:55:14 +03:00
parent 44bb000fa5
commit 0fa1a1d5fd
5 changed files with 179 additions and 8 deletions

View file

@ -220,6 +220,14 @@ class DockerRegistryV2DataInterface(object):
"""
pass
@abstractmethod
def mount_blob_and_temp_tag(self, namespace_name, repo_name, existing_blob, expiration_sec):
"""
Mounts an existing blob and links a temporary tag with the specified expiration to it under
the matching repository. Returns True on success and False on failure.
"""
pass
@abstractmethod
def create_blob_and_temp_tag(self, namespace_name, repo_name, blob_digest, blob_upload,
expiration_sec):
@ -276,3 +284,8 @@ class DockerRegistryV2DataInterface(object):
""" Returns whether the given namespace is enabled. If the namespace doesn't exist,
returns True. """
pass
@abstractmethod
def is_repository_public(self, namespace_name, repo_name):
""" Returns True if the repository with the given name exists and is public. """
pass