git://git.onelab.eu
/
bootmanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
064f020
)
Keep session around instead of calling the API for a new one every time a call is...
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Fri, 14 Mar 2008 20:53:12 +0000
(20:53 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Fri, 14 Mar 2008 20:53:12 +0000
(20:53 +0000)
source/BootAPI.py
patch
|
blob
|
history
diff --git
a/source/BootAPI.py
b/source/BootAPI.py
index
183838c
..
8bb3c26
100644
(file)
--- a/
source/BootAPI.py
+++ b/
source/BootAPI.py
@@
-45,12
+45,18
@@
def create_auth_structure( vars, call_params ):
auth['value']= node_hmac
try:
auth_session = {}
- auth_session['session'] = vars['API_SERVER_INST'].GetSession(auth)
+ if not vars.has_key('SESSION'):
+ session = vars['API_SERVER_INST'].GetSession(auth)
+ auth_session['session'] = session
+ vars['SESSION'] = session
+ else:
+ auth_session['session'] = vars['SESSION']
auth_session['AuthMethod'] = 'session'
auth = auth_session
except Exception, e:
print e
pass
+ print auth
return auth