X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FResolve.py;h=49104b28c96e802a78008c6732cf4a05637db029;hb=297fa220743cf50f9feaee49ec8c76b51495cf40;hp=d8a536e911e76bdc7b44cda05a15443b280e6312;hpb=dbce495b6f2e7d8dccbfb18c5507907d784c143b;p=sfa.git diff --git a/sfa/methods/Resolve.py b/sfa/methods/Resolve.py index d8a536e9..49104b28 100644 --- a/sfa/methods/Resolve.py +++ b/sfa/methods/Resolve.py @@ -3,7 +3,7 @@ import traceback import types from sfa.util.faults import * -from sfa.util.namespace 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,10 +30,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 +44,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)