1 from sfa.util.faults import *
2 from sfa.util.method import Method
3 from sfa.util.parameter import Parameter
4 from sfa.trust.credential import Credential
6 class ResolveGENI(Method):
8 Lookup a URN and return information about the corresponding object.
12 interfaces = ['registry']
14 Parameter(str, "URN"),
15 Parameter(type([str]), "List of credentials"),
17 returns = Parameter(bool, "Success or Failure")
21 manager_base = 'sfa.managers'
23 if self.api.interface in ['registry']:
24 mgr_type = self.api.config.SFA_REGISTRY_TYPE
25 manager_module = manager_base + ".registry_manager_%s" % mgr_type
26 manager = __import__(manager_module, fromlist=[manager_base])
27 return manager.Resolve(self.api, xrn, '')