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: Ibc2147fb08beae7a2190b9860e3342150c43dfab
This commit is contained in:
Tobias Urdin 2023-01-19 20:36:37 +00:00
parent 41bf7dd319
commit 31b1959620
2 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ def get_client(target, version_cap=None, serializer=None):
if serializer is None:
serializer = DesignateObjectSerializer()
serializer = RequestContextSerializer(serializer)
return messaging.RPCClient(
return messaging.get_rpc_client(
TRANSPORT,
target,
version_cap=version_cap,

View File

@ -15,7 +15,7 @@ keystoneauth1>=3.4.0 # Apache-2.0
keystonemiddleware>=4.17.0 # Apache-2.0
oslo.config>=6.8.0 # Apache-2.0
oslo.concurrency>=4.2.0 # Apache-2.0
oslo.messaging>=12.4.0 # Apache-2.0
oslo.messaging>=14.1.0 # Apache-2.0
oslo.middleware>=3.31.0 # Apache-2.0
oslo.log>=4.3.0 # Apache-2.0
oslo.reports>=1.18.0 # Apache-2.0