X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2Fget_slices.py;h=4deae104fc767d69082ad087af26006196cf4fc8;hb=4a21072c4ec1237d1299d8bf39623aaa01867556;hp=7fea27451f2dd3760cf6499456d1ff5e3cd90e8e;hpb=bb08c68eb53c55009be93fd91579a9685eb23860;p=sfa.git diff --git a/sfa/methods/get_slices.py b/sfa/methods/get_slices.py index 7fea2745..4deae104 100644 --- 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"), - Parameter(str, "Request hash") + Mixed(Parameter(str, "Request hash"), + Parameter(None, "Request hash not specified")) ] 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) - slices.refresh() + slices.refresh() return slices['hrn']