Island: Add MachineID type definition

This commit is contained in:
Mike Salvatore 2022-08-18 09:43:22 -04:00
parent 54db99350d
commit 3fd7051869
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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