X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2Fget_trusted_certs.py;h=460ab4dc7972c7b12b9f6293199f6e0c7cadbd46;hb=57b6a99255d4a88be9c0f910f8524677e34ff4bc;hp=c6873143c9125f3e0b0a228eb5f3e58de0d18c53;hpb=f07947ba33ad1e8e7aa6e03e3453fdde1fbe1e4a;p=sfa.git diff --git a/sfa/methods/get_trusted_certs.py b/sfa/methods/get_trusted_certs.py index c6873143..460ab4dc 100644 --- a/sfa/methods/get_trusted_certs.py +++ b/sfa/methods/get_trusted_certs.py @@ -1,36 +1,35 @@ - -### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/methods/reset_slices.py $ - -from sfa.util.faults import * +#from sfa.util.faults import * from sfa.util.method import Method from sfa.util.parameter import Parameter, Mixed from sfa.trust.auth import Auth from sfa.trust.credential import Credential + class get_trusted_certs(Method): """ @param cred credential string specifying the rights of the caller @return list of gid strings """ - interfaces = ['registry'] + interfaces = ['registry', 'aggregate', 'slicemgr'] accepts = [ Mixed(Parameter(str, "Credential string"), Parameter(None, "Credential not specified")) ] - returns = Parameter([str], "List of GID strings") + returns = Parameter(type([str]), "List of GID strings") def call(self, cred = None): # If cred is not specified just return the gid for this interface. # This is true when when a peer is attempting to initiate federation # with this interface + self.api.logger.debug("get_trusted_certs: %r"%cred) if not cred: gid_strings = [] for gid in self.api.auth.trusted_cert_list: if gid.get_hrn() == self.api.config.SFA_INTERFACE_HRN: - gid_strings.append[gid.save_to_string(save_parents=True)] + gid_strings.append(gid.save_to_string(save_parents=True)) return gid_strings # authenticate the cred