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: I2aea1d4fb59e7440586d8d9cd27bc61d29f4530c
This commit is contained in:
Tobias Urdin 2023-01-19 20:31:11 +00:00
parent 9a85e4787b
commit f8608dbd95
2 changed files with 4 additions and 5 deletions

View File

@ -122,10 +122,9 @@ def get_transport_url(url_str=None):
def get_client(target, version_cap=None, serializer=None):
assert TRANSPORT is not None
serializer = RequestContextSerializer(serializer)
return messaging.RPCClient(TRANSPORT,
target,
version_cap=version_cap,
serializer=serializer)
return messaging.get_rpc_client(
TRANSPORT, target, version_cap=version_cap,
serializer=serializer)
def get_server(target, endpoints, serializer=None):

View File

@ -39,7 +39,7 @@ rfc3986>=1.2.0 # Apache-2.0
jsonpatch!=1.20,>=1.16 # BSD
Jinja2>=3.0.0 # BSD License (3 clause)
keystonemiddleware>=9.5.0 # Apache-2.0
oslo.messaging>=5.29.0 # Apache-2.0
oslo.messaging>=14.1.0 # Apache-2.0
tenacity>=6.2.0 # Apache-2.0
oslo.versionedobjects>=1.31.2 # Apache-2.0
jsonschema>=3.2.0 # MIT