X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2Fget_registries.py;h=9cbba3916e1543df024c4d02b6970b4ffea8945e;hb=11d02cbfd5e91784119bb9377fceb4fa6adae621;hp=13055d3a441d7e6c4323b3877d47ecf371e0da29;hpb=acae426433020998d0d45ed25584ebed0591d036;p=sfa.git diff --git a/sfa/methods/get_registries.py b/sfa/methods/get_registries.py index 13055d3a..9cbba391 100644 --- 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 * -from sfa.util.misc 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 @@ -13,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 - @param a Human readable name (hrn), or list of hrns or None + @param a Human readable name (hrn or urn), or list of names or None @return list of dictionaries with aggregate information. """ @@ -21,13 +21,14 @@ class get_registries(Method): 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")] - 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 = []