diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-05-31 00:13:15 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-05-31 00:13:15 +0000 |
| commit | 709681e7a406a8f06b07c21a1cdceecd60dcadd8 (patch) | |
| tree | 1c6308ef18268baab984fa2097db3ecb99aae57e /nova/compute | |
| parent | fd06062905c2ab51b847632e5658d6439e896834 (diff) | |
| parent | 31bf321cf11783ebd1b7233bd752d23f3883101b (diff) | |
Merge "Record instance architecture types."
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 6 |
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): |
