Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
    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 = []