Skip to content

Commit

Permalink
added missing jujutopology fields, made the model private
Browse files Browse the repository at this point in the history
  • Loading branch information
PietroPasotti committed Jul 1, 2024
1 parent 7d1d957 commit b49fdff
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/tempo_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ class DatabagAccessPermissionError(TempoClusterError):
"""Raised when a follower attempts to write leader settings."""


class JujuTopology(pydantic.BaseModel):
"""JujuTopology."""

class _JujuTopologyModel(pydantic.BaseModel):
"""_JujuTopologyModel."""
model: str
model_uuid: str
application: str
charm_name: str
unit: str
# ...


# DatabagModel implementation from traefik.v1.ingress charm lib.
Expand Down Expand Up @@ -246,7 +247,7 @@ class TempoClusterRequirerAppData(DatabagModel):
class TempoClusterRequirerUnitData(DatabagModel):
"""TempoClusterRequirerUnitData."""

juju_topology: JujuTopology
juju_topology: _JujuTopologyModel
address: str


Expand Down Expand Up @@ -284,7 +285,6 @@ def __init__(
):
super().__init__(charm, key or endpoint)
self._charm = charm
self.juju_topology = {"unit": self.model.unit.name, "model": self.model.name}

# filter out common unhappy relation states
self._relations: List[ops.Relation] = [
Expand Down

0 comments on commit b49fdff

Please sign in to comment.