Пример #1
0
 def _tpl_substitution_mappings(self):
     substitution_mappings = self.tpl.get(SUBSTITUION_MAPPINGS) or {}
     if not isinstance(substitution_mappings, dict):
         exception.ExceptionCollector.appendException(
             exception.TypeMismatchError(what=SUBSTITUION_MAPPINGS,
                                         type="dict"))
     return substitution_mappings
Пример #2
0
 def _tpl_relationship_templates(self):
     relationship_templates = self.tpl.get(RELATIONSHIP_TEMPLATES) or {}
     if not isinstance(relationship_templates, dict):
         exception.ExceptionCollector.appendException(
             exception.TypeMismatchError(what=RELATIONSHIP_TEMPLATES,
                                         type="dict"))
     return relationship_templates
Пример #3
0
 def _tpl_policies(self):
     policies = self.tpl.get(POLICIES) or []
     if not isinstance(policies, list):
         exception.ExceptionCollector.appendException(
             exception.TypeMismatchError(what=POLICIES, type="list"))
     return policies
Пример #4
0
 def _tpl_groups(self):
     groups = self.tpl.get(GROUPS) or {}
     if not isinstance(groups, dict):
         exception.ExceptionCollector.appendException(
             exception.TypeMismatchError(what=GROUPS, type="dict"))
     return groups
Пример #5
0
 def _tpl_outputs(self):
     outputs = self.tpl.get(OUTPUTS) or {}
     if not isinstance(outputs, dict):
         exception.ExceptionCollector.appendException(
             exception.TypeMismatchError(what=OUTPUTS, type="dict"))
     return outputs
Пример #6
0
 def _tpl_nodetemplates(self):
     nodetemplates = self.tpl.get(NODE_TEMPLATES)
     if nodetemplates and not isinstance(nodetemplates, dict):
         exception.ExceptionCollector.appendException(
             exception.TypeMismatchError(what=NODE_TEMPLATES, type="dict"))
     return nodetemplates
Пример #7
0
 def _tpl_inputs(self):
     inputs = self.tpl.get(INPUTS) or {}
     if not isinstance(inputs, dict):
         exception.ExceptionCollector.appendException(
             exception.TypeMismatchError(what=INPUTS, type="dict"))
     return inputs
Пример #8
0
 def _tpl_workflows(self):
     workflows = self.tpl.get(WORKFLOWS) or {}
     if not isinstance(workflows, dict):
         exception.ExceptionCollector.appendException(
             exception.TypeMismatchError(what=WORKFLOWS, type="dict"))
     return workflows