diff options
author | Dan Smith <danms@us.ibm.com> | 2013-03-08 13:45:45 -0500 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-03-09 17:17:07 +0000 |
commit | bd5a9b87a784135d9da808fec77e23b8f4d538d0 (patch) | |
tree | 6873d9c36706a70dfc5b46ab596daa330464c0d9 /nova/notifications.py | |
parent | 666ffe34aceef9d35528eae5ebafda19a9d43734 (diff) | |
download | nova-bd5a9b87a784135d9da808fec77e23b8f4d538d0.tar.gz nova-bd5a9b87a784135d9da808fec77e23b8f4d538d0.tar.xz nova-bd5a9b87a784135d9da808fec77e23b8f4d538d0.zip |
Remove uses of instance['instance_type'] from nova/notifications
This is one change in a series aimed at removing the use of instance-linked
instance_type objects, in favor of the decoupled type data in
system_metadata. See bug 1140119 for more details.
Change-Id: Iebbb0fa0bf306d6a7c8b83594e13a4b99f27c404
Diffstat (limited to 'nova/notifications.py')
-rw-r--r-- | nova/notifications.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/notifications.py b/nova/notifications.py index 16a49dcf6..ecd708d60 100644 --- a/nova/notifications.py +++ b/nova/notifications.py @@ -21,6 +21,7 @@ the system. from oslo.config import cfg +from nova.compute import instance_types import nova.context from nova import db from nova.image import glance @@ -283,7 +284,8 @@ def info_from_instance(context, instance_ref, network_info, image_ref_url = glance.generate_image_url(instance_ref['image_ref']) - instance_type_name = instance_ref.get('instance_type', {}).get('name', '') + instance_type = instance_types.extract_instance_type(instance_ref) + instance_type_name = instance_type.get('name', '') if system_metadata is None: system_metadata = utils.metadata_to_dict( |