same change for rotate region
This commit is contained in:
parent
63e9fdd0e1
commit
b80b6d0959
|
@ -413,16 +413,13 @@ def rotate_region(endpoint_name, new_certificate_name, old_certificate_name, mes
|
|||
)
|
||||
continue
|
||||
|
||||
if len(endpoint.certificate.replaced) == 1:
|
||||
log_data["certificate"] = endpoint.certificate.replaced[0].name
|
||||
log_data["message"] = "Rotating all endpoints in region"
|
||||
print(log_data)
|
||||
current_app.logger.info(log_data)
|
||||
if len(endpoint.certificate.replaced) > 1:
|
||||
log_data["message"] = f"Multiple replacement certificates found, going with the first one out of " \
|
||||
f"{len(endpoint.certificate.replaced)}"
|
||||
|
||||
request_rotation(endpoint, endpoint.certificate.replaced[0], message, commit)
|
||||
status = SUCCESS_METRIC_STATUS
|
||||
else:
|
||||
status = FAILURE_METRIC_STATUS
|
||||
log_data["message"] = "Failed to rotate endpoint due to Multiple replacement certificates found"
|
||||
print(log_data)
|
||||
current_app.logger.info(log_data)
|
||||
|
||||
|
|
Loading…
Reference in New Issue