Merge branch 'senslab2' of ssh://git.f-lab.fr/git/sfa into senslab2
[sfa.git] / sfa / methods / GetSelfCredential.py
index 37f2e7b..fd87ca0 100644 (file)
@@ -2,10 +2,12 @@
 from sfa.util.faults import RecordNotFound, ConnectionKeyGIDMismatch
 from sfa.util.xrn import urn_to_hrn
 from sfa.util.method import Method
-from sfa.util.parameter import Parameter, Mixed
-from sfa.util.record import SfaRecord
+
 from sfa.trust.certificate import Certificate
 
+from sfa.storage.parameter import Parameter, Mixed
+from sfa.storage.record import SfaRecord
+
 class GetSelfCredential(Method):
     """
     Retrive a credential for an object
@@ -54,7 +56,7 @@ class GetSelfCredential(Method):
         
  
         # authenticate the gid
-        records = self.api.manager.resolve(self.api, xrn, type)
+        records = self.api.manager.Resolve(self.api, xrn, type)
         if not records:
             raise RecordNotFound(hrn)
         record = SfaRecord(dict=records[0])
@@ -71,4 +73,4 @@ class GetSelfCredential(Method):
                     self.api.logger.debug("ConnectionKeyGIDMismatch, %s filename: %s"%(name,obj.filename))
             raise ConnectionKeyGIDMismatch(gid.get_subject())
         
-        return self.api.manager.get_credential(self.api, xrn, type, is_self=True)
+        return self.api.manager.GetCredential(self.api, xrn, type, is_self=True)