Fix disabled namespace check

This commit is contained in:
Joseph Schorr 2018-10-08 16:32:09 +01:00
parent cbf0edb164
commit 4a7b4ad06a
9 changed files with 32 additions and 23 deletions

View file

@ -171,6 +171,10 @@ class RegistryDataInterface(object):
it should be removed.
"""
@abstractmethod
def is_existing_disabled_namespace(self, namespace_name):
""" Returns whether the given namespace exists and is disabled. """
@abstractmethod
def is_namespace_enabled(self, namespace_name):
""" Returns whether the given namespace exists and is enabled. """
@ -274,7 +278,9 @@ class RegistryDataInterface(object):
Mounts the blob from another repository into the specified target repository, and adds an
expiration before that blob is automatically GCed. This function is useful during push
operations if an existing blob from another repositroy is being pushed. Returns False if
the mounting fails. Note that this function does *not* check security for mounting the blob.
the mounting fails. Note that this function does *not* check security for mounting the blob
and the caller is responsible for doing this check (an example can be found in
endpoints/v2/blob.py).
"""
@abstractmethod