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
9 Lookup a URN and return information about the corresponding object.
10 @param slice_urn (string) URN of slice to renew
11 @param credentials ([string]) of credentials
14 interfaces = ['registry']
16 Parameter(str, "URN"),
17 Parameter(type([str]), "List of credentials"),
19 returns = Parameter(bool, "Success or Failure")
21 def call(self, xrn, creds):
24 self.api.auth.check(cred, 'resolve')
31 raise InsufficientRights('Resolve: Credentials either did not verify, were no longer valid, or did not have appropriate privileges')
34 manager_base = 'sfa.managers'
36 if self.api.interface in ['registry']:
37 mgr_type = self.api.config.SFA_REGISTRY_TYPE
38 manager_module = manager_base + ".registry_manager_%s" % mgr_type
39 manager = __import__(manager_module, fromlist=[manager_base])
40 return manager.Resolve(self.api, xrn, creds)