def terminate_instances(self, parameters, secret):
    parameters, secret = self.__validate_args(parameters, secret)

    if self.secret != secret:
      return self.__generate_response(False, self.REASON_BAD_SECRET)

    for param in self.TERMINATE_INSTANCES_REQUIRED_PARAMS:
      if not utils.has_parameter(param, parameters):
        return self.__generate_response(False, 'no ' + param)

    infrastructure = parameters[self.PARAM_INFRASTRUCTURE]
    agent = self.agent_factory.create_agent(infrastructure)
    try:
      agent.assert_required_parameters(parameters,
        BaseAgent.OPERATION_TERMINATE)
    except AgentConfigurationException as exception:
      return self.__generate_response(False, str(exception))

    if self.blocking:
      self.__kill_vms(agent, parameters)
    else:
      thread.start_new_thread(self.__kill_vms, (agent, parameters))
    return self.__generate_response(True, self.REASON_NONE)
Respond to the associated request
dataset/ETHPy150Open AppScale/appscale/InfrastructureManager/infrastructure_manager.py/InfrastructureManager.terminate_instances--crossover with--dataset/ETHPy150Open ioflo/ioflo/ioflo/aio/proto/exchanging.py/Exchangent.respond