@is_connected
def register(self, managed_object):
    '\n        Register a managed object with a KMIP appliance.\n\n        Args:\n            managed_object (ManagedObject): A managed object to register. An\n                instantiatable subclass of ManagedObject from the Pie API.\n\n        Returns:\n            string: The uid of the newly registered managed object.\n\n        Raises:\n            ClientConnectionNotOpen: if the client connection is unusable\n            KmipOperationFailure: if the operation result is a failure\n            TypeError: if the input argument is invalid\n        '
    if (not isinstance(managed_object, pobjects.ManagedObject)):
        raise TypeError('managed object must be a Pie ManagedObject')
    object_attributes = list()
    if hasattr(managed_object, 'cryptographic_usage_masks'):
        if (managed_object.cryptographic_usage_masks is not None):
            mask_attribute = self.attribute_factory.create_attribute(enums.AttributeType.CRYPTOGRAPHIC_USAGE_MASK, managed_object.cryptographic_usage_masks)
            object_attributes.append(mask_attribute)
    if hasattr(managed_object, 'operation_policy_name'):
        if (managed_object.operation_policy_name is not None):
            opn_attribute = self.attribute_factory.create_attribute(enums.AttributeType.OPERATION_POLICY_NAME, managed_object.operation_policy_name)
            object_attributes.append(opn_attribute)
    template = cobjects.TemplateAttribute(attributes=object_attributes)
    object_type = managed_object.object_type
    secret = self.object_factory.convert(managed_object)
    result = self.proxy.register(object_type, template, secret)
    status = result.result_status.value
    if (status == enums.ResultStatus.SUCCESS):
        uid = result.uuid.value
        return uid
    else:
        reason = result.result_reason.value
        message = result.result_message.value
        raise exceptions.KmipOperationFailure(status, reason, message)
Register a managed object with a KMIP appliance.

Args:
    managed_object (ManagedObject): A managed object to register. An
        instantiatable subclass of ManagedObject from the Pie API.

Returns:
    string: The uid of the newly registered managed object.

Raises:
    ClientConnectionNotOpen: if the client connection is unusable
    KmipOperationFailure: if the operation result is a failure
    TypeError: if the input argument is invalid
@is_connected
def register(self, managed_object):
    '\n        Register a managed object with a KMIP appliance.\n\n        Args:\n            managed_object (ManagedObject): A managed object to register. An\n                instantiatable subclass of ManagedObject from the Pie API.\n\n        Returns:\n            string: The uid of the newly registered managed object.\n\n        Raises:\n            ClientConnectionNotOpen: if the client connection is unusable\n            KmipOperationFailure: if the operation result is a failure\n            TypeError: if the input argument is invalid\n        '
    if (not isinstance(managed_object, pobjects.ManagedObject)):
        raise TypeError('managed object must be a Pie ManagedObject')
    object_attributes = list()
    if hasattr(managed_object, 'cryptographic_usage_masks'):
        if (managed_object.cryptographic_usage_masks is not None):
            mask_attribute = self.attribute_factory.create_attribute(enums.AttributeType.CRYPTOGRAPHIC_USAGE_MASK, managed_object.cryptographic_usage_masks)
            object_attributes.append(mask_attribute)
    if hasattr(managed_object, 'operation_policy_name'):
        if (managed_object.operation_policy_name is not None):
            opn_attribute = self.attribute_factory.create_attribute(enums.AttributeType.OPERATION_POLICY_NAME, managed_object.operation_policy_name)
            object_attributes.append(opn_attribute)
    template = cobjects.TemplateAttribute(attributes=object_attributes)
    object_type = managed_object.object_type
    secret = self.object_factory.convert(managed_object)
    result = self.proxy.register(object_type, template, secret)
    status = result.result_status.value
    if (status == enums.ResultStatus.SUCCESS):
        uid = result.uuid.value
        return uid
    else:
        reason = result.result_reason.value
        message = result.result_message.value
        raise exceptions.KmipOperationFailure(status, reason, message)