summaryrefslogtreecommitdiff
path: root/nova/notifications/base.py
diff options
context:
space:
mode:
authorKevin_Zheng <zhengzhenyu@huawei.com>2018-03-15 17:21:50 +0800
committerMatt Riedemann <mriedem.os@gmail.com>2018-04-19 13:06:59 -0400
commit94de8d75ff08bfc63d0d4a68083783b2a878508d (patch)
treef23c935fe5645c0894b2dee235e2df9569c74851 /nova/notifications/base.py
parent586a18ab32940b9137cc5c7cebd785918944e0de (diff)
downloadnova-94de8d75ff08bfc63d0d4a68083783b2a878508d.tar.gz
Add request_id to instance action notifications
As it was agreed on the Rocky PTG [1] it is useful to have the request_id of in the payload of every instance action versioned notification. For example it could help the deployer connect the state change described in the notification with the user action, the request, on the REST API. So this patch proposes to extend the InstanceActionPayload versioned object with a new request_id field and populate the request_id from the context object used for emitting the instance action notifications. [1] https://etherpad.openstack.org/p/nova-ptg-rocky L391 Implements: bp add-request-id-to-instance-action-notifications Change-Id: I7243b60938d6e9c7c2bc2aacdba5c667cca8ec9b
Diffstat (limited to 'nova/notifications/base.py')
-rw-r--r--nova/notifications/base.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/nova/notifications/base.py b/nova/notifications/base.py
index 14606cf581..d18deed450 100644
--- a/nova/notifications/base.py
+++ b/nova/notifications/base.py
@@ -263,6 +263,7 @@ def _send_versioned_instance_update(context, instance, payload, host, service):
for label, bw in payload['bandwidth'].items()]
versioned_payload = instance_notification.InstanceUpdatePayload(
+ context=context,
instance=instance,
state_update=state_update,
audit_period=audit_period,