use record['name'] not record.get_name()
[sfa.git] / sfa / methods / get_slices.py
index a21f093..aaf30f7 100644 (file)
@@ -5,8 +5,8 @@ from sfa.util.faults import *
 from sfa.util.misc import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
-from sfa.util.auth import Auth
-from sfa.util.slices import Slices
+from sfa.trust.auth import Auth
+from sfa.plc.slices import Slices
 
 class get_slices(Method):
     """
@@ -20,13 +20,14 @@ class get_slices(Method):
     
     accepts = [
         Parameter(str, "Credential string"),
+        Parameter(str, "Request hash")
         ]
 
     returns = [Parameter(str, "Human readable slice name (hrn)")]
     
-    def call(self, cred):
-       
+    def call(self, cred, request_hash):
+        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']