(cert_ref, service_name='Magnum', resource_ref=None,
                    **kwargs)
Deletes the specified cert.

        :param cert_ref: the UUID of the cert to delete
        :raises Exception: if certificate deletion fails
Deletes the specified cert.
Deletes the specified cert .
def delete_cert(cert_ref, service_name='Magnum', resource_ref=None,
                    **kwargs):
        """Deletes the specified cert.

        :param cert_ref: the UUID of the cert to delete
        :raises Exception: if certificate deletion fails
        """
        connection = get_admin_clients().barbican()

        LOG.info(
            "Recursively deleting certificate container %s from Barbican.",
            cert_ref)
        try:
            certificate_container = connection.containers.get(cert_ref)
            certificate_container.certificate.delete()
            if certificate_container.intermediates:
                certificate_container.intermediates.delete()
            if certificate_container.private_key_passphrase:
                certificate_container.private_key_passphrase.delete()
            certificate_container.private_key.delete()
            certificate_container.delete()
        except barbican_exc.HTTPClientError:
            with excutils.save_and_reraise_exception():
                LOG.exception(
                    "Error recursively deleting certificate container %s",
                    cert_ref)
def delete_cert ( cert_ref , service_name = 'Magnum' , resource_ref = None , * * kwargs ) : connection = get_admin_clients ( ) . barbican ( ) LOG . info ( "Recursively deleting certificate container %s from Barbican." , cert_ref ) try : certificate_container = connection . containers . get ( cert_ref ) certificate_container . certificate . delete ( ) if certificate_container . intermediates : certificate_container . intermediates . delete ( ) if certificate_container . private_key_passphrase : certificate_container . private_key_passphrase . delete ( ) certificate_container . private_key . delete ( ) certificate_container . delete ( ) except barbican_exc . HTTPClientError : with excutils . save_and_reraise_exception ( ) : LOG . exception ( "Error recursively deleting certificate container %s" , cert_ref )