summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-05-31 00:13:15 +0000
committerGerrit Code Review <review@openstack.org>2012-05-31 00:13:15 +0000
commit709681e7a406a8f06b07c21a1cdceecd60dcadd8 (patch)
tree1c6308ef18268baab984fa2097db3ecb99aae57e /nova/compute
parentfd06062905c2ab51b847632e5658d6439e896834 (diff)
parent31bf321cf11783ebd1b7233bd752d23f3883101b (diff)
Merge "Record instance architecture types."
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/api.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index 3fd358a34..3990a9596 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -387,6 +387,9 @@ class API(base.Base):
if reservation_id is None:
reservation_id = utils.generate_uid('r')
+ # grab the architecture from glance
+ architecture = image['properties'].get('architecture', 'Unknown')
+
root_device_name = block_device.properties_root_device_name(
image['properties'])
@@ -421,6 +424,7 @@ class API(base.Base):
'access_ip_v6': access_ip_v6,
'availability_zone': availability_zone,
'root_device_name': root_device_name,
+ 'architecture': architecture,
'progress': 0}
options_from_image = self._inherit_properties_from_image(
@@ -636,6 +640,8 @@ class API(base.Base):
updates['vm_state'] = vm_states.BUILDING
updates['task_state'] = task_states.SCHEDULING
+ updates['architecture'] = image['properties'].get('architecture')
+
if (image['properties'].get('mappings', []) or
image['properties'].get('block_device_mapping', []) or
block_device_mapping):