1 ### $Id: get_slices.py 14387 2009-07-08 18:19:11Z faiyaza $
2 ### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/methods/get_registries.py $
4 from sfa.util.faults import *
5 from sfa.util.misc import *
6 from sfa.util.method import Method
7 from sfa.util.parameter import Parameter, Mixed
8 from sfa.trust.auth import Auth
9 from sfa.server.registry import Registries
11 class get_registries(Method):
13 Get a list of connection information for all known registries.
15 @param cred credential string specifying the rights of the caller
16 @param a Human readable name (hrn), or list of hrns or None
17 @return list of dictionaries with aggregate information.
20 interfaces = ['registry', 'aggregate', 'slicemgr']
23 Parameter(str, "Credential string"),
24 Mixed([Parameter(str, "Human readable name (hrn)")],
25 Parameter(str, "Human readable name (hrn)"),
26 Parameter(None, "hrn not specified"))
29 returns = [Parameter(dict, "Registry interface information")]
31 def call(self, cred, hrn = None):
33 self.api.auth.check(cred, 'list')
34 registries = Registries(self.api)
35 return registries.interfaces