Skip to content

Commit

Permalink
chore: only log when action is completed (#435)
Browse files Browse the repository at this point in the history
Signed-off-by: guillaume <[email protected]>
  • Loading branch information
gruyaume authored Jul 22, 2024
1 parent 1ca1793 commit 8c1d909
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/charms/vault_k8s/v0/vault_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 10
LIBPATCH = 11


class LogAdapter(logging.LoggerAdapter):
Expand Down Expand Up @@ -229,11 +229,11 @@ def send_ca_cert(self):
self.certificate_transfer.set_certificate(
certificate="", ca=ca, chain=[], relation_id=relation.id
)
logger.info("Sent CA certificate to other relations")
logger.info("Sent CA certificate to relation %s", relation.id)
else:
for relation in self.charm.model.relations.get(SEND_CA_CERT_RELATION_NAME, []):
self.certificate_transfer.remove_certificate(relation.id)
logger.info("Removed CA cert from relations")
logger.info("Removed CA cert from relation %s", relation.id)

def _generate_self_signed_certs(self, subject_ip: str) -> None:
"""Recreate a unit certificate from the Vault CA certificate, then saves it.
Expand Down

0 comments on commit 8c1d909

Please sign in to comment.