summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorSoren Hansen <soren@linux2go.dk>2011-04-11 16:18:18 +0200
committerSoren Hansen <soren@linux2go.dk>2011-04-11 16:18:18 +0200
commit5752838917237e7b86a64117f46c71d1c2a356f3 (patch)
tree1844abe8eaeec04593b086b82658c97a97897a36 /nova/api
parent25047dd2a121ea9c8e7a8ded970aa5a7254bbfc5 (diff)
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/api')
-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..83c894bea 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'],