Merge "Removing deprecated variable aliases from oslo_messaging"

This commit is contained in:
Jenkins 2016-08-25 06:18:22 +00:00 committed by Gerrit Code Review
commit 4fa2344f53
2 changed files with 2 additions and 9 deletions

View File

@ -86,19 +86,13 @@ CONF.register_opts(notifier_opts)
LOG = logging.getLogger(__name__)
_ALIASES = {
'glance.openstack.common.rpc.impl_kombu': 'rabbit',
'glance.openstack.common.rpc.impl_qpid': 'qpid',
'glance.openstack.common.rpc.impl_zmq': 'zmq',
}
def set_defaults(control_exchange='glance'):
oslo_messaging.set_transport_defaults(control_exchange)
def get_transport():
return oslo_messaging.get_notification_transport(CONF, aliases=_ALIASES)
return oslo_messaging.get_notification_transport(CONF)
class Notifier(object):

View File

@ -121,8 +121,7 @@ class TestNotifier(utils.BaseTestCase):
mock_get_transport, mock_notifier,
url, driver):
nfier = notifier.Notifier()
mock_get_transport.assert_called_with(cfg.CONF,
aliases=notifier._ALIASES)
mock_get_transport.assert_called_with(cfg.CONF)
self.assertIsNotNone(nfier._transport)
mock_notifier.assert_called_with(nfier._transport,
publisher_id='image.localhost')