Skip to content

Commit

Permalink
Modify method to not be private
Browse files Browse the repository at this point in the history
  • Loading branch information
shayancanonical committed Sep 23, 2024
1 parent 9649f9e commit 84dcf99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/machine_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def host_address(self) -> str:
"""The host address for the machine."""
if (
self._ha_cluster.relation
and self._ha_cluster._is_clustered()
and self._ha_cluster.is_clustered()
and self.config.get("vip")
):
return self.config["vip"]
Expand Down
4 changes: 2 additions & 2 deletions src/relations/hacluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def relation(self) -> Optional[ops.Relation]:
"""Returns the relations in this model, or None if hacluster is not initialised."""
return self.charm.model.get_relation(HACLUSTER_RELATION_NAME)

def _is_clustered(self) -> bool:
def is_clustered(self) -> bool:
"""Check if the related hacluster charm is clustered."""
for key, value in self.relation.data.items():
if (
Expand Down Expand Up @@ -69,7 +69,7 @@ def set_vip(self, vip: Optional[str]) -> None:
if not self.relation:
return

if not self._is_clustered():
if not self.is_clustered():
logger.debug("early exit set_vip: ha relation not yet clustered")
return

Expand Down

0 comments on commit 84dcf99

Please sign in to comment.