X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FResolve.py;h=74972cc91ed9e7783e72822d5007d5e0463df3aa;hb=70f4308757e799aeb96545f5e0a22c96dc8633c2;hp=3f7a61ab1f0866ac8a8f1fdb3537fdb8a330c952;hpb=eababa96fb603cdd552bc03091813544b099befd;p=sfa.git diff --git a/sfa/methods/Resolve.py b/sfa/methods/Resolve.py index 3f7a61ab..74972cc9 100644 --- a/sfa/methods/Resolve.py +++ b/sfa/methods/Resolve.py @@ -1,9 +1,6 @@ -### $Id: resolve.py 17157 2010-02-21 04:19:34Z tmack $ -### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/methods/resolve.py $ -import traceback import types -from sfa.util.faults import * -from sfa.util.namespace import * + +from sfa.util.xrn import Xrn, urn_to_hrn from sfa.util.method import Method from sfa.util.parameter import Parameter, Mixed from sfa.trust.credential import Credential @@ -30,10 +27,11 @@ class Resolve(Method): returns = [SfaRecord] def call(self, xrns, creds): + type = None if not isinstance(xrns, types.ListType): + type = Xrn(xrns).get_type() xrns=[xrns] hrns = [urn_to_hrn(xrn)[0] for xrn in xrns] - #find valid credentials valid_creds = self.api.auth.checkCredentials(creds, 'resolve') @@ -43,7 +41,5 @@ class Resolve(Method): # send the call to the right manager manager = self.api.get_interface_manager() - return manager.resolve(self.api, xrns) - - + return manager.resolve(self.api, xrns, type)