git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fbbdb33
)
ProtoGENI is really picky when it comes to the 'rspec_version' option. Let make sure...
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Thu, 23 Jun 2011 18:36:09 +0000
(14:36 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Thu, 23 Jun 2011 18:36:09 +0000
(14:36 -0400)
sfa/client/sfi.py
patch
|
blob
|
history
diff --git
a/sfa/client/sfi.py
b/sfa/client/sfi.py
index
cca7587
..
a46ea42
100755
(executable)
--- a/
sfa/client/sfi.py
+++ b/
sfa/client/sfi.py
@@
-26,6
+26,8
@@
import sfa.util.xmlrpcprotocol as xmlrpcprotocol
from sfa.util.config import Config
from sfa.util.version import version_core
from sfa.util.cache import Cache
from sfa.util.config import Config
from sfa.util.version import version_core
from sfa.util.cache import Cache
+from sfa.rspecs.rspec_version import RSpecVersion
+from sfa.rspecs.pg_rspec import pg_rspec_request_version
AGGREGATE_PORT=12346
CM_PORT=12346
AGGREGATE_PORT=12346
CM_PORT=12346
@@
-893,7
+895,14
@@
class Sfi:
delegated_cred = self.delegate_cred(cred, get_authority(self.authority))
creds.append(delegated_cred)
if opts.rspec_version:
delegated_cred = self.delegate_cred(cred, get_authority(self.authority))
creds.append(delegated_cred)
if opts.rspec_version:
- call_options['rspec_version'] = opts.rspec_version
+ server_version = self.get_cached_server_version(server)
+ if 'sfa' in server_version:
+ # just request the version the client wants
+ call_options['rspec_version'] = dict(RSpecVersion(opts.rspec_version))
+ else:
+ # this must be a protogeni aggregate. We should request a v2 ad rspec
+ # regardless of what the client user requested
+ call_options['rspec_version'] = dict(pg_rspec_request_version)
#panos add info options
if opts.info:
call_options['info'] = opts.info
#panos add info options
if opts.info:
call_options['info'] = opts.info