Michael Pasternak has uploaded a new change for review.

Change subject: cli: support automatic auth session invalidation #1018561
......................................................................

cli: support automatic auth session invalidation #1018561

Change-Id: I1b8d7400406f8ab918dca01363b9acc5fc0b5224
Signed-off-by: Michael pasternak <mpast...@redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1018561
---
M src/ovirtcli/command/connect.py
M src/ovirtcli/infrastructure/options.py
M src/ovirtcli/infrastructure/settings.py
3 files changed, 8 insertions(+), 2 deletions(-)


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

diff --git a/src/ovirtcli/command/connect.py b/src/ovirtcli/command/connect.py
index 0c7a27c..5063268 100644
--- a/src/ovirtcli/command/connect.py
+++ b/src/ovirtcli/command/connect.py
@@ -77,6 +77,7 @@
         port = settings.get('ovirt-shell:port')
         timeout = settings.get('ovirt-shell:timeout')
         session_timeout = settings.get('ovirt-shell:session_timeout')
+        renew_session = settings.get('ovirt-shell:renew_session')
         debug = settings.get('cli:debug')
         insecure = settings.get('ovirt-shell:insecure')
         dont_validate_cert_chain = 
settings.get('ovirt-shell:dont_validate_cert_chain')
@@ -131,6 +132,7 @@
                          port=port if port != -1 else None,
                          timeout=timeout if timeout != -1 else None,
                          session_timeout=session_timeout if session_timeout != 
-1 else None,
+                         renew_session=renew_session,
                          debug=debug
                      ),
                      url=url
diff --git a/src/ovirtcli/infrastructure/options.py 
b/src/ovirtcli/infrastructure/options.py
index 6315764..33e43ac 100644
--- a/src/ovirtcli/infrastructure/options.py
+++ b/src/ovirtcli/infrastructure/options.py
@@ -42,6 +42,8 @@
         self.add_option('-A', '--ca-file', help='specify server CA cert-file')
         self.add_option('-I', '--insecure', help='allow connecting to SSL 
sites without CA certificate',
                         action='store_true')
+        self.add_option('-r', '--renew-session', help='automatically 
invalidate session upon expiration',
+                        action='store_true')
         self.add_option('-D', '--dont-validate-cert-chain', help='do not 
validate server CA certificate',
                         action='store_true')
         self.add_option('-F', '--filter', help='enables user permission based 
filtering',
diff --git a/src/ovirtcli/infrastructure/settings.py 
b/src/ovirtcli/infrastructure/settings.py
index bd5de26..4bbc7d9 100644
--- a/src/ovirtcli/infrastructure/settings.py
+++ b/src/ovirtcli/infrastructure/settings.py
@@ -61,7 +61,8 @@
         ('ovirt-shell:version', str, ''),
         ('ovirt-shell:prompt', str, ''),
         ('ovirt-shell:extended_prompt', boolean, False),
-        ('ovirt-shell:execute_command', str, None)
+        ('ovirt-shell:execute_command', str, None),
+        ('ovirt-shell:renew_session', boolean, False)
     ]
 
     # config file white list
@@ -79,5 +80,6 @@
         'ovirt-shell:filter',
         'ovirt-shell:timeout',
         'ovirt-shell:session_timeout',
-        'ovirt-shell:extended_prompt'
+        'ovirt-shell:extended_prompt',
+        'ovirt-shell:renew_session'
     ]


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b8d7400406f8ab918dca01363b9acc5fc0b5224
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Michael Pasternak <mpast...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to