Remove old oslo.messaging transport aliases

Those are remnants from the oslo-incubator times. Also, oslo.messaging
deprecated [1] transport aliases since 5.2.0+ that is the minimal
version supported for stable/newton. The patch that bumped the minimal
version for Neutron landed 3 months+ ago, so we can proceed ripping
those aliases from the code base.

[1] I314cefa5fb1803fa7e21e3e34300e5ced31bba89

Change-Id: I9e66140ad0b10c50e216c78e4914c98313cada05
Closes-Bug: #1424728
changes/28/380328/2
Ihar Hrachyshka 6 years ago
parent ecd43d2e38
commit 8ad62fe751
  1. 16
      neutron/common/rpc.py
  2. 6
      neutron/tests/unit/common/test_rpc.py

@ -46,17 +46,6 @@ ALLOWED_EXMODS = [
EXTRA_EXMODS = []
TRANSPORT_ALIASES = {
'neutron.openstack.common.rpc.impl_fake': 'fake',
'neutron.openstack.common.rpc.impl_qpid': 'qpid',
'neutron.openstack.common.rpc.impl_kombu': 'rabbit',
'neutron.openstack.common.rpc.impl_zmq': 'zmq',
'neutron.rpc.impl_fake': 'fake',
'neutron.rpc.impl_qpid': 'qpid',
'neutron.rpc.impl_kombu': 'rabbit',
'neutron.rpc.impl_zmq': 'zmq',
}
# NOTE(salv-orlando): I am afraid this is a global variable. While not ideal,
# they're however widely used throughout the code base. It should be set to
# true if the RPC server is not running in the current process space. This
@ -68,10 +57,9 @@ def init(conf):
global TRANSPORT, NOTIFICATION_TRANSPORT, NOTIFIER
exmods = get_allowed_exmods()
TRANSPORT = oslo_messaging.get_transport(conf,
allowed_remote_exmods=exmods,
aliases=TRANSPORT_ALIASES)
allowed_remote_exmods=exmods)
NOTIFICATION_TRANSPORT = oslo_messaging.get_notification_transport(
conf, allowed_remote_exmods=exmods, aliases=TRANSPORT_ALIASES)
conf, allowed_remote_exmods=exmods)
serializer = RequestContextSerializer()
NOTIFIER = oslo_messaging.Notifier(NOTIFICATION_TRANSPORT,
serializer=serializer)

@ -74,11 +74,9 @@ class TestRPC(base.DietTestCase):
rpc.init(conf)
mock_exmods.assert_called_once_with()
mock_trans.assert_called_once_with(conf, allowed_remote_exmods=['foo'],
aliases=rpc.TRANSPORT_ALIASES)
mock_trans.assert_called_once_with(conf, allowed_remote_exmods=['foo'])
mock_noti_trans.assert_called_once_with(conf,
allowed_remote_exmods=['foo'],
aliases=rpc.TRANSPORT_ALIASES)
allowed_remote_exmods=['foo'])
mock_not.assert_called_once_with(noti_transport,
serializer=serializer)
self.assertIsNotNone(rpc.TRANSPORT)

Loading…
Cancel
Save