def delete_role(name):
    """"
    Delete role with the provided name.
    """
    if name in SystemRole.get_valid_values():
        raise ValueError('System roles can\'t be deleted')

    role_db = Role.get(name=name)
    result = Role.delete(role_db)
    return result
dataset/ETHPy150Open StackStorm/st2/st2common/st2common/services/rbac.py/delete_role/original