summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorSoren Hansen <soren@linux2go.dk>2011-04-12 07:54:19 +0000
committerTarmac <>2011-04-12 07:54:19 +0000
commitaebcd4abd574b2edb8f2919cb4c2a77617eb97e9 (patch)
tree8b2d415296085b3b7be48c546e72e5ced690679e /nova
parent8b54c186a7475cb800ac0de81be3478bc795d095 (diff)
parent07c1f30225fb27cbc8e7cfeebc6a73ec67a7f2e5 (diff)
downloadnova-aebcd4abd574b2edb8f2919cb4c2a77617eb97e9.tar.gz
nova-aebcd4abd574b2edb8f2919cb4c2a77617eb97e9.tar.xz
nova-aebcd4abd574b2edb8f2919cb4c2a77617eb97e9.zip
Replace instance ref from compute.api.get_all with one from instance_get. This should ensure it gets fully populated with all the relevant attributes.
Diffstat (limited to 'nova')
-rw-r--r--nova/api/ec2/cloud.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 651ec47f9..5e81878c4 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -142,6 +142,11 @@ class CloudController(object):
instance_ref = self.compute_api.get_all(ctxt, fixed_ip=address)
if instance_ref is None:
return None
+
+ # This ensures that all attributes of the instance
+ # are populated.
+ instance_ref = db.instance_get(ctxt, instance_ref['id'])
+
mpi = self._get_mpi_data(ctxt, instance_ref['project_id'])
if instance_ref['key_name']:
keys = {'0': {'_name': instance_ref['key_name'],