Insert cert status during domain migration
Prior to this, the domain migration process would leave the cert status table in an inaccurate state. Migrated domains that had ssl_cert deleted prior to migration could be missing from the cert_status table. Change-Id: Ie9d7c804459b32babc1ffe4c7fd8adcffcd22346
This commit is contained in:
parent
a891d47775
commit
7ec702209a
|
@ -115,6 +115,10 @@ class CertificatesController(base.CertificatesController):
|
||||||
CQL_CREATE_CERT,
|
CQL_CREATE_CERT,
|
||||||
consistency_level=self._driver.consistency_level)
|
consistency_level=self._driver.consistency_level)
|
||||||
self.session.execute(stmt, args)
|
self.session.execute(stmt, args)
|
||||||
|
self.insert_cert_status(
|
||||||
|
cert_obj.domain_name,
|
||||||
|
cert_obj.get_cert_status()
|
||||||
|
)
|
||||||
|
|
||||||
def delete_certificate(self, project_id, domain_name, cert_type):
|
def delete_certificate(self, project_id, domain_name, cert_type):
|
||||||
args = {
|
args = {
|
||||||
|
@ -171,6 +175,10 @@ class CertificatesController(base.CertificatesController):
|
||||||
"state: {0}".format(cert_details))
|
"state: {0}".format(cert_details))
|
||||||
LOG.error(e)
|
LOG.error(e)
|
||||||
else:
|
else:
|
||||||
|
# insert/update for cassandra
|
||||||
|
self.insert_cert_status(domain_name, cert_status)
|
||||||
|
|
||||||
|
def insert_cert_status(self, domain_name, cert_status):
|
||||||
cert_args = {
|
cert_args = {
|
||||||
'domain_name': domain_name,
|
'domain_name': domain_name,
|
||||||
'status': cert_status
|
'status': cert_status
|
||||||
|
|
Loading…
Reference in New Issue