feat: add control board replacement workflow
This commit is contained in:
1 parent
62c91a2c3e
commit
bcf1b4e3cf
16 files changed
+2122
-279
No files matched your search
@@ -107,3 +107,31 @@ class RepairActiveMismatch(RepairConflict):
|
||||
|
||||
class RepairPersistenceError(RepairError):
|
||||
"""Raised when a required repair persistence operation fails."""
|
||||
|
||||
|
||||
class ControlBoardReplacementActorRequired(RepairError):
|
||||
"""Raised when a board replacement lacks an authenticated actor."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("An authenticated actor is required to replace a control board")
|
||||
|
||||
|
||||
class ControlBoardReplacementConflict(RepairConflict):
|
||||
"""Raised when current repair, component, or MAC state blocks replacement."""
|
||||
|
||||
|
||||
class InvalidMacAddress(RepairError):
|
||||
"""Raised when a replacement MAC is malformed or prohibited."""
|
||||
|
||||
def __init__(self, message: str = "New MAC address is invalid"):
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
class MacOwnershipConflict(ControlBoardReplacementConflict):
|
||||
"""Raised when a MAC belongs to another durable miner."""
|
||||
|
||||
def __init__(self, normalized_mac: str):
|
||||
self.normalized_mac = normalized_mac
|
||||
super().__init__(
|
||||
"MAC address has current or historical ownership on another miner"
|
||||
)
|
||||
Reference in new issue
Block a user