X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FListSlices.py;h=b1967776c1d1d8184cfceb1574042b95a54e7213;hb=99b7f92d2fb9ba847a51c235da6cf4705b216f4d;hp=784effadb2704fbe99a8ae290bb74fdea7c3285a;hpb=14f9b7046268214c7c5ab8eb8749700ac9437d33;p=sfa.git diff --git a/sfa/methods/ListSlices.py b/sfa/methods/ListSlices.py index 784effad..b1967776 100644 --- a/sfa/methods/ListSlices.py +++ b/sfa/methods/ListSlices.py @@ -1,13 +1,9 @@ -### $Id: stop_slice.py 17732 2010-04-19 21:10:45Z tmack $ -### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/methods/stop_slice.py $ - -from sfa.util.faults import * -from sfa.util.namespace 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 @@ -21,17 +17,17 @@ class ListSlices(Method): accepts = [ Mixed(Parameter(str, "Credential string"), Parameter(type([str]), "List of credentials")), + Parameter(dict, "options"), ] returns = Parameter(list, "List of slice names") - def call(self, creds): + 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)) - manager = self.api.get_interface_manager() - return manager.get_slices(self.api, valid_creds) + return self.api.manager.ListSlices(self.api, creds, options)