def __init__(self, dir_path): """ Initialize a database object. """ assert self.is_dir_valid(dir_path) super().__init__( ScopedYAMLFile( Struct(required=dict(), optional=dict(suites=List(YAMLFile(Class(Suite))), trees=Dict(String()), arches=List(String()), host_types=Dict(Class(HostType)), host_type_regex=Regex(), recipesets=Dict(List(String()))))), dir_path + "/index.yaml") self.dir_path = dir_path if self.trees is None: self.trees = {} if self.arches is None: # TODO Switch to an empty list once database has these added self.arches = "x86_64 ppc64 ppc64le aarch64 s390x".split(" ") if self.suites is None: self.suites = []
def __init__(self, data): super().__init__( Struct(required=dict(name=String(), ), optional=dict( host_type_regex=Regex(), ignore_panic=Boolean(), specific=Boolean(), hostRequires=String(), partitions=String(), kickstart=String(), tasks=String(), )), data)
def __init__(self, data): """ Initialize a host type. """ super().__init__( Struct(optional=dict( ignore_panic=Boolean(), hostRequires=String(), partitions=String(), kickstart=String(), tasks=String(), )), data)
def __init__(self, data): super().__init__( Struct(required=dict(name=String(), ), optional=dict( host_type_regex=Regex(), ignore_panic=Boolean(), hostRequires=String(), partitions=String(), kickstart=String(), tasks=String(), match=Class(PositivePattern), dont_match=Class(NegativePattern), waived=Boolean(), role=String(), url_suffix=String(), task_params=Dict(String()), )), data) if self.match is None: self.match = PositivePattern({}) if self.dont_match is None: self.dont_match = NegativePattern({}) if self.task_params is None: self.task_params = {} if self.role is None: self.role = 'STANDALONE'
def __init__(self, data): super().__init__( StrictStruct(description=String(), version=String(), patterns=List( StrictStruct(pattern=Regex(), testcase_name=String())), cases=List( Struct(required=dict(name=String(), tasks=String()), optional=dict(hostRequires=String(), partitions=String(), kickstart=String())))), data)
def __init__(self, data): super().__init__( Struct(required=dict(description=String(), patterns=List( StrictStruct(pattern=Regex(), case_name=String())), cases=List(Class(Case))), optional=dict(host_type_regex=Regex(), tasks=String(), ignore_panic=Boolean(), specific=Boolean(), hostRequires=String(), partitions=String(), kickstart=String())), data)
def __init__(self, data): super().__init__( Struct(required=dict(description=String(), cases=List(Class(Case))), optional=dict(host_type_regex=Regex(), tasks=String(), ignore_panic=Boolean(), hostRequires=String(), partitions=String(), kickstart=String(), match=Class(PositivePattern), dont_match=Class(NegativePattern), url_suffix=String(), maintainers=NonEmptyList(String()))), data) if self.match is None: self.match = PositivePattern({}) if self.dont_match is None: self.dont_match = NegativePattern({})
def __init__(self, dir_path): """ Initialize a database object. """ assert self.is_dir_valid(dir_path) super().__init__( ScopedYAMLFile( Struct(required=dict(), optional=dict(suites=List(YAMLFile(Class(Suite))), trees=Dict(String()), specific=Boolean(), host_types=Dict(Class(HostType)), host_type_regex=Regex()))), dir_path + "/index.yaml") self.dir_path = dir_path if self.trees is None: self.trees = {} if self.suites is None: self.suites = []