|
@@ -39,10 +39,10 @@ def delivery_to_grpc(delivery):
|
|
|
)
|
|
|
|
|
|
|
|
|
-def cert_list_to_grpc(cert):
|
|
|
+def cert_list_to_grpc(results):
|
|
|
return Cert(
|
|
|
- certName=cert.get('certName', None),
|
|
|
- certStatus=cert.get('certStatus', None)
|
|
|
+ certName=results['body']['certName'],
|
|
|
+ certStatus=results['body']['certStatus']
|
|
|
)
|
|
|
|
|
|
|
|
@@ -363,13 +363,13 @@ class CertDeliveryServiceServicer(llnwCERT_pb2_grpc.CertDeliveryServiceServicer)
|
|
|
else:
|
|
|
return check_cert_withdraw_error(res)
|
|
|
|
|
|
- def GetCertList(self, request, context):
|
|
|
- print("GetCertList")
|
|
|
+ def ListSSLCert(self, request, context):
|
|
|
+ print("ListSSLCert")
|
|
|
print("请求:", request)
|
|
|
res = get_cl(request.base).list_customer_certificates(shortname=request.shortname).json()
|
|
|
print("响应:", res)
|
|
|
check_error(res, context)
|
|
|
- return ListSSLCertResponse(certList=CertList([cert_list_to_grpc(results) for results in res['results']]))
|
|
|
+ return ListSSLCertResponse(certList=CertList(cert=[cert_list_to_grpc(results=results) for results in res['results']]))
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|