distcloud/distributedcloud/dccommon/tests/unit
Zhang Rong(Jon) 6cb974bd50 Auditor automatic reconciliation of subclouds
This commit will automatically delete the subcloud that was removed
from SPG on the peer site after the peer site migrated the SGP.

Conduct syntax checks for managing, unmanaging, deleting, and updating
subclouds, add or remove subcloud from SPG.
Specifically, If the secondary site leads the current SPG, the
subcloud can be removed from the SPG only when the primary site is
unavailable.

Test Plan:
PASS - Shutdown site1, migrate SPG to site2, and verify the status of
       subclouds upon site1 recovery. As anticipated, the subclouds
       transitioned to the secondary status.
PASS - Shutdown site1, migrate SPG to site2, then remove a subcloud
       from the SPG on site2. Upon site1 recovery, verify the subclouds'
       status. As expected, the subcloud was deleted in site1
       corresponding to the removal of the subcloud from the SPG in
       site2.
PASS - Shutdown site1, migrate SPG to site2, then remove a subcloud from
       the SPG on site2 and subsequently delete it. Check the status of
       subclouds upon site1 recovery. As expected, the subcloud was
       deleted in site1 corresponding to the removal of the subcloud
       from the SPG in site2.
PASS - Removal subcloud from the SPG in the primary site when it is the
       current leader was successful as expected.
PASS - Keep site1 online, migrate SPG to site2, remove a subcloud from
       SPG in site2 should not be allowed if site1 is online.
PASS - Add a subcloud that is offline/unmanaged to an SPG failed in
       the primary site as expected.
PASS - Manage/unmanage subcloud failed when it associated to SPG.
PASS - Update subcloud successful when it associated to SPG in the
       primary site and the SPG is the current leader.
PASS - Update subcloud failed when it associated to SPG in the secondary
       site as expected.

Closes-bug: 2052415
Closes-bug: 2052584

Signed-off-by: Zhang Rong(Jon) <rong.zhang@windriver.com>
Change-Id: I210e2865228d166d7f5a5b26015ab07b4d09db47
2024-03-05 17:51:51 +08:00
..
drivers Auditor automatic reconciliation of subclouds 2024-03-05 17:51:51 +08:00
__init__.py Keystone token and resource caching 2020-03-23 21:31:04 -04:00
test_endpoint_cache.py Update tox pylint/pep8 for dccommon 2024-01-18 11:15:22 -03:00
test_utils.py Change playbook execution function to new class 2023-09-11 11:06:17 -03:00
test_utils_script.sh Add timeout for prestage ansible playbooks 2022-05-09 20:58:47 +00:00