Use messaging notifications transport instead of default

The usage of oslo_messaging.get_transport is not meant for
notifications; And oslo_messaging.get_notification_transport is
favored for those means. So this change introduces the usage of that
function.

If the settings for the notifications are not set with the
configuration that's under the oslo_messaging_notifications group,
this will fall back to the old settings which are under the DEFAULT
group; just like this used to work.

Change-Id: Id1f89c89fa23d19e9229af7e80df179b6e17a635
This commit is contained in:
Juan Antonio Osorio Robles
2016-04-04 18:36:35 +03:00
parent 6f9f390981
commit 8b7bfb4cfc
+1 -1
View File
@@ -329,7 +329,7 @@ def _get_notifier():
if _notifier is None:
host = CONF.default_publisher_id or socket.gethostname()
try:
transport = oslo_messaging.get_transport(CONF)
transport = oslo_messaging.get_notification_transport(CONF)
_notifier = oslo_messaging.Notifier(transport,
"identity.%s" % host)
except Exception: