

def terminate_instances(self, parameters):
    "\n    Terminate one of more EC2 instances. The input instance IDs are\n    fetched from the 'instance_ids' parameters in the input map. (Also\n    see documentation for the BaseAgent class)\n\n    Args:\n      parameters: A dictionary of parameters.\n    "
    instance_ids = self[self.PARAM_INSTANCE_IDS]
    conn = self.open_connection(parameters)
    conn.terminate_instances(instance_ids)
    AppScaleLogger.log(('Terminating instances: ' + ' '.join(instance_ids)))
    if (not self.wait_for_status_change(parameters, conn, 'terminated', max_wait_time=120)):
        AppScaleLogger.log(('re-terminating instances: ' + ' '.join(instance_ids)))
        conn.terminate_instances(instance_ids)
        if (not self.wait_for_status_change(parameters, conn, 'terminated', max_wait_time=120)):
            self.handle_failure(('ERROR: could not terminate instances: ' + ' '.join(instance_ids)))
    AppScaleLogger.log(('Removing terminated instances: ' + ' '.join(instance_ids)))
    conn.terminate_instances(instance_ids)

dataset/ETHPy150Open AppScale/appscale-tools/lib/agents/ec2_agent.py EC2Agent.terminate_instances/VarMisuse@16/113 `parameters`->`self`