Splits the 694-line topology.py into five submixin files plus a
composing TopologyMixin in topology/__init__.py:
_core.py (~225) topologies CRUD + _assert_pending /
_check_and_bump_version concurrency guards
lans.py (~115) LAN CRUD
deckies.py (~130) topology decky CRUD + list_running_topology_deckies
edges.py (~80) edge CRUD + status-event log
mutations.py (~165) live reconciler queue (atomic claim + state writes)
Sibling submixins call self._assert_pending and
self._check_and_bump_version; MRO resolves them onto TopologyCoreMixin
through the composed SQLModelRepository class.
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
"""MazeNET topology repository methods.
|
|
|
|
The full domain spans ~700 lines of methods across topologies, LANs,
|
|
deckies, edges, the status-event log, and the live reconciler mutation
|
|
queue. Each concern lives in its own submixin; ``TopologyMixin``
|
|
composes them.
|
|
|
|
The optimistic-locking helpers (``_assert_pending``,
|
|
``_check_and_bump_version``) live on ``TopologyCoreMixin`` and are
|
|
reached from sibling submixins via ``self.`` — Python's MRO resolves
|
|
them to the core mixin no matter which submixin holds the caller.
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
from decnet.web.db.sqlmodel_repo.topology._core import TopologyCoreMixin
|
|
from decnet.web.db.sqlmodel_repo.topology.deckies import TopologyDeckiesMixin
|
|
from decnet.web.db.sqlmodel_repo.topology.edges import TopologyEdgesMixin
|
|
from decnet.web.db.sqlmodel_repo.topology.lans import LansMixin
|
|
from decnet.web.db.sqlmodel_repo.topology.mutations import TopologyMutationsMixin
|
|
|
|
|
|
class TopologyMixin(
|
|
TopologyDeckiesMixin,
|
|
TopologyEdgesMixin,
|
|
LansMixin,
|
|
TopologyMutationsMixin,
|
|
TopologyCoreMixin,
|
|
):
|
|
"""Composed topology mixin — see submixins for the actual methods."""
|
|
|
|
|
|
__all__ = ["TopologyMixin"]
|