Martin Peřina has uploaded a new change for review.

Change subject: tools: Removes -interactive option from engine-manage-domains
......................................................................

tools: Removes -interactive option from engine-manage-domains

Removes -interactive option from engine-manage-domains. If -passwordFile
option is not set, then the password will be read interactively.

Change-Id: I9bd764a50f6e6d237bc65d6e7a72ac2cc636786a
Bug-Url: https://bugzilla.redhat.com/904029
Signed-off-by: Martin Perina <[email protected]>
---
M 
backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/ManageDomains.java
M packaging/bin/engine-manage-domains.sh
M packaging/man/man8/engine-manage-domains.8
3 files changed, 5 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/92/23992/1

diff --git 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/ManageDomains.java
 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/ManageDomains.java
index e6e9bd7..bc51e82 100644
--- 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/ManageDomains.java
+++ 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/ManageDomains.java
@@ -95,7 +95,6 @@
         configFile,
         propertiesFile,
         report,
-        interactive,
         addPermissions,
         provider,
         forceDelete,
@@ -382,7 +381,7 @@
             if (pass == null) {
                 throw new 
ManageDomainsResult(ManageDomainsResultEnum.EMPTY_PASSWORD_FILE);
             }
-        } else if (parser.hasArg(Arguments.interactive.name())) {
+        } else {
             pass = readInteractively("Enter password:", true);
         }
 
@@ -1114,7 +1113,6 @@
                 }
                 if (actionType.equals(ActionType.add)) {
                     requireArgs(parser, Arguments.domain, Arguments.user, 
Arguments.provider);
-                    requireAtLeastOneArg(parser, Arguments.passwordFile, 
Arguments.interactive);
                     requireArgsValue(parser, Arguments.domain, Arguments.user, 
Arguments.provider,
                             Arguments.passwordFile);
                     checkInvalidArgs(parser,
@@ -1134,14 +1132,12 @@
                             Arguments.domain,
                             Arguments.user,
                             Arguments.passwordFile,
-                            Arguments.interactive,
                             Arguments.forceDelete);
                 } else if (actionType.equals(ActionType.list)) {
                     checkInvalidArgs(parser,
                             Arguments.domain,
                             Arguments.user,
                             Arguments.passwordFile,
-                            Arguments.interactive,
                             Arguments.forceDelete);
                 }
             } else {
diff --git a/packaging/bin/engine-manage-domains.sh 
b/packaging/bin/engine-manage-domains.sh
index 7b2fc18..9a115eb 100755
--- a/packaging/bin/engine-manage-domains.sh
+++ b/packaging/bin/engine-manage-domains.sh
@@ -9,16 +9,13 @@
 
 usage() {
        cat << __EOF__
-engine-manage-domains: add/edit/delete/validate/list domains
-USAGE:
-        engine-manage-domains -action=ACTION [-domain=DOMAIN 
-provider=PROVIDER -user=USER -passwordFile=PASSWORD_FILE -interactive 
-configFile=PATH -addPermissions -forceDelete -ldapServers=LDAP_SERVERS 
-changePasswordMsg] -report
+        engine-manage-domains -action=ACTION [-domain=DOMAIN 
-provider=PROVIDER -user=USER -passwordFile=PASSWORD_FILE -configFile=PATH 
-addPermissions -forceDelete -ldapServers=LDAP_SERVERS -changePasswordMsg 
-report]
 Where:
         ACTION                 action to perform 
(add/edit/delete/validate/list). See details below.
         DOMAIN                 (mandatory for add, edit and delete) the domain 
you wish to perform the action on.
         PROVIDER               (mandatory for add, optional for edit) the LDAP 
provider type of server used for the domain. Among the supported providers IPA, 
RHDS, ITDS, ActiveDirectory and OpenLDAP.
         USER                   (optional for edit, mandatory for add) the 
domain user.
-        PASSWORD_FILE          (optional for edit, mandatory for add) a file 
containing the password in the first line.
-        interactive            alternative for using -passwordFile - read the 
password interactively.
+        PASSWORD_FILE          (optional for edit, mandatory for add) a file 
containing the password in the first line. If it's not set, the password will 
be read interactively
         PATH                   (optional) use the given alternate 
configuration file.
         LDAP_SERVERS           (optional) a comma delimited list of LDAP 
servers to be set to the domain.
         changePasswordMsg      (optional) Reads interactively a URL or a 
message to be returned to the user in case the password has expired.
diff --git a/packaging/man/man8/engine-manage-domains.8 
b/packaging/man/man8/engine-manage-domains.8
index fde0663..cdbf0a7 100644
--- a/packaging/man/man8/engine-manage-domains.8
+++ b/packaging/man/man8/engine-manage-domains.8
@@ -2,15 +2,14 @@
 .SH NAME
 engine-manage-domains \- Engine management domains tool
 .SH SYNOPSIS
-.B engine-manage-domains -action=ACTION [-domain=DOMAIN -provider=PROVIDER 
-user=USER -passwordFile=PASSWORD_FILE -interactive -configFile=PATH 
-addPermissions -forceDelete] -report
+.B engine-manage-domains -action=ACTION [-domain=DOMAIN -provider=PROVIDER 
-user=USER -passwordFile=PASSWORD_FILE -configFile=PATH -addPermissions 
-forceDelete -report]
 
 Where:
   ACTION             action to perform (add/edit/delete/validate/list). See 
details below.
   DOMAIN             (mandatory for add, edit and delete) the domain you wish 
to perform the action on.
   PROVIDER           (mandatory for add, optional for edit) the LDAP provider 
type of server used for the domain. Among the supported providers 
IPA,RHDS,ITDS,ActiveDirectory and OpenLDAP.
   USER               (optional for edit, mandatory for add) the domain user.
-  PASSWORD_FILE      (optional for edit, mandatory for add) a file containing 
the password in the first line.
-  interactive        alternative for using -passwordFile - read the password 
interactively.
+  PASSWORD_FILE      (optional for add, edit) a file containing the password 
in the first line. If it's not set, the password will be read interactively.
   PATH               (optional) use the given alternate configuration file.
 
 Available actions:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bd764a50f6e6d237bc65d6e7a72ac2cc636786a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Martin Peřina <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to