diff --git a/locationservice-base/docker/locationservice/locationservicesdk/client/base.py b/locationservice-base/docker/locationservice/locationservicesdk/client/base.py index 5b19eeb..355a797 100644 --- a/locationservice-base/docker/locationservice/locationservicesdk/client/base.py +++ b/locationservice-base/docker/locationservice/locationservicesdk/client/base.py @@ -102,12 +102,12 @@ class BrokerClientBase(object): target = oslo_messaging.Target( topic=topic, server=server, version=self.broker_endpoint.Version, namespace=self.broker_endpoint.Namespace) - queryclient = oslo_messaging.RPCClient(self.transport, target, timeout = 2, retry = 0) + queryclient = oslo_messaging.get_rpc_client(self.transport, target, timeout = 2, retry = 0) return queryclient.call({}, api_name, **api_kwargs) def cast(self, topic, api_name, **api_kwargs): target = oslo_messaging.Target( topic=topic, fanout=True, version=self.broker_endpoint.Version, namespace=self.broker_endpoint.Namespace) - queryclient = oslo_messaging.RPCClient(self.transport, target) + queryclient = oslo_messaging.get_rpc_client(self.transport, target) queryclient.cast({}, api_name, **api_kwargs) diff --git a/locationservice-base/docker/locationservice/locationservicesdk/common/helpers/rpc_helper.py b/locationservice-base/docker/locationservice/locationservicesdk/common/helpers/rpc_helper.py index 9e2daee..54b4d5e 100644 --- a/locationservice-base/docker/locationservice/locationservicesdk/common/helpers/rpc_helper.py +++ b/locationservice-base/docker/locationservice/locationservicesdk/common/helpers/rpc_helper.py @@ -19,7 +19,7 @@ def setup_client(rpc_endpoint_info, topic, server): version=rpc_endpoint_info.Version, server=server, namespace=rpc_endpoint_info.Namespace) - client = oslo_messaging.RPCClient(transport, target) + client = oslo_messaging.get_rpc_client(transport, target) return client def get_transport(rpc_endpoint_info): diff --git a/notificationclient-base/docker/notificationclient-sidecar/notificationclientsdk/client/base.py b/notificationclient-base/docker/notificationclient-sidecar/notificationclientsdk/client/base.py index 73a16c5..76b59ed 100644 --- a/notificationclient-base/docker/notificationclient-sidecar/notificationclientsdk/client/base.py +++ b/notificationclient-base/docker/notificationclient-sidecar/notificationclientsdk/client/base.py @@ -162,12 +162,12 @@ class BrokerClientBase(object): namespace=self.broker_endpoint.Namespace) # note: the call might stuck here on 'Connection failed' and retry forever # due to the tcp connection is unreachable: 'AMQP server on : is unreachable: timed out' - queryclient = oslo_messaging.RPCClient(self.transport, target, timeout = timeout, retry = retry) + queryclient = oslo_messaging.get_rpc_client(self.transport, target, timeout = timeout, retry = retry) return queryclient.call({}, api_name, **api_kwargs) def cast(self, topic, api_name, timeout=None, retry=None, **api_kwargs): target = oslo_messaging.Target( topic=topic, fanout=True, version=self.broker_endpoint.Version, namespace=self.broker_endpoint.Namespace) - queryclient = oslo_messaging.RPCClient(self.transport, target, timeout = timeout, retry = retry) + queryclient = oslo_messaging.get_rpc_client(self.transport, target, timeout = timeout, retry = retry) queryclient.cast({}, api_name, **api_kwargs) diff --git a/notificationclient-base/docker/notificationclient-sidecar/notificationclientsdk/common/helpers/rpc_helper.py b/notificationclient-base/docker/notificationclient-sidecar/notificationclientsdk/common/helpers/rpc_helper.py index 8d639df..e894a52 100644 --- a/notificationclient-base/docker/notificationclient-sidecar/notificationclientsdk/common/helpers/rpc_helper.py +++ b/notificationclient-base/docker/notificationclient-sidecar/notificationclientsdk/common/helpers/rpc_helper.py @@ -19,7 +19,7 @@ def setup_client(rpc_endpoint_info, topic, server): version=rpc_endpoint_info.Version, server=server, namespace=rpc_endpoint_info.Namespace) - client = oslo_messaging.RPCClient(transport, target) + client = oslo_messaging.get_rpc_client(transport, target) return client def get_transport(rpc_endpoint_info): diff --git a/notificationservice-base-v2/docker/ptptrackingfunction/trackingfunctionsdk/client/base.py b/notificationservice-base-v2/docker/ptptrackingfunction/trackingfunctionsdk/client/base.py index 7d13e46..a4b0f29 100644 --- a/notificationservice-base-v2/docker/ptptrackingfunction/trackingfunctionsdk/client/base.py +++ b/notificationservice-base-v2/docker/ptptrackingfunction/trackingfunctionsdk/client/base.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2021-2023 Wind River Systems, Inc. +# Copyright (c) 2021-2023 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -102,12 +102,12 @@ class BrokerClientBase(object): target = oslo_messaging.Target( topic=topic, server=server, version=self.broker_endpoint.Version, namespace=self.broker_endpoint.Namespace) - queryclient = oslo_messaging.RPCClient(self.transport, target, timeout = timeout, retry = retry) + queryclient = oslo_messaging.get_rpc_client(self.transport, target, timeout = timeout, retry = retry) return queryclient.call({}, api_name, **api_kwargs) def cast(self, topic, api_name, **api_kwargs): target = oslo_messaging.Target( topic=topic, fanout=True, version=self.broker_endpoint.Version, namespace=self.broker_endpoint.Namespace) - queryclient = oslo_messaging.RPCClient(self.transport, target) + queryclient = oslo_messaging.get_rpc_client(self.transport, target) queryclient.cast({}, api_name, **api_kwargs) diff --git a/notificationservice-base-v2/docker/ptptrackingfunction/trackingfunctionsdk/common/helpers/rpc_helper.py b/notificationservice-base-v2/docker/ptptrackingfunction/trackingfunctionsdk/common/helpers/rpc_helper.py index 0a85a5c..80214d1 100644 --- a/notificationservice-base-v2/docker/ptptrackingfunction/trackingfunctionsdk/common/helpers/rpc_helper.py +++ b/notificationservice-base-v2/docker/ptptrackingfunction/trackingfunctionsdk/common/helpers/rpc_helper.py @@ -1,6 +1,6 @@ #coding=utf-8 # -# Copyright (c) 2021-2023 Wind River Systems, Inc. +# Copyright (c) 2021-2023 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -16,7 +16,7 @@ def setup_client(rpc_endpoint_info, topic, server): version=rpc_endpoint_info.Version, server=server, namespace=rpc_endpoint_info.Namespace) - client = oslo_messaging.RPCClient(transport, target) + client = oslo_messaging.get_rpc_client(transport, target) return client def get_transport(rpc_endpoint_info): diff --git a/notificationservice-base/docker/ptptrackingfunction/trackingfunctionsdk/client/base.py b/notificationservice-base/docker/ptptrackingfunction/trackingfunctionsdk/client/base.py index 34cc8c7..58e9b14 100644 --- a/notificationservice-base/docker/ptptrackingfunction/trackingfunctionsdk/client/base.py +++ b/notificationservice-base/docker/ptptrackingfunction/trackingfunctionsdk/client/base.py @@ -102,12 +102,12 @@ class BrokerClientBase(object): target = oslo_messaging.Target( topic=topic, server=server, version=self.broker_endpoint.Version, namespace=self.broker_endpoint.Namespace) - queryclient = oslo_messaging.RPCClient(self.transport, target, timeout = timeout, retry = retry) + queryclient = oslo_messaging.get_rpc_client(self.transport, target, timeout = timeout, retry = retry) return queryclient.call({}, api_name, **api_kwargs) def cast(self, topic, api_name, **api_kwargs): target = oslo_messaging.Target( topic=topic, fanout=True, version=self.broker_endpoint.Version, namespace=self.broker_endpoint.Namespace) - queryclient = oslo_messaging.RPCClient(self.transport, target) + queryclient = oslo_messaging.get_rpc_client(self.transport, target) queryclient.cast({}, api_name, **api_kwargs) diff --git a/notificationservice-base/docker/ptptrackingfunction/trackingfunctionsdk/common/helpers/rpc_helper.py b/notificationservice-base/docker/ptptrackingfunction/trackingfunctionsdk/common/helpers/rpc_helper.py index cd97a3d..8b52e28 100644 --- a/notificationservice-base/docker/ptptrackingfunction/trackingfunctionsdk/common/helpers/rpc_helper.py +++ b/notificationservice-base/docker/ptptrackingfunction/trackingfunctionsdk/common/helpers/rpc_helper.py @@ -16,7 +16,7 @@ def setup_client(rpc_endpoint_info, topic, server): version=rpc_endpoint_info.Version, server=server, namespace=rpc_endpoint_info.Namespace) - client = oslo_messaging.RPCClient(transport, target) + client = oslo_messaging.get_rpc_client(transport, target) return client def get_transport(rpc_endpoint_info): diff --git a/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/resources/scripts/init/locationservice_start.sh b/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/resources/scripts/init/locationservice_start.sh index df7dc0f..78efe94 100644 --- a/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/resources/scripts/init/locationservice_start.sh +++ b/stx-ptp-notification-helm/stx-ptp-notification-helm/helm-charts/ptp-notification/resources/scripts/init/locationservice_start.sh @@ -107,7 +107,7 @@ target = oslo_messaging.Target( fanout=True, version='1.0', namespace='notification') -client = oslo_messaging.RPCClient(transport, target) +client = oslo_messaging.get_rpc_client(transport, target) LocationInfo = { 'NodeName': THIS_NODE_NAME, 'PodIP': THIS_POD_IP,