kmip/services/server/engine.py
def _set_attributes_on_managed_object(self, managed_object, attributes):
        """
        Given a kmip.pie object and a dictionary of attributes, attempt to set
        the attribute values on the object.
        """
        for attribute_name, attribute_value in six.iteritems(attributes):
            object_type = managed_object._object_type
            if self._attribute_policy.is_attribute_applicable_to_object_type(
                    attribute_name,
                    object_type):
                self._set_attribute_on_managed_object(
                    managed_object,
                    (attribute_name, attribute_value)
                )
            else:
                name = object_type.name
                raise exceptions.InvalidField(
                    "Cannot set {0} attribute on {1} object.".format(
                        attribute_name,
                        ''.join([x.capitalize() for x in name.split('_')])
                    )
                )
def _set_attributes_on_managed_object(self, managed_object, attributes):
        for attribute_name, attribute_value in six.iteritems(attributes):
            object_type = managed_object._object_type
            if self._attribute_policy.is_attribute_applicable_to_object_type(
                    attribute_name,
                    object_type):
                self._set_attribute_on_managed_object(
                    managed_object,
                    (attribute_name, attribute_value)
                )
            else:
                name = object_type.name
                raise exceptions.InvalidField(
                    "Cannot set {0} attribute on {1} object.".format(
                        attribute_name,
                        ''.join([x.capitalize() for x in name.split('_')])
                    )
                )
def _set_attributes_on_managed_object ( self , managed_object , attributes ) : for attribute_name , attribute_value in six . iteritems ( attributes ) : object_type = managed_object . _object_type if self . _attribute_policy . is_attribute_applicable_to_object_type ( attribute_name , object_type ) : self . _set_attribute_on_managed_object ( managed_object , ( attribute_name , attribute_value ) ) else : name = object_type . name raise exceptions . InvalidField ( "Cannot set {0} attribute on {1} object." . format ( attribute_name , '' . join ( [ x . capitalize ( ) for x in name . split ( '_' ) ] ) ) )
Given a kmip.pie object and a dictionary of attributes, attempt to set
        the attribute values on the object.
Given a kmip . pie object and a dictionary of attributes attempt to set the attribute values on the object .