kmip/core/enums.py
def convert_attribute_tag_to_name(value):
    """
    A utility function that converts an attribute tag into the corresponding
    attribute name string.

    For example: enums.Tags.STATE -> 'State'

    Args:
        value (enum): The Tags enumeration value of the attribute.

    Returns:
        string: The attribute name string that corresponds to the attribute
            tag.

    Raises:
        ValueError: if the attribute tag is not a Tags enumeration or if it
            is unrecognized attribute tag
    """
    if not isinstance(value, Tags):
        raise ValueError("The attribute tag must be a Tags enumeration.")

    for entry in attribute_name_tag_table:
        if value == entry[1]:
            return entry[0]

    raise ValueError("Unrecognized attribute tag: {}".format(value))
def convert_attribute_tag_to_name(value):
    if not isinstance(value, Tags):
        raise ValueError("The attribute tag must be a Tags enumeration.")

    for entry in attribute_name_tag_table:
        if value == entry[1]:
            return entry[0]

    raise ValueError("Unrecognized attribute tag: {}".format(value))
def convert_attribute_tag_to_name ( value ) : if not isinstance ( value , Tags ) : raise ValueError ( "The attribute tag must be a Tags enumeration." ) for entry in attribute_name_tag_table : if value == entry [ 1 ] : return entry [ 0 ] raise ValueError ( "Unrecognized attribute tag: {}" . format ( value ) )
A utility function that converts an attribute tag into the corresponding
    attribute name string.

    For example: enums.Tags.STATE -> 'State'

    Args:
        value (enum): The Tags enumeration value of the attribute.

    Returns:
        string: The attribute name string that corresponds to the attribute
            tag.

    Raises:
        ValueError: if the attribute tag is not a Tags enumeration or if it
            is unrecognized attribute tag
A utility function that converts an attribute tag into the corresponding attribute name string .