def update_nodes!(nodes)
      @node_names.each do |node_name|
        # find out if the node is already in the array
        found = nodes.index { |n| n['name'] == node_name }
        if found.nil?
          nodes.push(node_export(node_name))
        else
          nodes[found] = node_export(node_name)
        end
      end
    end
def update_nodes!(nodes)
      @node_names.each do |node_name|
        # find out if the node is already in the array
        found = nodes.index { |n| n['name'] == node_name }
        if found.nil?
          nodes.push(node_export(node_name))
        else
          nodes[found] = node_export(node_name)
        end
      end
    end
put node details in node array, overwriting existing details