git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug fix
[sfa.git]
/
sfa
/
methods
/
get_slices.py
diff --git
a/sfa/methods/get_slices.py
b/sfa/methods/get_slices.py
index
7fea274
..
4deae10
100644
(file)
--- a/
sfa/methods/get_slices.py
+++ b/
sfa/methods/get_slices.py
@@
-20,14
+20,15
@@
class get_slices(Method):
accepts = [
Parameter(str, "Credential string"),
accepts = [
Parameter(str, "Credential string"),
- Parameter(str, "Request hash")
+ Mixed(Parameter(str, "Request hash"),
+ Parameter(None, "Request hash not specified"))
]
returns = [Parameter(str, "Human readable slice name (hrn)")]
]
returns = [Parameter(str, "Human readable slice name (hrn)")]
- def call(self, cred, request_hash):
+ def call(self, cred, request_hash
=None
):
self.api.auth.authenticateCred(cred, [cred], request_hash)
self.api.auth.check(cred, 'listslices')
slices = Slices(self.api)
self.api.auth.authenticateCred(cred, [cred], request_hash)
self.api.auth.check(cred, 'listslices')
slices = Slices(self.api)
- slices.refresh()
+ slices.refresh()
return slices['hrn']
return slices['hrn']