Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from colin.checks.abstract.labels import LabelCheck
class SummaryCheck(LabelCheck):
def __init__(self):
super(SummaryCheck, self) \
.__init__(name="summary_label_required",
message="Label 'summary' has to be specified.",
description="A short description of the image.",
reference_url="https://fedoraproject.org/wiki/Container:Guidelines#LABELS",
tags=["summary", "label"],
label="summary",
required=True,
value_regex=None)
from colin.checks.abstract.labels import LabelCheck
class AuthoritativeSourceUrlLabelCheck(LabelCheck):
def __init__(self):
super(AuthoritativeSourceUrlLabelCheck, self) \
.__init__(name="authoritative_source-url_label",
message="Label 'authoritative-source-url' has to be specified.",
description="The authoritative registry in which the image is published.",
reference_url="https://fedoraproject.org/wiki/Container:Guidelines#LABELS",
tags=["authoritative-source-url", "label"],
label="authoritative-source-url",
required=True,
value_regex=None)
from colin.checks.abstract.labels import LabelCheck
class HelpLabelCheck(LabelCheck):
def __init__(self):
super(HelpLabelCheck, self) \
.__init__(name="help_label",
message="Label 'help' has to be specified.",
description="A runnable command which results in display of Help information.",
reference_url="https://fedoraproject.org/wiki/Container:Guidelines#LABELS",
tags=["help", "label"],
label="help",
required=True,
value_regex=None)
from colin.checks.abstract.labels import LabelCheck
class VersionCheck(LabelCheck):
def __init__(self):
super(VersionCheck, self) \
.__init__(name="version_label_required",
message="Label 'version' has to be specified.",
description="Version of the image.",
reference_url="https://fedoraproject.org/wiki/Container:Guidelines#LABELS",
tags=["version", "label"],
label="version",
required=True,
value_regex=None)
from colin.checks.abstract.labels import LabelCheck
class VcsTypeLabelCheck(LabelCheck):
def __init__(self):
super(VcsTypeLabelCheck, self) \
.__init__(name="vcs-type_label",
message="Label 'vcs-type' has to be specified.",
description="The type of version control used by the container source."
"Generally one of git, hg, svn, bzr, cvs",
reference_url="https://github.com/projectatomic/ContainerApplicationGenericLabels",
tags=["vcs-type", "vcs", "label"],
label="vcs-type",
required=True,
value_regex=None)
from colin.checks.abstract.labels import LabelCheck
class ReleaseLabelCheck(LabelCheck):
def __init__(self):
super(ReleaseLabelCheck, self) \
.__init__(name="release_label",
message="Label 'release' has to be specified.",
description="Release Number for this version.",
reference_url="https://fedoraproject.org/wiki/Container:Guidelines#LABELS",
tags=["release", "label"],
label="release",
required=True,
value_regex=None)
from colin.checks.abstract.labels import LabelCheck
class VcsUrlLabelCheck(LabelCheck):
def __init__(self):
super(VcsUrlLabelCheck, self) \
.__init__(name="vcs-url_label",
message="Label 'vcs-url' has to be specified.",
description="URL of the version control repository.",
reference_url="https://github.com/projectatomic/ContainerApplicationGenericLabels",
tags=["vcs-url", "vcs", "label"],
label="vcs-url",
required=True,
value_regex=None)
from colin.checks.abstract.labels import LabelCheck
class UrlLabelCheck(LabelCheck):
def __init__(self):
super(UrlLabelCheck, self) \
.__init__(name="url_label",
message="Label 'url' has to be specified.",
description="A URL where the user can find more information about the image.",
reference_url="https://fedoraproject.org/wiki/Container:Guidelines#LABELS",
tags=["url", "label"],
label="url",
required=True,
value_regex=None)
from colin.checks.abstract.labels import LabelCheck
class ComRedhatComponentCheck(LabelCheck):
def __init__(self):
super(ComRedhatComponentCheck, self) \
.__init__(name="com_redhat_component_label_required",
message="Label 'com.redhat.component' has to be specified.",
description="The Bugzilla component name where bugs against this container should be reported by users.",
reference_url="https://fedoraproject.org/wiki/Container:Guidelines#LABELS",
tags=["com.redhat.component", "label"],
label="com.redhat.component",
required=True,
value_regex=None)
# TODO: Check the format
from colin.checks.abstract.labels import LabelCheck
class NameCheck(LabelCheck):
def __init__(self):
super(NameCheck, self) \
.__init__(name="name_label_required",
message="Label 'name' has to be specified.",
description="Name of the Image or Container.",
reference_url="https://fedoraproject.org/wiki/Container:Guidelines#LABELS",
tags=["name", "label"],
label="name",
required=True,
value_regex=None)