Add doc comments to data interface for manifest labels
This commit is contained in:
parent
af27a1b6dc
commit
c92b566427
2 changed files with 61 additions and 6 deletions
|
@ -12,7 +12,14 @@ class ManifestLabel(
|
||||||
'source_type_name',
|
'source_type_name',
|
||||||
'media_type_name',
|
'media_type_name',
|
||||||
])):
|
])):
|
||||||
|
"""
|
||||||
|
ManifestLabel represents a label on a manifest
|
||||||
|
:type uuid: string
|
||||||
|
:type key: string
|
||||||
|
:type value: string
|
||||||
|
:type source_type_name: string
|
||||||
|
:type media_type_name: string
|
||||||
|
"""
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
return {
|
return {
|
||||||
'id': self.uuid,
|
'id': self.uuid,
|
||||||
|
@ -25,18 +32,66 @@ class ManifestLabel(
|
||||||
|
|
||||||
@add_metaclass(ABCMeta)
|
@add_metaclass(ABCMeta)
|
||||||
class ManifestLabelInterface(object):
|
class ManifestLabelInterface(object):
|
||||||
|
"""
|
||||||
|
Data interface that the manifest labels API uses
|
||||||
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_manifest_labels(self, namespace_name, repository_name, manifestref, filter=None):
|
def get_manifest_labels(self, namespace_name, repository_name, manifestref, filter=None):
|
||||||
pass
|
"""
|
||||||
|
|
||||||
|
Args:
|
||||||
|
namespace_name: string
|
||||||
|
repository_name: string
|
||||||
|
manifestref: string
|
||||||
|
filter: string
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list(ManifestLabel) or None
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def create_manifest_label(self, namespace_name, repository_name, manifestref, key, value, source_type_name, media_type_name):
|
def create_manifest_label(self, namespace_name, repository_name, manifestref, key, value, source_type_name, media_type_name):
|
||||||
pass
|
"""
|
||||||
|
|
||||||
|
Args:
|
||||||
|
namespace_name: string
|
||||||
|
repository_name: string
|
||||||
|
manifestref: string
|
||||||
|
key: string
|
||||||
|
value: string
|
||||||
|
source_type_name: string
|
||||||
|
media_type_name: string
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
ManifestLabel or None
|
||||||
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_manifest_label(self, namespace_name, repository_name, manifestref, label_uuid):
|
def get_manifest_label(self, namespace_name, repository_name, manifestref, label_uuid):
|
||||||
pass
|
"""
|
||||||
|
|
||||||
|
Args:
|
||||||
|
namespace_name: string
|
||||||
|
repository_name: string
|
||||||
|
manifestref: string
|
||||||
|
label_uuid: string
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
ManifestLabel or None
|
||||||
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def delete_manifest_label(self, namespace_name, repository_name, manifestref, label_uuid):
|
def delete_manifest_label(self, namespace_name, repository_name, manifestref, label_uuid):
|
||||||
pass
|
"""
|
||||||
|
|
||||||
|
Args:
|
||||||
|
namespace_name: string
|
||||||
|
repository_name: string
|
||||||
|
manifestref: string
|
||||||
|
label_uuid: string
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
ManifestLabel or None
|
||||||
|
"""
|
||||||
|
|
Reference in a new issue