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:
0cc524b
)
fix options to sfi myslice for selecting a custom backend
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Tue, 5 Nov 2013 11:29:07 +0000
(12:29 +0100)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Tue, 5 Nov 2013 11:31:49 +0000
(12:31 +0100)
sfa/client/sfi.py
patch
|
blob
|
history
diff --git
a/sfa/client/sfi.py
b/sfa/client/sfi.py
index
2f8a2a8
..
8793da3
100644
(file)
--- a/
sfa/client/sfi.py
+++ b/
sfa/client/sfi.py
@@
-1493,8
+1493,9
@@
$ sfi myslice
$ sfi -v myslice -- or sfi -vv myslice
same but with more and more verbosity
$ sfi -v myslice -- or sfi -vv myslice
same but with more and more verbosity
-$ sfi m
+$ sfi m
-b http://mymanifold.foo.com:7080/
is synonym to sfi myslice as no other command starts with an 'm'
is synonym to sfi myslice as no other command starts with an 'm'
+ and uses a custom backend for this one call
"""
) # register_command
def myslice (self, options, args):
"""
) # register_command
def myslice (self, options, args):
@@
-1518,13
+1519,13
@@
$ sfi m
# (a) rain check for sufficient config in sfi_config
myslice_dict={}
# (a) rain check for sufficient config in sfi_config
myslice_dict={}
- myslice_keys=['backend', 'delegate', 'platform', 'username']
+ myslice_keys=[
'backend', 'delegate', 'platform', 'username']
for key in myslice_keys:
value=None
# oct 2013 - I'm finding myself juggling with config files
# so a couple of command-line options can now override config
for key in myslice_keys:
value=None
# oct 2013 - I'm finding myself juggling with config files
# so a couple of command-line options can now override config
- if hasattr(
args,key)
:
- value=getattr(
arg
s,key)
+ if hasattr(
options,key) and getattr(options,key) is not None
:
+ value=getattr(
option
s,key)
else:
full_key="MYSLICE_" + key.upper()
value=getattr(self.config_instance,full_key,None)
else:
full_key="MYSLICE_" + key.upper()
value=getattr(self.config_instance,full_key,None)