From 0fa3f0e6da4e8f1d5d09e6797bb5eae806ece400 Mon Sep 17 00:00:00 2001 From: Thorsten Tarrach Date: Wed, 8 Aug 2012 15:13:21 +0200 Subject: Make TerminateInstances compatible with EC2 api fixes bug 1034377 Currently the XML response for TerminateInstances differs from the EC2 api specifications and causes the .net EC2 api from Amazon to crash. Change-Id: I14172318ed4dc2af16c45be376475885f474c545 --- nova/api/ec2/cloud.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/api') diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 5e85cd88a..5b7bdf4ea 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -921,10 +921,10 @@ class CloudController(object): try: internal_id = ec2utils.ec2_id_to_id(ec2_id) instance = self.compute_api.get(context, internal_id) - i['shutdownState'] = _state_description(instance['vm_state'], + i['currentState'] = _state_description(instance['vm_state'], instance['shutdown_terminate']) except exception.NotFound: - i['shutdownState'] = _state_description(vm_states.DELETED, + i['currentState'] = _state_description(vm_states.DELETED, True) instances_set.append(i) return {'instancesSet': instances_set} -- cgit