Return a list of all nodes

def list_nodes():
    """ Return a list of all nodes """
    token = session.get('token')
    node = nago.core.get_node(token)
    if not node.get('access') == 'master':
        return jsonify(status='error', error="You need master access to view this page")

    nodes = nago.core.get_nodes().values()
    return render_template('nodes.html', **locals())