configure_pod = EventSource(ConfigurePodEvent)
+
class KeystoneCharm(CharmBase):
"""Keystone K8s Charm"""
event (EventBase): DB relation event to access database
information.
"""
- if not event.unit in event.relation.data:
+ if event.unit not in event.relation.data:
return
relation_data = event.relation.data[event.unit]
db_host = relation_data.get("host")
self.state.db_password = db_password
self.on.configure_pod.emit()
-
def _on_db_relation_departed(self, event: EventBase) -> NoReturn:
"""Clears data from db relation.