This commit adds the command "subcloud redeploy" to dcmanager.
The redeploy operation is similar to "subcloud reinstall",
performing a fresh install, bootstrapping and configuring the
subcloud, but allowing the user to use either previously used
install/bootstrap/config values stored on the system controller
or new values from provided files. Since config is an optional
phase, it will only be executed if respective parameters are
provided in the current request or were provided in a previous
deployment.
Test Plan:
Success cases:
- PASS: Redeploy subcloud without passing any new files and
verify the redeployment was successful and the final
deploy state is "complete".
- PASS: Redeploy subcloud passing new install/bootstrap/config
files and verify the redeployment was successful and
the final deploy state is "complete".
- PASS: Redeploy a subcloud with a different management
subnet and verify that the network reconfiguration
was executed during the bootstrap phase and the
redeployment completed successfully.
- PASS: Redeploy a subcloud that wasn't configure by the
"deploy config" command passing a config file and
verify that the subcloud was redeploy and configured.
- PASS: Redeploy a subcloud that wasn't configure by the
"deploy config" command without passing a config file.
and verify that the subcloud was redeployed and no
configuration attempt was made.
- PASS: Redeploy a subcloud passing a previous release (21.12)
and verify the redeployment was successful and the final
deploy state is "complete".
- PASS: Abort each one of the three deployment phases. Verify the
deployment was successfully aborted.
- PASS: Resume the aborted deployment and verify the subcloud was
successfully deployed.
- PASS: Repeat previous tests but directly call the API (using
CURL) instead of using the CLI.
Failure cases:
- PASS: Verify it's not possible to redeploy an online and/or
managed subcloud.
- PASS: Call the API directly, passing bmc-password and/or
sysadmin-password as plain text as opposed to b64encoded
and verify that the response contains the correct error
code and message.
Story: 2010756
Task: 48496
Change-Id: I6148096909adda2b95b6bb964bc7a749ac62c20c
Signed-off-by: Victor Romano <victor.gluzromano@windriver.com>