Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri committed Sep 28, 2023
1 parent 6213835 commit bd07155
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/charms/mongodb/v0/shards_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# to 0 if you are raising the major API version
LIBPATCH = 1
KEYFILE_KEY = "key-file"
OPERATOR_PASSWORD_KEY = "operator-password"
OPERATOR_PASSWORD_KEY = MongoDBUser.get_password_key_name_for_user(OperatorUser.get_username())


class ShardingProvider(Object):
Expand Down Expand Up @@ -75,7 +75,7 @@ def _on_relation_joined(self, event):
{
OPERATOR_PASSWORD_KEY: self.charm.get_secret(
Config.Relations.APP_SCOPE,
MongoDBUser.get_password_key_name_for_user(OperatorUser.get_username()),
OPERATOR_PASSWORD_KEY,
),
KEYFILE_KEY: self.charm.get_secret(
Config.Relations.APP_SCOPE, Config.Secrets.SECRET_KEYFILE_NAME
Expand Down Expand Up @@ -173,7 +173,7 @@ def update_operator_password(self, new_password: str) -> None:
current_password = (
self.charm.get_secret(
Config.Relations.APP_SCOPE,
MongoDBUser.get_password_key_name_for_user(OperatorUser.get_username()),
OPERATOR_PASSWORD_KEY,
),
)

Expand All @@ -200,7 +200,7 @@ def update_operator_password(self, new_password: str) -> None:

self.charm.set_secret(
Config.Relations.APP_SCOPE,
MongoDBUser.get_password_key_name_for_user(OperatorUser.get_username()),
OPERATOR_PASSWORD_KEY,
new_password,
)

Expand Down

0 comments on commit bd07155

Please sign in to comment.