def get_certificates(self, status=None): """Returns all the certificates attached to a master Optionally you can specify a `status` for the certificates. The statuses can either be * "SIGNATURE PENDING" * "SIGNED" * "REVOKED" If status is None, all the certifictes will be returned regardless of their status Note that it is just for conveinence that this option is provided. From the API's point of view we will issue the same request anyway. :param status: The status of the certificates :type status: str :return: A list of matching certificates :rtype: List of ppaas.Certificate """ if status is None: return Certificate.get_certificates(self, self.client) else: certificates = Certificate.get_certificates(self, self.client) return [ cert for cert in certificates if cert.status['message'] == status ]
def get_certificates(self, status=None): """Returns all the certificates attached to a master Optionally you can specify a `status` for the certificates. The statuses can either be * "SIGNATURE PENDING" * "SIGNED" * "REVOKED" If status is None, all the certifictes will be returned regardless of their status Note that it is just for conveinence that this option is provided. From the API's point of view we will issue the same request anyway. :param status: The status of the certificates :type status: str :return: A list of matching certificates :rtype: List of ppaas.Certificate """ if status is None: return Certificate.get_certificates(self, self.client) else: certificates = Certificate.get_certificates(self, self.client) return [cert for cert in certificates if cert.status['message'] == status]