Merge branch 'thgeneric' of ssh://git.onelab.eu/git/sfa into thgeneric
[sfa.git] / sfa / methods / ListSlices.py
index 236d34f..e8521c1 100644 (file)
@@ -1,11 +1,5 @@
-### $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
  
 class ListSlices(Method):
@@ -21,17 +15,17 @@ class ListSlices(Method):
     accepts = [
         Mixed(Parameter(str, "Credential string"),
               Parameter(type([str]), "List of credentials")),
+        Parameter(str, "call_id"),
         ]
 
     returns = Parameter(list, "List of slice names")
     
-    def call(self, creds):
+    def call(self, creds, call_id=""):
         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, creds)
+        return self.api.manager.ListSlices(self.api, creds, call_id)