distcloud/distributedcloud/dcmanager/tests/unit/manager
Gustavo Herzmann 5fcf4aee3c Synchronize install values with secondary subclouds
This commit ensures that the install values of secondary subclouds on
the non-primary site are synchronized with those on the primary site.
This synchronization enables users to perform operations requiring the
'data_install' field without having to execute 'dcmanager subcloud
update --install-values <install_values.yaml> <secondary_subcloud_ref>'
beforehand.

Validation of install values is skipped on the secondary side when the
request comes from a peer system. This is because the user may not
intend to perform operations requiring the 'data_install' field.
The values are already validated on the primary site. Without skipping
validation, the sync operation could fail if the non-primary site does
not have the load already imported.

Test Plan:
1. PASS: After the initial association sync, verify that secondary
         subclouds created on the non-primary site have the
         'data_install' field synchronized with subclouds on the
         primary site.
2. PASS: After the initial sync is completed, update the install
         values on the primary site and re-sync. Verify that the
         new install values were synchronized between peers.
3. PASS: Run the previous test when the non-primary site does not have
         the load imported and verify that the sync still works.
4. PASS: Delete the 'data_install' field from the secondary subcloud
         on the non-primary site and then run
         'dcmanager peer-group-association sync' on the primary site.
         Verify that the secondary subcloud 'data_install' field is
         updated with the correct value.
5. PASS: On the non-primary site, use 'dcmanager subcloud update' to
         update the install values, verifying that the command still
         works as expected.
6. PASS: Repeat the previous test, but this time using an install
         values file without required fields, and verify that the
         operation fails during the install values validation.

Closes-Bug: 2049651

Change-Id: I4dbaaa16e40f6a214bbb93f9e48f614c10de7d42
Signed-off-by: Gustavo Herzmann <gustavo.herzmann@windriver.com>
2024-01-19 12:07:50 +00:00
..
__init__.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
test_service.py Update tox pylint/pep8 for dcmanager 2024-01-18 21:51:25 +00:00
test_subcloud_manager.py Update tox pylint/pep8 for dcmanager 2024-01-18 21:51:25 +00:00
test_system_peer_manager.py Synchronize install values with secondary subclouds 2024-01-19 12:07:50 +00:00
test_utils.py Add subcloud redeploy option to dcmanager 2023-08-21 17:32:50 -03:00