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
added support for urn name format. urn is the default name format used over the wire
[sfa.git]
/
sfa
/
methods
/
get_registries.py
diff --git
a/sfa/methods/get_registries.py
b/sfa/methods/get_registries.py
index
dcc259a
..
9cbba39
100644
(file)
--- a/
sfa/methods/get_registries.py
+++ b/
sfa/methods/get_registries.py
@@
-2,6
+2,7
@@
### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/methods/get_registries.py $
from types import StringTypes
from sfa.util.faults import *
### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/methods/get_registries.py $
from types import StringTypes
from sfa.util.faults import *
+from sfa.util.namespace import *
from sfa.util.method import Method
from sfa.util.parameter import Parameter, Mixed
from sfa.trust.auth import Auth
from sfa.util.method import Method
from sfa.util.parameter import Parameter, Mixed
from sfa.trust.auth import Auth
@@
-12,7
+13,7
@@
class get_registries(Method):
Get a list of connection information for all known registries.
@param cred credential string specifying the rights of the caller
Get a list of connection information for all known registries.
@param cred credential string specifying the rights of the caller
- @param a Human readable name (hrn
), or list of hrn
s or None
+ @param a Human readable name (hrn
or urn), or list of name
s or None
@return list of dictionaries with aggregate information.
"""
@return list of dictionaries with aggregate information.
"""
@@
-20,13
+21,14
@@
class get_registries(Method):
accepts = [
Parameter(str, "Credential string"),
accepts = [
Parameter(str, "Credential string"),
- Mixed(Parameter(str, "Human readable name (hrn)"),
+ Mixed(Parameter(str, "Human readable name (hrn
or urn
)"),
Parameter(None, "hrn not specified"))
]
returns = [Parameter(dict, "Registry interface information")]
Parameter(None, "hrn not specified"))
]
returns = [Parameter(dict, "Registry interface information")]
- def call(self, cred, hrn = None):
+ def call(self, cred, xrn = None):
+ hrn, type = urn_to_hrn(xrn)
self.api.auth.check(cred, 'list')
registries = Registries(self.api)
hrn_list = []
self.api.auth.check(cred, 'list')
registries = Registries(self.api)
hrn_list = []