@classmethod
  def terminate_virtualized_cluster(cls, keyname, is_verbose):
    AppScaleLogger.log("Terminating instances in a virtualized cluster with " +
      "keyname {0}".format(keyname))
    time.sleep(2)

    shadow_host = LocalState.get_host_with_role(keyname, 'shadow')
    acc = AppControllerClient(shadow_host, LocalState.get_secret_key(keyname))

    try:
      all_ips = acc.get_all_public_ips()
    except Exception as exception:
      AppScaleLogger.warn('Saw Exception while getting deployments IPs {0}' \
        .format(str(exception)))
      all_ips = LocalState.get_all_public_ips(keyname)

    threads = []
    for ip in all_ips:
      thread = threading.Thread(target=cls.stop_remote_appcontroller, args=(ip,
        keyname, is_verbose))
      thread.start()
      threads.append(thread)

    for thread in threads:
      thread.join()

    boxes_shut_down = 0
    is_running_regex = re.compile("appscale-controller stop")
    for ip in all_ips:
      AppScaleLogger.log("Shutting down AppScale API services at {0}".format(
        ip))
      while True:
        remote_output = cls.ssh(ip, keyname, 'ps x', is_verbose)
        AppScaleLogger.verbose(remote_output, is_verbose)
        if not is_running_regex.match(remote_output):
          break
        time.sleep(0.3)
      boxes_shut_down += 1

    if boxes_shut_down != len(all_ips):
      raise AppScaleException("Couldn't terminate your AppScale deployment " + \
        "on all machines - please do so manually.")

    AppScaleLogger.log("Terminated AppScale on {0} machines."
      .format(boxes_shut_down))
Tests wildcard subd*r/obj name.
dataset/ETHPy150Open AppScale/appscale-tools/lib/remote_helper.py/RemoteHelper.terminate_virtualized_cluster--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/tests/test_wildcard_iterator.py/CloudWildcardIteratorTests.testWildcardUpToFinalCharSubdirPlusObjectName