X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FListSlices.py;h=e14c9b6d935faa5b0492a641082da77fddcbe069;hb=cf630d87d633f3861e3ac8a50433fa29ca46a74e;hp=78a1f6bc96d83ce43b0faf9899f6ab51e441fb37;hpb=725c637b3d6f4e41773b83f7977e2ba962b5b1b7;p=sfa.git diff --git a/sfa/methods/ListSlices.py b/sfa/methods/ListSlices.py index 78a1f6bc..e14c9b6d 100644 --- a/sfa/methods/ListSlices.py +++ b/sfa/methods/ListSlices.py @@ -1,9 +1,9 @@ -from sfa.util.faults import * from sfa.util.method import Method -from sfa.util.parameter import Parameter, Mixed -from sfa.trust.auth import Auth + from sfa.trust.credential import Credential +from sfa.storage.parameter import Parameter, Mixed + class ListSlices(Method): """ List the slices instantiated at this interface @@ -17,17 +17,17 @@ class ListSlices(Method): accepts = [ Mixed(Parameter(str, "Credential string"), Parameter(type([str]), "List of credentials")), - Parameter(str, "call_id"), + Parameter(dict, "options"), ] returns = Parameter(list, "List of slice names") - def call(self, creds, call_id=""): + def call(self, creds, options={}): + valid_creds = self.api.auth.checkCredentials(creds, 'listslices') + #log the call origin_hrn = Credential(string=valid_creds[0]).get_gid_caller().get_hrn() self.api.logger.info("interface: %s\tcaller-hrn: %s\tmethod-name: %s"%(self.api.interface, origin_hrn, self.name)) - valid_creds = self.api.auth.checkCredentials(creds, 'listslices') - manager = self.api.get_interface_manager() - return manager.ListSlices(self.api, creds, call_id) + return self.api.manager.ListSlices(self.api, creds, options)