From 6491be0d196d5f1bb3eb41e02157463a3fe7469d Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Thu, 19 Jan 2023 20:32:07 +0000 Subject: [PATCH] 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: I1a0258766757ad3baa4422ed4c51632a4ca0330d --- cyborg/common/rpc.py | 7 +++---- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cyborg/common/rpc.py b/cyborg/common/rpc.py index fde53ee8..28d12d6f 100644 --- a/cyborg/common/rpc.py +++ b/cyborg/common/rpc.py @@ -96,10 +96,9 @@ class RequestContextSerializer(messaging.Serializer): 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): diff --git a/requirements.txt b/requirements.txt index 3989b822..98dbc735 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ oslo.i18n>=1.5.0 # Apache-2.0 oslo.config>=1.1.0,!=4.3.0,!=4.4.0 # Apache-2.0 oslo.log>=5.0.0 # Apache-2.0 oslo.context>=2.9.0 # Apache-2.0 -oslo.messaging>=10.3.0 # Apache-2.0 +oslo.messaging>=14.1.0 # Apache-2.0 oslo.concurrency>=3.26.0 # Apache-2.0 oslo.service>=1.0.0,!=1.28.1 # Apache-2.0 oslo.db>=10.0.0 # Apache-2.0