X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FResolve.py;h=1e1e7a44e6c1b95103c87ca36a13cef5fbeac008;hb=57b6a99255d4a88be9c0f910f8524677e34ff4bc;hp=659f9de10dfc302adbfa93399a9d0c18700c7bf8;hpb=51e0fbd09aa56940163e95f09bd6bc5d53cc38c1;p=sfa.git diff --git a/sfa/methods/Resolve.py b/sfa/methods/Resolve.py index 659f9de1..1e1e7a44 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.xrn import urn_to_hrn + +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,11 +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] - #test - #test2 #find valid credentials valid_creds = self.api.auth.checkCredentials(creds, 'resolve') @@ -44,7 +41,7 @@ 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)