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