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
namespace module is gone, plxrn provides PL-specific translations
[sfa.git]
/
sfa
/
methods
/
get_registries.py
diff --git
a/sfa/methods/get_registries.py
b/sfa/methods/get_registries.py
index
0d382d6
..
a2a65a5
100644
(file)
--- a/
sfa/methods/get_registries.py
+++ b/
sfa/methods/get_registries.py
@@
-2,7
+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.
xrn import urn_to_hrn
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
@@
-30,5
+30,7
@@
class get_registries(Method):
def call(self, cred, xrn = None):
hrn, type = urn_to_hrn(xrn)
self.api.auth.check(cred, 'list')
def call(self, cred, xrn = None):
hrn, type = urn_to_hrn(xrn)
self.api.auth.check(cred, 'list')
- registries = Registries(self.api)
- return registries.interfaces.values()
+ registries = Registries(self.api).interfaces.values()
+ if hrn:
+ registries = [reg for reg in registries if reg['hrn'] == hrn]
+ return registries