diff --git a/monkey/monkey_island/cc/models/__init__.py b/monkey/monkey_island/cc/models/__init__.py index 801da2932..c8e1a0fad 100644 --- a/monkey/monkey_island/cc/models/__init__.py +++ b/monkey/monkey_island/cc/models/__init__.py @@ -9,5 +9,5 @@ from .pba_results import PbaResults from monkey_island.cc.models.report.report import Report from .simulation import Simulation, SimulationSchema, IslandMode from .user_credentials import UserCredentials -from .machine import Machine +from .machine import Machine, MachineID from .communication_type import CommunicationType diff --git a/monkey/monkey_island/cc/models/machine.py b/monkey/monkey_island/cc/models/machine.py index 82d7bcfba..b6f7a04a4 100644 --- a/monkey/monkey_island/cc/models/machine.py +++ b/monkey/monkey_island/cc/models/machine.py @@ -7,9 +7,11 @@ from common import OperatingSystems from .base_models import MutableBaseModel +MachineID = PositiveInt + class Machine(MutableBaseModel): - id: PositiveInt = Field(..., allow_mutation=False) + id: MachineID = Field(..., allow_mutation=False) node_id: Optional[PositiveInt] network_interfaces: Sequence[IPv4Interface] operating_system: OperatingSystems