When entering an existing password it is sufficient to prompt once since if the user mistyped the password it will fail later on, but when creating a new password it is common to re-prompt them to confirm that they didn't typo the new password.
We had this "prompt twice, check non-empty" loop in two places and were going to need it in a third so it seemed better to move this to a common method.
TODO
[x] Live test on an appliance
Database configuration testing:
Each database region number must be unique.
Enter the database region number: 0
Enter the database password on localhost:
Password can not be empty, please try again
Enter the database password on localhost:
Password can not be empty, please try again
Enter the database password on localhost: *******
Enter the Re-enter database password on localhost: *****
The passwords did not match, please try again
Enter the database password on localhost: *******
Enter the Re-enter database password on localhost: *******
Message Server Configuration testing
Installed file /opt/kafka/config/server.properties found.
Already configured on this Appliance, Un-Configure first? (Y/N): Y
Remove Installed Files
Unconfigure Firewall
Deactivate Services
Proceed with Configuration? (Y/N): Y
Message Server Parameters:
Enter the Message Keystore Password: |admin| ss: |manageiq-devel.localdomain|
Password can not be empty, please try again
Enter the Message Keystore Password: *******
Enter the Re-enter Message Keystore Password: *****
The passwords did not match, please try again
Enter the Message Keystore Password: *******
Enter the Re-enter Message Keystore Password: *******
When entering an existing password it is sufficient to prompt once since if the user mistyped the password it will fail later on, but when creating a new password it is common to re-prompt them to confirm that they didn't typo the new password.
We had this "prompt twice, check non-empty" loop in two places and were going to need it in a third so it seemed better to move this to a common method.
TODO
Database configuration testing:
Message Server Configuration testing
Fixes https://github.com/ManageIQ/manageiq/issues/23031