Improve rehome_data semantic check and name update
This commit adds a new rehome_data semantic check when attempting to
update which peer group a subcloud is part of. If rehome_data
is not already present, the request payload must contain both the
bootstrap-values and bootstrap-address; otherwise, the request will
be aborted.
Additionally, this commit updates the rehome_data during the subcloud
rename operation, guarenteeing that name is up-to-date.
Test Plan:
1. PASS - Attempt to add a subcloud with no rehome_data to a peer
group under the following conditions and verify that it fails:
- Without passing bootstrap-address and bootstrap-values
- Passing only the bootstrap-address
- Passing only the bootstrap-values
2. PASS - Add a subcloud with rehome_data to a peer group and verify
that the operation succeeds regardless of the presence of bootstrap-address and bootstrap-values.
3. PASS - Rename a subcloud with rehome_data and verify that the rehome_data name field is updated to the new name.
4. PASS - Rename a subcloud without rehome_data and verify that the rename operation still works.
5. PASS - Migrate a renamed subcloud back and forth and verify that
the migration completes successfully.
Reviewed: https:/ /review. opendev. org/c/starlingx /distcloud/ +/912491 /opendev. org/starlingx/ distcloud/ commit/ 226e127fc032462 12afd52431e4739 4d5449fe2a
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 226e127fc032462 12afd52431e4739 4d5449fe2a
Author: Gustavo Herzmann <email address hidden>
Date: Mon Mar 11 17:22:15 2024 -0300
Improve rehome_data semantic check and name update
This commit adds a new rehome_data semantic check when attempting to values and bootstrap-address; otherwise, the request will
update which peer group a subcloud is part of. If rehome_data
is not already present, the request payload must contain both the
bootstrap-
be aborted.
Additionally, this commit updates the rehome_data during the subcloud
rename operation, guarenteeing that name is up-to-date.
Test Plan:
fails:
bootstrap- address and bootstrap-values.
rehome_ data name field is updated to the new name.
rename operation still works.
1. PASS - Attempt to add a subcloud with no rehome_data to a peer
group under the following conditions and verify that it
- Without passing bootstrap-address and bootstrap-values
- Passing only the bootstrap-address
- Passing only the bootstrap-values
2. PASS - Add a subcloud with rehome_data to a peer group and verify
that the operation succeeds regardless of the presence of
3. PASS - Rename a subcloud with rehome_data and verify that the
4. PASS - Rename a subcloud without rehome_data and verify that the
5. PASS - Migrate a renamed subcloud back and forth and verify that
the migration completes successfully.
Closes-Bug: 2055883
Closes-Bug: 2056796
Change-Id: I4403dc50062db0 7a0de24e04139e3 af8087c546f
Signed-off-by: Gustavo Herzmann <email address hidden>