Sandro Bonazzola has uploaded a new change for review.

Change subject: UX: fixed some ux issue
......................................................................

UX: fixed some ux issue

- fixed english grammar
- when checking again engine liveliness avoid
  to ask to install engine
- uniformed Yes/No case
- disambigued some dialog messages
- clarified some user instructions

Change-Id: Iaf6caef215f94d8d400eeb9c2ce6b38c38a62ab3
Reported-By: Greg Padgett <gpadg...@redhat.com>
Signed-off-by: Sandro Bonazzola <sbona...@redhat.com>
---
M src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
M src/plugins/ovirt-hosted-engine-setup/engine/health.py
M src/plugins/ovirt-hosted-engine-setup/network/firewall_manager.py
M src/plugins/ovirt-hosted-engine-setup/storage/storage.py
M src/plugins/ovirt-hosted-engine-setup/vm/cpu.py
M src/plugins/ovirt-hosted-engine-setup/vm/image.py
M src/plugins/ovirt-hosted-engine-setup/vm/memory.py
M src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
8 files changed, 72 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup 
refs/changes/97/17597/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 3042e54..5becf66 100644
--- a/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
+++ b/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
@@ -194,7 +194,7 @@
             hostname = self.dialog.queryString(
                 name='APP_HOST_NAME',
                 note=_(
-                    'Enter the name which will be used for identify this host'
+                    'Enter the name which will be used to identify this host'
                     ' inside the Administrator Portal [@DEFAULT@]: '
                 ),
                 prompt=True,
diff --git a/src/plugins/ovirt-hosted-engine-setup/engine/health.py 
b/src/plugins/ovirt-hosted-engine-setup/engine/health.py
index 474e679..755833d 100644
--- a/src/plugins/ovirt-hosted-engine-setup/engine/health.py
+++ b/src/plugins/ovirt-hosted-engine-setup/engine/health.py
@@ -59,25 +59,26 @@
             ohostedcons.NetworkEnv.OVIRT_HOSTED_ENGINE_FQDN
         ]
         live_checker = check_liveliness.LivelinessChecker()
+        self.dialog.queryString(
+            name='OVEHOSTED_ENGINE_UP',
+            note=_(
+                'Please install the engine in the VM, '
+                'hit enter when finished.'
+            ),
+            prompt=True,
+            default='y'  # Allow enter without any value
+        )
         while poll:
-            self.dialog.queryString(
-                name='ovehosted_engine_up',
-                note=_(
-                    'Please install the engine in the vm,'
-                    'hit enter when finished.'
-                ),
-                prompt=True,
-                default='y'  # Allow enter without any value
-            )
             if live_checker.isEngineUp(fqdn):
                 poll = False
             elif self.dialog.queryString(
-                name='ovehosted_engine_check_again',
+                name='OVEHOSTED_ENGINE_CHECK_AGAIN',
                 note=_(
                     'Engine health status page is not yet reachable.\n'
                     'Please ensure that the engine is correctly configured, '
                     'up and running.\n '
-                    'Do you want to check again or abort? (@VALUES@) :'
+                    'Do you want to check again or abort? '
+                    '(@VALUES@)[@DEFAULT@]: '
                 ),
                 prompt=True,
                 validValues=[_('Check'), _('Abort')],
diff --git a/src/plugins/ovirt-hosted-engine-setup/network/firewall_manager.py 
b/src/plugins/ovirt-hosted-engine-setup/network/firewall_manager.py
index 127a311..d3c204a 100644
--- a/src/plugins/ovirt-hosted-engine-setup/network/firewall_manager.py
+++ b/src/plugins/ovirt-hosted-engine-setup/network/firewall_manager.py
@@ -140,16 +140,16 @@
                     note=_(
                         '{manager} was detected on your computer, '
                         'do you wish setup to configure it? '
-                        '(@VALUES@) [@DEFAULT@]: '
+                        '(@VALUES@)[@DEFAULT@]: '
                     ).format(
                         manager=manager,
                     ),
                     prompt=True,
-                    validValues=(_('yes'), _('no')),
+                    validValues=(_('Yes'), _('No')),
                     caseSensitive=False,
-                    default=_('yes'),
+                    default=_('Yes'),
                 )
-                if response == _('yes'):
+                if response == _('Yes').lower():
                     self.environment[
                         ohostedcons.NetworkEnv.FIREWALL_MANAGER
                     ] = manager
diff --git a/src/plugins/ovirt-hosted-engine-setup/storage/storage.py 
b/src/plugins/ovirt-hosted-engine-setup/storage/storage.py
index 7a43cd3..6136a97 100644
--- a/src/plugins/ovirt-hosted-engine-setup/storage/storage.py
+++ b/src/plugins/ovirt-hosted-engine-setup/storage/storage.py
@@ -97,11 +97,11 @@
                 self.environment[
                     ohostedcons.CoreEnv.IS_ADDITIONAL_HOST
                 ] = self.dialog.queryString(
-                    name='ovehosted_additional_host',
+                    name='OVEHOSTED_ADDITIONAL_HOST',
                     note=_(
                         'The specified storage location already contains a '
                         'data domain. Is this an additional host setup '
-                        '(@VALUES@) [@DEFAULT@] ?'
+                        '(@VALUES@)[@DEFAULT@]? '
                     ),
                     prompt=True,
                     validValues=[_('Yes'), _('No')],
@@ -124,10 +124,10 @@
                     self.environment[
                         ohostedcons.StorageEnv.HOST_ID
                     ] = self.dialog.queryString(
-                        name='ovehosted_host_id',
+                        name='OVEHOSTED_HOST_ID',
                         note=_(
                             'Please specify the Host ID '
-                            '[Must be integer: @DEFAULT@]: '
+                            '[Must be integer, default: @DEFAULT@]: '
                         ),
                         prompt=True,
                         default=ohostedcons.Const.FIRST_HOST_ID + 1,
@@ -445,6 +445,11 @@
         priority=plugin.Stages.PRIORITY_FIRST,
     )
     def _customization(self):
+        self.dialog.note(
+            _(
+                'During customization use CTRL-D to abort.'
+            )
+        )
         self.serv = self.environment[ohostedcons.VDSMEnv.VDS_CLI]
         interactive = (
             self.environment[
@@ -465,14 +470,15 @@
                         name='OVEHOSTED_STORAGE_DOMAIN_TYPE',
                         note=_(
                             'Please specify the storage '
-                            'you would like to use (@VALUES@): '
+                            'you would like to use (@VALUES@)[@DEFAULT@]: '
                         ),
                         prompt=True,
-                        caseSensitive=False,
-                        validValues=[
-                            ('glusterfs'),
-                            ('nfs'),
-                        ]
+                        caseSensitive=True,
+                        validValues=(
+                            'glusterfs',
+                            'nfs',
+                        ),
+                        default='nfs',
                     )
 
                     self.environment[
@@ -481,7 +487,7 @@
                         name='OVEHOSTED_STORAGE_DOMAIN_CONNECTION',
                         note=_(
                             'Please specify the full shared storage '
-                            'connection path to use: '
+                            'connection path to use (example: host:/path): '
                         ),
                         prompt=True,
                         caseSensitive=True,
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/cpu.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/cpu.py
index 7f799fc..8e86a32 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/cpu.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/cpu.py
@@ -76,7 +76,7 @@
                     name='ovehosted_vmenv_cpu',
                     note=_(
                         'Please specify the number of virtual CPUs for the VM '
-                        '[Minimum requirement: @DEFAULT@]: '
+                        '[Defaults to minimum requirement: @DEFAULT@]: '
                     ),
                     prompt=True,
                     default=ohostedcons.Defaults.DEFAULT_VM_VCPUS,
@@ -94,14 +94,17 @@
                         self.environment[
                             ohostedcons.CoreEnv.REQUIREMENTS_CHECK_ENABLED
                         ] and
-                        not self.dialog.confirm(
+                        not self.dialog.queryString(
                             name=ohostedcons.Confirms.CPU_PROCEED,
-                            description='Confirm CPUs',
                             note=_(
-                                'Continue with specified CPUs? (yes/no) '
+                                'Continue with specified CPUs? '
+                                '(@VALUES@)[@DEFAULT]: '
                             ),
                             prompt=True,
-                        )
+                            validValues=[_('Yes'), _('No')],
+                            caseSensitive=False,
+                            default=_('No')
+                        ) == _('Yes').lower()
                     ):
                         valid = False
             except ValueError:
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/image.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/image.py
index 4febd27..f18a8ed 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/image.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/image.py
@@ -89,7 +89,7 @@
                     name='ovehosted_vmenv_mem',
                     note=_(
                         'Please specify the disk size of the VM in GB '
-                        '[Minimum requirement: @DEFAULT@]: '
+                        '[Defaults to minimum requirement: @DEFAULT@]: '
                     ),
                     prompt=True,
                     default=ohostedcons.Defaults.DEFAULT_IMAGE_SIZE_GB,
@@ -107,14 +107,17 @@
                         self.environment[
                             ohostedcons.CoreEnv.REQUIREMENTS_CHECK_ENABLED
                         ] and
-                        not self.dialog.confirm(
+                        not self.dialog.queryString(
                             name=ohostedcons.Confirms.DISK_PROCEED,
-                            description='Confirm disk size',
                             note=_(
-                                'Continue with specified disk size? (yes/no) '
+                                'Continue with specified disk size? '
+                                '(@VALUES@)[@DEFAULT]: '
                             ),
                             prompt=True,
-                        )
+                            validValues=[_('Yes'), _('No')],
+                            caseSensitive=False,
+                            default=_('No')
+                        ) == _('Yes').lower()
                     ):
                         valid = False
             except ValueError:
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/memory.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/memory.py
index ae5b0c4..c3362b4 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/memory.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/memory.py
@@ -76,7 +76,7 @@
                     name='ovehosted_vmenv_mem',
                     note=_(
                         'Please specify the memory size of the VM in MB '
-                        '[Minimum requirement: @DEFAULT@]: '
+                        '[Defaults to minimum requirement: @DEFAULT@]: '
                     ),
                     prompt=True,
                     default=ohostedcons.Defaults.DEFAULT_MEM_SIZE_MB,
@@ -94,15 +94,17 @@
                         self.environment[
                             ohostedcons.CoreEnv.REQUIREMENTS_CHECK_ENABLED
                         ] and
-                        not self.dialog.confirm(
+                        not self.dialog.queryString(
                             name=ohostedcons.Confirms.MEMORY_PROCEED,
-                            description='Confirm memory size',
                             note=_(
                                 'Continue with specified memory size? '
-                                '(yes/no) '
+                                '(@VALUES@)[@DEFAULT]: '
                             ),
                             prompt=True,
-                        )
+                            validValues=[_('Yes'), _('No')],
+                            caseSensitive=False,
+                            default=_('No')
+                        ) == _('Yes').lower()
                     ):
                         valid = False
 
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
index 739467b..95f70be 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
@@ -148,6 +148,13 @@
                     ]
                 )
             )
+            self.dialog.note(
+                _(
+                    'If you need to reboot the VM you can set a temporary '
+                    'password using the command:\n'
+                    'host-deploy --add-console-password=<password>'
+                )
+            )
 
     def _wait_vm_destroyed(self):
         waiter = tasks.VMDownWaiter(self.environment)
@@ -247,7 +254,8 @@
             self.dialog.note(
                 _(
                     'Please install the OS on the VM.\n'
-                    'The system will wait until the installation is completed'
+                    'When the installation is completed reboot or shutdown '
+                    'the VM: the system will wait until then'
                 )
             )
             if not self._wait_vm_destroyed():
@@ -261,10 +269,12 @@
                     raiseOnError=True
                 )
             os_installed = self.dialog.queryString(
-                name='ovehosted_os_installed',
+                name='OVEHOSTED_OS_INSTALLED',
                 note=_(
                     'Has the OS installation been completed '
-                    'successfully? (@VALUES@) :'
+                    'successfully?\nAnswering no will allow you to reboot '
+                    'from the previously selected boot media. '
+                    '(@VALUES@)[@DEFAULT]: '
                 ),
                 prompt=True,
                 validValues=[_('Yes'), _('No')],
@@ -274,10 +284,10 @@
             if (
                 not os_installed and
                 self.dialog.queryString(
-                    name='ovehosted_os_install_again',
+                    name='OVEHOSTED_OS_INSTALL_AGAIN',
                     note=_(
                         'Do you want to try again the OS '
-                        'installation? (@VALUES@) :'
+                        'installation? (@VALUES@)[@DEFAULT@]: '
                     ),
                     prompt=True,
                     validValues=[_('Yes'), _('No')],


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf6caef215f94d8d400eeb9c2ce6b38c38a62ab3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to