From e2911439c1a82ca85b999d15a99c9a085544d86d Mon Sep 17 00:00:00 2001 From: Li Wei Date: Mon, 8 Aug 2016 16:23:20 +0800 Subject: [PATCH] Removing deprecated variable aliases from oslo_messaging This variable is deprecated.So we should drop it. Change-Id: I2bd4a8e0d3d9dde1f5afb0927c5abb14f33c6d34 --- glance/notifier.py | 8 +------- glance/tests/unit/test_notifier.py | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/glance/notifier.py b/glance/notifier.py index dac2adbd53..7f56572e1a 100644 --- a/glance/notifier.py +++ b/glance/notifier.py @@ -50,19 +50,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): diff --git a/glance/tests/unit/test_notifier.py b/glance/tests/unit/test_notifier.py index ec994abf09..d743dd4ad2 100644 --- a/glance/tests/unit/test_notifier.py +++ b/glance/tests/unit/test_notifier.py @@ -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')