diff --git a/src/anycastd/healthcheck/_cabourotte/main.py b/src/anycastd/healthcheck/_cabourotte/main.py index 499bacf..9254178 100644 --- a/src/anycastd/healthcheck/_cabourotte/main.py +++ b/src/anycastd/healthcheck/_cabourotte/main.py @@ -25,6 +25,12 @@ def __repr__(self) -> str: f"interval={self.interval!r})" ) + def __eq__(self, other: object) -> bool: + if not isinstance(other, CabourotteHealthcheck): + return NotImplemented + + return self.__dict__ == other.__dict__ + @property def interval(self) -> datetime.timedelta: return self.__interval diff --git a/src/anycastd/prefix/_frrouting/main.py b/src/anycastd/prefix/_frrouting/main.py index d06a40b..6bf10cc 100644 --- a/src/anycastd/prefix/_frrouting/main.py +++ b/src/anycastd/prefix/_frrouting/main.py @@ -47,6 +47,12 @@ def __repr__(self) -> str: f"vtysh={self.vtysh!r}, executor={self.executor!r})" ) + def __eq__(self, other: object) -> bool: + if not isinstance(other, FRRoutingPrefix): + return NotImplemented + + return self.__dict__ == other.__dict__ + @property def prefix(self) -> IPv4Network | IPv6Network: return self.__prefix