Alex Lourie has uploaded a new change for review.

Change subject: packaging: Updated setup to preserve entered ISO path
......................................................................

packaging: Updated setup to preserve entered ISO path

This patch will preserve the ISO path provided by the
user during interactive setup. In case the path fails
validation it will still be presented as the default
option during the repeat prompt.

In non-interactive flows, the failure in validation will
still fail the setup.

Change-Id: I5cbab043e9f2f89b2043101ae7d86a5e9c26f36f
Signed-off-by: Alex Lourie <alou...@redhat.com>
---
M packaging/setup/plugins/ovirt-engine-setup/config/iso_domain.py
1 file changed, 11 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/33/15033/1

diff --git a/packaging/setup/plugins/ovirt-engine-setup/config/iso_domain.py 
b/packaging/setup/plugins/ovirt-engine-setup/config/iso_domain.py
index 66a299b..cf14c84 100644
--- a/packaging/setup/plugins/ovirt-engine-setup/config/iso_domain.py
+++ b/packaging/setup/plugins/ovirt-engine-setup/config/iso_domain.py
@@ -251,12 +251,17 @@
         validDomain = False
         while not validDomain:
             try:
-                if self.environment[
-                    osetupcons.ConfigEnv.ISO_DOMAIN_NFS_MOUNT_POINT
-                ] is None:
-                    default_mount_point = self.environment[
-                        osetupcons.ConfigEnv.ISO_DOMAIN_DEFAULT_NFS_MOUNT_POINT
-                    ]
+                if interactive:
+                    default_mount_point = (
+                        self.environment[
+                            osetupcons.ConfigEnv.
+                            ISO_DOMAIN_NFS_MOUNT_POINT
+                        ] or
+                        self.environment[
+                            osetupcons.ConfigEnv.
+                            ISO_DOMAIN_DEFAULT_NFS_MOUNT_POINT
+                        ]
+                    )
                     if os.path.exists(default_mount_point):
                         default_mount_point += '-%s' % (
                             datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S')
@@ -295,9 +300,6 @@
                             error=e,
                         )
                     )
-                    self.environment[
-                        osetupcons.ConfigEnv.ISO_DOMAIN_NFS_MOUNT_POINT
-                    ] = None
                 else:
                     raise
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5cbab043e9f2f89b2043101ae7d86a5e9c26f36f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alex Lourie <alou...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to