projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add tox tests for osm charms in devops
[osm/devops.git]
/
installers
/
charm
/
keystone
/
src
/
charm.py
diff --git
a/installers/charm/keystone/src/charm.py
b/installers/charm/keystone/src/charm.py
index
637461e
..
d5c169b
100755
(executable)
--- a/
installers/charm/keystone/src/charm.py
+++ b/
installers/charm/keystone/src/charm.py
@@
-68,6
+68,7
@@
class KeystoneEvents(CharmEvents):
configure_pod = EventSource(ConfigurePodEvent)
configure_pod = EventSource(ConfigurePodEvent)
+
class KeystoneCharm(CharmBase):
"""Keystone K8s Charm"""
class KeystoneCharm(CharmBase):
"""Keystone K8s Charm"""
@@
-142,7
+143,7
@@
class KeystoneCharm(CharmBase):
event (EventBase): DB relation event to access database
information.
"""
event (EventBase): DB relation event to access database
information.
"""
- if
not event.uni
t in event.relation.data:
+ if
event.unit no
t in event.relation.data:
return
relation_data = event.relation.data[event.unit]
db_host = relation_data.get("host")
return
relation_data = event.relation.data[event.unit]
db_host = relation_data.get("host")
@@
-168,7
+169,6
@@
class KeystoneCharm(CharmBase):
self.state.db_password = db_password
self.on.configure_pod.emit()
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.
def _on_db_relation_departed(self, event: EventBase) -> NoReturn:
"""Clears data from db relation.