@classmethod
  def terminate_cloud_instance(cls, instance_id, options):
    AppScaleLogger.log("About to terminate instance {0}"
      .format(instance_id))
    agent = InfrastructureAgentFactory.create_agent(options.infrastructure)
    params = agent.get_params_from_args(options)
    params['IS_VERBOSE'] = options.verbose
    params[agent.PARAM_INSTANCE_IDS] = [instance_id]
    agent.terminate_instances(params)
    agent.cleanup_state(params)
    os.remove(LocalState.get_secret_key_location(options.keyname))
Constructs and returns a validator from a specification object.
dataset/ETHPy150Open AppScale/appscale-tools/lib/remote_helper.py/RemoteHelper.terminate_cloud_instance--crossover with--dataset/ETHPy150Open openstack/sahara/sahara/plugins/images.py/SaharaImageValidatorBase.from_spec