Remove usage of oslo.messaging deprecated transport method.

Since few months oslo.messaging project have deprecated
the get_transport method from the transport layer module.

Move get_transport to get_rpc_transport.

https://bugs.launchpad.net/cloud-archive/+bug/1714945

Related-Bug: #1714945

Change-Id: I66ed75902d43ae530328950cfbd06a9e8ea2d0f8
This commit is contained in:
Hervé Beraud 2019-01-23 10:13:36 +01:00
parent 840c54f0d3
commit a8d4b58a65
1 changed files with 1 additions and 2 deletions

View File

@ -64,8 +64,7 @@ def get_transport(url=None, optional=False, cache=True):
transport = TRANSPORTS.get(cache_key)
if not transport or not cache:
try:
transport = oslo_messaging.get_transport(cfg.CONF, url,
aliases=_ALIASES)
transport = oslo_messaging.get_rpc_transport(cfg.CONF, url)
except oslo_messaging.InvalidTransportURL as e:
if not optional or e.url:
# NOTE(sileht): olso.messaging is configured but unloadable