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
# 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])
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)