Sandro Bonazzola has uploaded a new change for review.

Change subject: packaging: setup: confirm admin password
......................................................................

packaging: setup: confirm admin password

In interactive mode ask the admin password twice
for validating it.

Change-Id: Idabd7eb56440e02462407007375fbaf113430adf
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
1 file changed, 19 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup 
refs/changes/38/17538/1

diff --git a/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py 
b/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
index afcd7f9..257bbef 100644
--- a/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
+++ b/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
@@ -226,9 +226,25 @@
                 hidden=True,
             )
             if password:
-                self.environment[
-                    ohostedcons.EngineEnv.ADMIN_PASSWORD
-                ] = password
+                if not interactive:
+                    self.environment[
+                        ohostedcons.EngineEnv.ADMIN_PASSWORD
+                    ] = password
+                else:
+                    password_check = self.dialog.queryString(
+                        name='ENGINE_ADMIN_PASSWORD',
+                        note=_(
+                            "Confirm 'admin@internal' user password : "
+                        ),
+                        prompt=True,
+                        hidden=True,
+                    )
+                    if password == password_check:
+                        self.environment[
+                            ohostedcons.EngineEnv.ADMIN_PASSWORD
+                        ] = password
+                    else:
+                        self.logger.error(_('Passwords do not match'))
             else:
                 if interactive:
                     self.logger.error(_('Please specify a password'))


-- 
To view, visit http://gerrit.ovirt.org/17538
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idabd7eb56440e02462407007375fbaf113430adf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to