- def call(self, cert, hrn, type, requestHash):
-
- certificate = Certificate(string=cert)
- table = GeniTable()
- records = table.find({'hrn': hrn, 'type': type})
+ def call(self, cert, xrn, type):
+
+ # convert xrn to hrn
+ if type:
+ hrn = urn_to_hrn(xrn)[0]
+ else:
+ hrn, type = urn_to_hrn(xrn)
+
+ self.api.auth.verify_object_belongs_to_me(hrn)
+
+ # resolve the record
+ manager_base = 'sfa.managers'
+ mgr_type = self.api.config.SFA_REGISTRY_TYPE
+ manager_module = manager_base + ".registry_manager_%s" % mgr_type
+ manager = __import__(manager_module, fromlist=[manager_base])
+ records = manager.resolve(self.api, xrn, type, origin_hrn=hrn)