Michael Pasternak has uploaded a new change for review.

Change subject: cli: do not ask for credentials if they specified via cli 
options
......................................................................

cli: do not ask for credentials if they specified via cli options

Change-Id: If02bcd2adaae77a86eeb94d441b8435be949ac44
Signed-off-by: Michael Pasternak <[email protected]>
---
M src/cli/context.py
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-cli refs/changes/79/8079/1

diff --git a/src/cli/context.py b/src/cli/context.py
index 3f34d1e..c23bd49 100644
--- a/src/cli/context.py
+++ b/src/cli/context.py
@@ -81,11 +81,14 @@
         self._logger = logger
 
     def __collect_connection_data(self):
-        if self.settings['ovirt-shell:url'] == '':
+        if self.settings['ovirt-shell:url'] == '' and \
+        '--url' not in self.args:
             self.settings['ovirt-shell:url'] = raw_input('URL: ')
-        if self.settings['ovirt-shell:username'] == '':
+        if self.settings['ovirt-shell:username'] == '' and \
+        '--username' not in self.args:
             self.settings['ovirt-shell:username'] = raw_input('Username: ')
-        if self.settings['ovirt-shell:password'] == '':
+        if self.settings['ovirt-shell:password'] == '' and \
+        '--password' not in self.args:
             self.settings['ovirt-shell:password'] = getpass.getpass()
         sys.stdin.flush()
 


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

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

Reply via email to