From abea7d8f797675135b4419ff07491df4ecaed829 Mon Sep 17 00:00:00 2001 From: Brian Elliott Date: Wed, 30 May 2012 21:14:31 +0000 Subject: Fix instance update notification publisher id Fixes instance update notifications to follow the nova convention for publisher ids. The notification publisher id will now be of the format service.host (e.g. compute.somehostname). Change-Id: Ib5c4c962b9ac3e0bac90703b20465f99dfd047c0 --- nova/compute/api.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index 3fd358a34..a2627ae14 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -603,7 +603,7 @@ class API(base.Base): # send a state update notification for the initial create to # show it going from non-existent to BUILDING notifications.send_update_with_states(context, instance, None, - vm_states.BUILDING, None, None) + vm_states.BUILDING, None, None, service="api") for security_group_id in security_groups: self.db.instance_add_security_group(elevated, @@ -930,7 +930,8 @@ class API(base.Base): # if task or vm state changed old_ref, instance_ref = self.db.instance_update_and_get_original( context, instance["id"], kwargs) - notifications.send_update(context, old_ref, instance_ref) + notifications.send_update(context, old_ref, instance_ref, + service="api") return dict(instance_ref.iteritems()) @@ -1280,7 +1281,8 @@ class API(base.Base): context, instance_uuid, 'task_state', [None], task_state) notifications.send_update_with_states(context, instance, old_vm_state, - instance["vm_state"], old_task_state, instance["task_state"]) + instance["vm_state"], old_task_state, instance["task_state"], + service="api") properties = { 'instance_uuid': instance_uuid, -- cgit