kmip/services/server/policy.py
def is_attribute_applicable_to_object_type(self, attribute, object_type):
        """
        Check if the attribute is supported by the given object type.

        Args:
            attribute (string): The name of the attribute (e.g., 'Name').
                Required.
            object_type (ObjectType): An ObjectType enumeration
                (e.g., ObjectType.SYMMETRIC_KEY). Required.
        Returns:
            bool: True if the attribute is applicable to the object type.
                False otherwise.
        """
        # TODO (peterhamilton) Handle applicability between certificate types
        rule_set = self._attribute_rule_sets.get(attribute)
        if object_type in rule_set.applies_to_object_types:
            return True
        else:
            return False
def is_attribute_applicable_to_object_type(self, attribute, object_type):
        """
        Check if the attribute is supported by the given object type.

        Args:
            attribute (string): The name of the attribute (e.g., 'Name').
                Required.
            object_type (ObjectType): An ObjectType enumeration
                (e.g., ObjectType.SYMMETRIC_KEY). Required.
        Returns:
            bool: True if the attribute is applicable to the object type.
                False otherwise.
        """
        # TODO (peterhamilton) Handle applicability between certificate types
        rule_set = self._attribute_rule_sets.get(attribute)
        if object_type in rule_set.applies_to_object_types:
            return True
        else:
            return False
Check if the attribute is supported by the given object type.

        Args:
            attribute (string): The name of the attribute (e.g., 'Name').
                Required.
            object_type (ObjectType): An ObjectType enumeration
                (e.g., ObjectType.SYMMETRIC_KEY). Required.
        Returns:
            bool: True if the attribute is applicable to the object type.
                False otherwise.