Skip to content

Commit

Permalink
remove unused bits
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri committed Sep 12, 2024
1 parent 3122eef commit 43cea1e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ share/

/requirements.txt
/requirements-last-build.txt
/charm_internal_version
/charm_internal_version
13 changes: 1 addition & 12 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
)

from config import Config
from exceptions import AdminUserCreationError, MissingSecretError, NotConfigServerError
from exceptions import AdminUserCreationError, MissingSecretError

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -1561,17 +1561,6 @@ def is_relation_feasible(self, rel_interface: str) -> bool:

return True

def is_cluster_on_same_revision(self) -> bool:
"""Returns True if the cluster is using the same charm revision.
Note: This can only be determined by the config-server since shards are not integrated to
each other.
"""
if not self.is_role(Config.Role.CONFIG_SERVER):
raise NotConfigServerError("This check can only be ran by the config-server.")

return self.version_checker.are_related_apps_valid()

def is_sharding_component(self) -> bool:
"""Returns true if charm is running as a sharded component."""
return self.is_role(Config.Role.SHARD) or self.is_role(Config.Role.CONFIG_SERVER)
Expand Down
4 changes: 0 additions & 4 deletions src/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,3 @@ class MissingSecretError(MongoSecretError):

class SecretAlreadyExistsError(MongoSecretError):
"""A secret that we want to create already exists."""


class NotConfigServerError(Exception):
"""Raised when an operation is performed on a component that is not a config server."""

0 comments on commit 43cea1e

Please sign in to comment.