Add interface for batch creation of labels on a manifest

This cannot be a true batch operation right now because of the current mapping table entries needed, but we can create and use the interface now and change the underlying implementation later
This commit is contained in:
Joseph Schorr 2018-09-20 16:00:02 -04:00
parent 8cfb3f4fe8
commit 03789b2210
3 changed files with 51 additions and 0 deletions

View file

@ -57,6 +57,14 @@ class RegistryDataInterface(object):
on the validation errors.
"""
@abstractmethod
def batch_create_manifest_labels(self, manifest):
""" Returns a context manager for batch creation of labels on a manifest.
Can raise InvalidLabelKeyException or InvalidMediaTypeException depending
on the validation errors.
"""
@abstractmethod
def list_manifest_labels(self, manifest, key_prefix=None):
""" Returns all labels found on the manifest. If specified, the key_prefix will filter the