nova: use RequestContextSerializer for notifications

RequestContext should be serialized when sent via oslo.messaging. The
serializer is correctly used for the general RPC mechanism, but has been
forgotten in the notifier. This patch fixes that.

Change-Id: I56fa8022e34c0e80835e3bde940fda99ed0f9ba8
Closes-Bug: #1275771
This commit is contained in:
Julien Danjou 2014-02-06 15:14:51 +01:00
parent 357ec96502
commit 05f688e49f
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ def init(conf):
TRANSPORT = messaging.get_transport(conf,
allowed_remote_exmods=exmods,
aliases=TRANSPORT_ALIASES)
NOTIFIER = messaging.Notifier(TRANSPORT)
NOTIFIER = messaging.Notifier(TRANSPORT,
serializer=RequestContextSerializer(None))
def cleanup():