<Purpose>
    Connects to the nodes in the vesseldicts and adds them to the list
    of valid targets.

  <Arguments>
    vesseldicts:
        A list of vesseldicts obtained through
        SeattleClearinghouseClient calls.

  <Side Effects>
    All valid targets that the user can access on the specified nodes
    are added to the list of targets.

  <Exceptions>
    None

  <Returns>
    None

def _update_targets(vesseldicts, environment_dict):
  """
  <Purpose>
    Connects to the nodes in the vesseldicts and adds them to the list
    of valid targets.

  <Arguments>
    vesseldicts:
        A list of vesseldicts obtained through
        SeattleClearinghouseClient calls.

  <Side Effects>
    All valid targets that the user can access on the specified nodes
    are added to the list of targets.

  <Exceptions>
    None

  <Returns>
    None
  """
  # Compile a list of the nodes that we need to check
  nodelist = []
  for vesseldict in vesseldicts:
    nodeip_port = vesseldict['node_ip']+':'+str(vesseldict['node_port'])
    if not nodeip_port in nodelist:
      nodelist.append(nodeip_port)

  # we'll output a message about the new keys later...
  newidlist = []
  faillist = []

  # Clear the list so that the user doesn't target vessels acquired from
  # previous requests when targeting this group
  seash_global_variables.targets['acquired'] = []
  print nodelist

  # currently, if I browse more than once, I look up everything again...
  retdict = seash_helper.contact_targets(
    nodelist,
    seash_helper.browse_target,
    environment_dict['currentkeyname'],
    'acquired')

  # parse the output so we can print out something intelligible
  for nodename in retdict:
    if retdict[nodename][0]:
      newidlist = newidlist + retdict[nodename][1]
    else:
      faillist.append(nodename)

  seash_helper.print_vessel_errors(retdict)

  if len(newidlist) == 0:
    print "Could not add any new targets."
  else:
    print "Added targets: "+", ".join(newidlist)

  if len(seash_global_variables.targets['acquired']) > 0:
    num_targets = str(len(seash_global_variables.targets['acquired']))
    print "Added group 'acquired' with "+num_targets+" targets"