(self, certificate)
return Certificate.convert_with_links(new_cert)
Sign a new certificate by the CA.

        :param certificate: a certificate within the request body.
Sign a new certificate by the CA.
Sign a new certificate by the CA .
def post(self, certificate):
        """Sign a new certificate by the CA.

        :param certificate: a certificate within the request body.
        """
        context = pecan.request.context
        cluster = certificate.get_cluster()
        policy.enforce(context, 'certificate:create', cluster.as_dict(),
                       action='certificate:create')
        certificate_dict = certificate.as_dict()
        certificate_dict['project_id'] = context.project_id
        certificate_dict['user_id'] = context.user_id
        cert_obj = objects.Certificate(context, **certificate_dict)

        new_cert = pecan.request.rpcapi.sign_certificate(cluster,
                                                         cert_obj)
        return Certificate.convert_with_links(new_cert)
def post ( self , certificate ) : context = pecan . request . context cluster = certificate . get_cluster ( ) policy . enforce ( context , 'certificate:create' , cluster . as_dict ( ) , action = 'certificate:create' ) certificate_dict = certificate . as_dict ( ) certificate_dict [ 'project_id' ] = context . project_id certificate_dict [ 'user_id' ] = context . user_id cert_obj = objects . Certificate ( context , * * certificate_dict ) new_cert = pecan . request . rpcapi . sign_certificate ( cluster , cert_obj ) return Certificate . convert_with_links ( new_cert )