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: Ia95d2c85cded3be8944c0cc5fafc30d37df9ce82
This commit is contained in:
Tobias Urdin 2023-01-19 20:52:08 +00:00
parent 1d90a83fc4
commit 9756793988
2 changed files with 3 additions and 2 deletions

View File

@ -57,7 +57,8 @@ def get_target():
def get_client(version_cap=None): def get_client(version_cap=None):
transport = get_transport() transport = get_transport()
target = get_target() target = get_target()
return oslo_messaging.RPCClient(transport, target, version_cap=version_cap) return oslo_messaging.get_rpc_client(
transport, target, version_cap=version_cap)
def get_server(target=None, endpoints=None): def get_server(target=None, endpoints=None):

View File

@ -23,7 +23,7 @@ oslo.concurrency>=4.3.1 # Apache-2.0
oslo.db>=8.4.0 # Apache-2.0 oslo.db>=8.4.0 # Apache-2.0
oslo.i18n>=5.0.1 # Apache-2.0 oslo.i18n>=5.0.1 # Apache-2.0
oslo.log>=4.4.0 # Apache-2.0 oslo.log>=4.4.0 # Apache-2.0
oslo.messaging>=12.6.0 # Apache-2.0 oslo.messaging>=14.1.0 # Apache-2.0
oslo.middleware>=4.1.1 # Apache-2.0 oslo.middleware>=4.1.1 # Apache-2.0
oslo.policy>=3.6.0 # Apache-2.0 oslo.policy>=3.6.0 # Apache-2.0
oslo.utils>=4.7.0 # Apache-2.0 oslo.utils>=4.7.0 # Apache-2.0