def parse(self, policy_types): policy_type = policy_types[self.sibling(GroupPolicyType).value] policy_type_properties = policy_type.get('properties', {}) return utils.merge_schema_and_instance_properties( self.initial_value or {}, policy_type_properties, "{0} '{1}' property is not part of " "the policy type properties schema", "{0} does not provide a value for mandatory " "'{1}' property which is " "part of its policy type schema", node_name="group '{0}', policy '{1}'".format( self.ancestor(Group).name, self.ancestor(GroupPolicy).name))
def parse(self, policy_types, data_types): policy_type = policy_types[self.sibling(GroupPolicyType).value] policy_type_properties = policy_type.get('properties', {}) return utils.merge_schema_and_instance_properties( self.initial_value or {}, policy_type_properties, data_types, "{0} '{1}' property is not part of " "the policy type properties schema", "{0} does not provide a value for mandatory " "'{1}' property which is " "part of its policy type schema", node_name="group '{0}', policy '{1}'".format( self.ancestor(Group).name, self.ancestor(GroupPolicy).name))
def parse(self, node_types, data_types): properties = self.initial_value or {} node_type_name = self.sibling(NodeTemplateType).value node_type = node_types[node_type_name] return utils.merge_schema_and_instance_properties( instance_properties=properties, schema_properties=node_type['properties'], data_types=data_types, undefined_property_error_message=( "'{0}' node '{1}' property is not part of the derived" " type properties schema"), missing_property_error_message=("'{0}' node does not provide a " "value for mandatory " "'{1}' property which is " "part of its type schema"), node_name=self.ancestor(NodeTemplate).name)
def parse(self, node_types): properties = self.initial_value or {} node_type_name = self.sibling(NodeTemplateType).value node_type = node_types[node_type_name] return utils.merge_schema_and_instance_properties( instance_properties=properties, schema_properties=node_type['properties'], undefined_property_error_message=( "'{0}' node '{1}' property is not part of the derived" " type properties schema"), missing_property_error_message=( "'{0}' node does not provide a " "value for mandatory " "'{1}' property which is " "part of its type schema"), node_name=self.ancestor(NodeTemplate).name)
def parse(self, relationships): relationship_type_name = self.sibling( NodeTemplateRelationshipType).value properties = self.initial_value or {} return utils.merge_schema_and_instance_properties( instance_properties=properties, schema_properties=relationships[relationship_type_name][ 'properties'], undefined_property_error_message=( "'{0}' node relationship '{1}' property is not part of " "the derived relationship type properties schema"), missing_property_error_message=( "'{0}' node relationship does not provide a " "value for mandatory " "'{1}' property which is " 'part of its relationship type schema'), node_name=self.ancestor(NodeTemplate).name)
def parse(self, relationships, data_types): relationship_type_name = self.sibling( NodeTemplateRelationshipType).value properties = self.initial_value or {} return utils.merge_schema_and_instance_properties( instance_properties=properties, schema_properties=relationships[relationship_type_name] ['properties'], data_types=data_types, undefined_property_error_message=( "'{0}' node relationship '{1}' property is not part of " "the derived relationship type properties schema"), missing_property_error_message=( "'{0}' node relationship does not provide a " "value for mandatory " "'{1}' property which is " 'part of its relationship type schema'), node_name=self.ancestor(NodeTemplate).name)