Use new get_rpc_client API from oslo.messaging

Use the new API that is consistent with
the existing API instead of instantiating the client
class directly.

This was introduced in release 14.1.0 here [1] and
added into oslo.messaging here [2]

[1] https://review.opendev.org/c/openstack/requirements/+/869340
[2] https://review.opendev.org/c/openstack/oslo.messaging/+/862419

Change-Id: I671d04a62f7ce408534342e89542ecc78c59ecb7
This commit is contained in:
Tobias Urdin 2023-01-19 20:29:53 +00:00
parent f4e8f995b5
commit cc9b8b3d2d
2 changed files with 4 additions and 5 deletions

View File

@ -25,7 +25,7 @@ oslo.i18n>=5.0.0 # Apache-2.0
oslo.log>=4.2.0 # Apache-2.0 oslo.log>=4.2.0 # Apache-2.0
oslo.concurrency>=4.1.0 # Apache-2.0 oslo.concurrency>=4.1.0 # Apache-2.0
oslo.config>=8.1.0 # Apache-2.0 oslo.config>=8.1.0 # Apache-2.0
oslo.messaging>=12.2.0 # Apache-2.0 oslo.messaging>=14.1.0 # Apache-2.0
oslo.middleware>=4.1.0 # Apache-2.0 oslo.middleware>=4.1.0 # Apache-2.0
oslo.policy>=3.6.0 # Apache-2.0 oslo.policy>=3.6.0 # Apache-2.0
oslo.privsep>=2.2.0 # Apache-2.0 oslo.privsep>=2.2.0 # Apache-2.0

View File

@ -117,7 +117,6 @@ class ProfilerRequestContextSerializer(RequestContextSerializer):
def get_client(target, serializer=None, timeout=None): def get_client(target, serializer=None, timeout=None):
assert TRANSPORT is not None assert TRANSPORT is not None
return messaging.RPCClient(TRANSPORT, return messaging.get_rpc_client(
target, TRANSPORT, target, serializer=serializer,
serializer=serializer, timeout=timeout)
timeout=timeout)