@transactional_session
def del_identity(identity, type, session=None):
    '\n    Deletes a user identity.\n\n    :param identity: The identity key name. For example x509 DN, or a username.\n    :param type: The type of the authentication (x509, gss, userpass, saml).\n    :param session: The database session in use.\n    '
    id = session.query(models.Identity).filter_by(identity=identity, identity_type=type).first()
    if (id is None):
        raise exception.IdentityError(("Identity ('%s','%s') does not exist!" % (identity, type)))
    id.delete(session=session)
Deletes a user identity.

:param identity: The identity key name. For example x509 DN, or a username.
:param type: The type of the authentication (x509, gss, userpass, saml).
:param session: The database session in use.
@transactional_session
def del_identity(identity, type, session=None):
    '\n    Deletes a user identity.\n\n    :param identity: The identity key name. For example x509 DN, or a username.\n    :param type: The type of the authentication (x509, gss, userpass, saml).\n    :param session: The database session in use.\n    '
    id = session.query(models.Identity).filter_by(identity=identity, identity_type=type).first()
    if (id is None):
        raise exception.IdentityError(("Identity ('%s','%s') does not exist!" % (identity, type)))
    id.delete(session=session)