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