Files
distcloud/distributedcloud/dcmanager/orchestrator/rpcapi.py
Hugo Brito 072b7e2aab Increase RPC client timeout for subcloud backup delete
The scalability test for subcloud backup delete
failed with RPC client timeout. This commit increases
the rpc client timeout for backup delete to 2 minutes.

Test Plan:
PASS - Scalability tests
1. Add a large number of subclouds (250 or more)
2. Execute dcmanager subcloud-backup create
- Batch 250
- systemcontroller and local
3. Execute dcmanager subcloud-backup delete
- Batch 250
- systemcontroller and local
PASS - Subcloud Deployment & Manage tests (regression tests)


Story: 2010116
Task: 46856

Signed-off-by: Hugo Brito <hugo.brito@windriver.com>
Change-Id: Ibbd3151ef94d07fbea9a0664c1c96570fc72a5eb
2022-11-21 21:07:51 +00:00

73 lines
2.5 KiB
Python

# Copyright (c) 2020-2021 Wind River Systems, Inc.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
"""
Client side of the DC Manager Orchestrator RPC API.
"""
from dcmanager.common import consts
from dcmanager.common import messaging
class ManagerOrchestratorClient(object):
"""Client side of the DC Manager Orchestrator RPC API.
Version History:
1.0 - Initial version
"""
BASE_RPC_API_VERSION = '1.0'
def __init__(self, timeout=None):
self._client = messaging.get_rpc_client(
timeout=timeout,
topic=consts.TOPIC_DC_MANAGER_ORCHESTRATOR,
version=self.BASE_RPC_API_VERSION)
@staticmethod
def make_msg(method, **kwargs):
return method, kwargs
def call(self, ctxt, msg, version=None):
method, kwargs = msg
if version is not None:
client = self._client.prepare(version=version)
else:
client = self._client
return client.call(ctxt, method, **kwargs)
def cast(self, ctxt, msg, version=None):
method, kwargs = msg
if version is not None:
client = self._client.prepare(version=version)
else:
client = self._client
return client.cast(ctxt, method, **kwargs)
def create_sw_update_strategy(self, ctxt, payload):
return self.call(ctxt, self.make_msg('create_sw_update_strategy',
payload=payload))
def delete_sw_update_strategy(self, ctxt, update_type=None):
return self.call(ctxt, self.make_msg('delete_sw_update_strategy',
update_type=update_type))
def apply_sw_update_strategy(self, ctxt, update_type=None):
return self.call(ctxt, self.make_msg('apply_sw_update_strategy',
update_type=update_type))
def abort_sw_update_strategy(self, ctxt, update_type=None):
return self.call(ctxt, self.make_msg('abort_sw_update_strategy',
update_type=update_type))