<Purpose>
    Releases the specified vessels.

  <Arguments>
    input_dict:  The commanddict representing the user's input.
    environment_dict:  The dictionary representing the current seash
                       environment.

  <Side Effects>
    Connects to the Clearinghouse and releases vessels.
    Removes the released vessels from the list of valid targets.
    Does not guarantee that all vessels specified are released!

  <Exceptions>
    None

  <Returns>
    None

def release(input_dict, environment_dict):
  """
  <Purpose>
    Releases the specified vessels.

  <Arguments>
    input_dict:  The commanddict representing the user's input.
    environment_dict:  The dictionary representing the current seash
                       environment.

  <Side Effects>
    Connects to the Clearinghouse and releases vessels.
    Removes the released vessels from the list of valid targets.
    Does not guarantee that all vessels specified are released!

  <Exceptions>
    None

  <Returns>
    None
  """
  # Activate secure mode if user did not specify the insecure keyword
  allow_ssl_insecure = _get_user_argument(input_dict, 'insecure') is not None

  # Get the group name to release
  groupname = environment_dict['currenttarget']
  nodelist = seash_global_variables.targets[groupname]

  # Get the Clearinghouse vessel handles for each vessel
  retdict = seash_helper.contact_targets(nodelist, _get_clearinghouse_vessel_handle)

  clearinghouse_vesselhandles = []
  faillist = []
  # parse the output so we can print out something intelligible
  for nodename in retdict:

    if retdict[nodename][0]:
      clearinghouse_vesselhandles.append(retdict[nodename][1])
    else:
      faillist.append(nodename)

  # Release!
  client = _connect_to_clearinghouse(environment_dict['currentkeyname'],
    allow_ssl_insecure)
  client.release_resources(clearinghouse_vesselhandles)

  # Remove each vessel from the targets list
  removed_nodehandles = seash_global_variables.targets[groupname][:]
  for handle in removed_nodehandles:
    for target in seash_global_variables.targets:
      if handle in seash_global_variables.targets[target]:
        seash_global_variables.targets[target].remove(handle)