summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorDan Prince <dan.prince@rackspace.com>2011-08-16 15:04:27 +0000
committerTarmac <>2011-08-16 15:04:27 +0000
commit7e4d35db17a6d129fe9cbfd3d4ffaeb96fd1fc69 (patch)
tree2b2ad6d693f21efce6514d46e34514a383e5296f /nova
parent76eebe86f383989ab012b9ad8a5b6fc4bbfee4af (diff)
parent0801dee7b05463b40bf66ee5911c92ac5e4aabc8 (diff)
downloadnova-7e4d35db17a6d129fe9cbfd3d4ffaeb96fd1fc69.tar.gz
nova-7e4d35db17a6d129fe9cbfd3d4ffaeb96fd1fc69.tar.xz
nova-7e4d35db17a6d129fe9cbfd3d4ffaeb96fd1fc69.zip
Updated the EC2 metadata controller so that it returns the correct value for instance-type metadata.
Diffstat (limited to 'nova')
-rw-r--r--nova/api/ec2/cloud.py2
-rw-r--r--nova/tests/test_metadata.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 87bba58c3..9aebf92e3 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -305,7 +305,7 @@ class CloudController(object):
'hostname': hostname,
'instance-action': 'none',
'instance-id': ec2_id,
- 'instance-type': instance_ref['instance_type'],
+ 'instance-type': instance_ref['instance_type']['name'],
'local-hostname': hostname,
'local-ipv4': address,
'placement': {'availability-zone': availability_zone},
diff --git a/nova/tests/test_metadata.py b/nova/tests/test_metadata.py
index ad678714e..bfc7a6d44 100644
--- a/nova/tests/test_metadata.py
+++ b/nova/tests/test_metadata.py
@@ -39,7 +39,7 @@ class MetadataTestCase(test.TestCase):
'key_name': None,
'host': 'test',
'launch_index': 1,
- 'instance_type': 'm1.tiny',
+ 'instance_type': {'name': 'm1.tiny'},
'reservation_id': 'r-xxxxxxxx',
'user_data': '',
'image_ref': 7,