Return a list of minions

def get_minions():
    '''
    Return a list of minions
    '''
    query = '''SELECT DISTINCT minion_id
               FROM {keyspace}.minions;'''.format(keyspace=_get_keyspace())

    ret = []

    # cassandra_cql.cql_query may raise a CommandExecutionError
    try:
        data = __salt__['cassandra_cql.cql_query'](query)
        if data:
            for row in data:
                minion = row.get('minion_id')
                if minion:
                    ret.append(minion)
    except CommandExecutionError:
        log.critical('Could not get the list of minions.')
        raise
    except Exception as e:
        log.critical(
            'Unexpected error while getting list of minions: %s', e)
        raise

    return ret