
Add dcmanager peer-group-association management API. This commit adds peer-group-association APIs of create/delete/update/show/list/sync, and adds system-peer API of list subcloud-peer-groups. Test Plan: 1. PASS - Verify that cloud manage peer-group-association through api successfully. 2. PASS - Verify that cloud get associated subcloud-peer-group list with system-peer api successfully. 3. PASS - Check create without providing the must required parameters. 4. PASS - Check create with wrong peer_group_priority. 5. PASS - Check delete with a not existing association id. 6. PASS - Check system_peer_manager associate peer group, sync peer group and delete association. 7. PASS - Create an association with 50 subclouds need to sync. Check the sync status on peer site after it is synced. Story: 2010852 Task: 48506 Change-Id: I41c16a8ab13e60f5b1de5b05fbbc51821f7f8d57 Signed-off-by: Zhang Rong(Jon) <rong.zhang@windriver.com>
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
#
|
|
# Copyright (c) 2023 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
import itertools
|
|
|
|
from dcmanager.api.policies import alarm_manager
|
|
from dcmanager.api.policies import base
|
|
from dcmanager.api.policies import peer_group_association
|
|
from dcmanager.api.policies import phased_subcloud_deploy
|
|
from dcmanager.api.policies import subcloud_backup
|
|
from dcmanager.api.policies import subcloud_deploy
|
|
from dcmanager.api.policies import subcloud_group
|
|
from dcmanager.api.policies import subcloud_peer_group
|
|
from dcmanager.api.policies import subclouds
|
|
from dcmanager.api.policies import sw_update_options
|
|
from dcmanager.api.policies import sw_update_strategy
|
|
from dcmanager.api.policies import system_peers
|
|
|
|
|
|
def list_rules():
|
|
return itertools.chain(
|
|
base.list_rules(),
|
|
subclouds.list_rules(),
|
|
subcloud_deploy.list_rules(),
|
|
alarm_manager.list_rules(),
|
|
sw_update_strategy.list_rules(),
|
|
sw_update_options.list_rules(),
|
|
subcloud_group.list_rules(),
|
|
subcloud_backup.list_rules(),
|
|
phased_subcloud_deploy.list_rules(),
|
|
subcloud_peer_group.list_rules(),
|
|
peer_group_association.list_rules(),
|
|
system_peers.list_rules()
|
|
)
|