git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
split the various *Api classes into somethin more sensible
[sfa.git]
/
sfa
/
methods
/
Resolve.py
diff --git
a/sfa/methods/Resolve.py
b/sfa/methods/Resolve.py
index
ec47e41
..
74972cc
100644
(file)
--- a/
sfa/methods/Resolve.py
+++ b/
sfa/methods/Resolve.py
@@
-1,12
+1,8
@@
-### $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
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.util.method import Method
from sfa.util.parameter import Parameter, Mixed
-from sfa.util.debug import log
from sfa.trust.credential import Credential
from sfa.util.record import SfaRecord
from sfa.trust.credential import Credential
from sfa.util.record import SfaRecord
@@
-31,10
+27,11
@@
class Resolve(Method):
returns = [SfaRecord]
def call(self, xrns, creds):
returns = [SfaRecord]
def call(self, xrns, creds):
+ type = None
if not isinstance(xrns, types.ListType):
if not isinstance(xrns, types.ListType):
+ type = Xrn(xrns).get_type()
xrns=[xrns]
hrns = [urn_to_hrn(xrn)[0] for xrn in xrns]
xrns=[xrns]
hrns = [urn_to_hrn(xrn)[0] for xrn in xrns]
-
#find valid credentials
valid_creds = self.api.auth.checkCredentials(creds, 'resolve')
#find valid credentials
valid_creds = self.api.auth.checkCredentials(creds, 'resolve')
@@
-44,7
+41,5
@@
class Resolve(Method):
# send the call to the right manager
manager = self.api.get_interface_manager()
# 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)