Update the ec2 get_metadata handler so it works with the most recent version of the compute API get_all call which now returns a list if there is only a single record.

This commit is contained in:
Dan Prince
2011-06-30 13:25:41 +00:00
committed by Tarmac

View File

@@ -152,7 +152,7 @@ class CloudController(object):
# This ensures that all attributes of the instance
# are populated.
instance_ref = db.instance_get(ctxt, instance_ref['id'])
instance_ref = db.instance_get(ctxt, instance_ref[0]['id'])
mpi = self._get_mpi_data(ctxt, instance_ref['project_id'])
if instance_ref['key_name']: