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.

Closes-Bug: #1567231

Change-Id: I137d0f98533d8121334e8538d321fb6c7495f35f
This commit is contained in:
Juan Antonio Osorio Robles 2016-04-01 08:51:54 +03:00
parent b9de463ee8
commit a31b963c1b
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ def set_defaults(control_exchange='glance'):
def get_transport():
return oslo_messaging.get_transport(CONF, aliases=_ALIASES)
return oslo_messaging.get_notification_transport(CONF, aliases=_ALIASES)
class Notifier(object):

View File

@ -116,7 +116,7 @@ class TaskRepoStub(object):
class TestNotifier(utils.BaseTestCase):
@mock.patch.object(oslo_messaging, 'Notifier')
@mock.patch.object(oslo_messaging, 'get_transport')
@mock.patch.object(oslo_messaging, 'get_notification_transport')
def _test_load_strategy(self,
mock_get_transport, mock_notifier,
url, driver):