Yaniv Bronhaim has uploaded a new change for review.

Change subject: Add detailed note to user when password validation fails by 
using engine-config
......................................................................

Add detailed note to user when password validation fails by using engine-config

Change-Id: I7ae53d9b19f1b09990cf540d56e648698a00233d
Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=893682
Signed-off-by: Yaniv Bronhaim <[email protected]>
---
M 
backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/helper/PasswordValueHelper.java
1 file changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/53/12153/1

diff --git 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/helper/PasswordValueHelper.java
 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/helper/PasswordValueHelper.java
index d3297cd..7634856 100644
--- 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/helper/PasswordValueHelper.java
+++ 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/helper/PasswordValueHelper.java
@@ -131,8 +131,7 @@
         if (StringUtils.isNotBlank(parser.getAdminPassFile()) && new 
File(parser.getAdminPassFile()).exists()) {
             return new ValidationResult(true);
         }
-        return new ValidationResult(false);
-
+        return new ValidationResult(false, getHelpNote());
     }
 
     @Override
@@ -140,4 +139,17 @@
         this.parser = parser;
     }
 
+    public String getHelpNote() {
+        String s = "\n\n\n" +
+                   "### Notes:\n" +
+                   "## 1. Passwords: password can be set in interacetive mode 
ie:\n" +
+                   "###        engine-config -s PasswordEntry=interactive\n" +
+                   "###    or via file with one of the following options:\n" +
+                   "###        engine-config -s PasswordEntry 
--admin-pass-file=/tmp/mypass\n" +
+                   "###        engine-config -s PasswordEntry=/tmp/mypass\n" +
+                   "### 2. In order for your change(s) to take effect,\n" +
+                   "###    restart the oVirt engine service (using: 'service 
ovirt-engine restart').\n" +
+                   
"################################################################################\n\n";
+        return s;
+    }
 }


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

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

Reply via email to