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 Nova landed 3 months+ ago, so we can proceed ripping
those aliases from the code base.

[1] I314cefa5fb1803fa7e21e3e34300e5ced31bba89

Change-Id: Id8c0bc6733e930803b8e9fcf42a9a1f81dcbb356
Closes-Bug: #1424728
This commit is contained in:
ChangBo Guo(gcb)
2017-03-17 20:41:16 +08:00
parent abb33a4577
commit 05c50f2479
5 changed files with 9 additions and 29 deletions

View File

@@ -23,7 +23,6 @@ __all__ = [
'get_client',
'get_server',
'get_notifier',
'TRANSPORT_ALIASES',
]
import functools
@@ -57,25 +56,13 @@ ALLOWED_EXMODS = [
]
EXTRA_EXMODS = []
# NOTE(markmc): The nova.openstack.common.rpc entries are for backwards compat
# with Havana rpc_backend configuration values. The nova.rpc entries are for
# compat with Essex values.
TRANSPORT_ALIASES = {
'nova.openstack.common.rpc.impl_kombu': 'rabbit',
'nova.openstack.common.rpc.impl_qpid': 'qpid',
'nova.openstack.common.rpc.impl_zmq': 'zmq',
'nova.rpc.impl_kombu': 'rabbit',
'nova.rpc.impl_qpid': 'qpid',
'nova.rpc.impl_zmq': 'zmq',
}
def init(conf):
global TRANSPORT, NOTIFICATION_TRANSPORT, LEGACY_NOTIFIER, NOTIFIER
exmods = get_allowed_exmods()
TRANSPORT = create_transport(get_transport_url())
NOTIFICATION_TRANSPORT = messaging.get_notification_transport(
conf, allowed_remote_exmods=exmods, aliases=TRANSPORT_ALIASES)
conf, allowed_remote_exmods=exmods)
serializer = RequestContextSerializer(JsonPayloadSerializer())
if conf.notifications.notification_format == 'unversioned':
LEGACY_NOTIFIER = messaging.Notifier(NOTIFICATION_TRANSPORT,
@@ -182,7 +169,7 @@ class ProfilerRequestContextSerializer(RequestContextSerializer):
def get_transport_url(url_str=None):
return messaging.TransportURL.parse(CONF, url_str, TRANSPORT_ALIASES)
return messaging.TransportURL.parse(CONF, url_str)
def get_client(target, version_cap=None, serializer=None):
@@ -232,8 +219,7 @@ def create_transport(url):
exmods = get_allowed_exmods()
return messaging.get_transport(CONF,
url=url,
allowed_remote_exmods=exmods,
aliases=TRANSPORT_ALIASES)
allowed_remote_exmods=exmods)
class LegacyValidatingNotifier(object):