From ebcfe5a9fc729ea17f48fd2d70de56c2bd5de91d Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 29 Aug 2022 14:35:45 -0400 Subject: [PATCH] Island: Add docstrings to Machine --- monkey/monkey_island/cc/models/machine.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/monkey/monkey_island/cc/models/machine.py b/monkey/monkey_island/cc/models/machine.py index 77000c39a..17771c016 100644 --- a/monkey/monkey_island/cc/models/machine.py +++ b/monkey/monkey_island/cc/models/machine.py @@ -12,12 +12,25 @@ MachineID: TypeAlias = PositiveInt class Machine(MutableInfectionMonkeyBaseModel): + """Represents machines, VMs, or other network nodes discovered by Infection Monkey""" + id: MachineID = Field(..., allow_mutation=False) + """Uniquely identifies the machine within the island""" + hardware_id: Optional[HardwareID] + """An identifier generated by the agent that uniquely identifies a machine""" + network_interfaces: Sequence[IPv4Interface] + """The machine's networking interfaces""" + operating_system: OperatingSystem + """The operating system the machine is running""" + operating_system_version: str + """The specific version of the operating system the machine is running""" + hostname: str + """The hostname of the machine""" _make_immutable_sequence = validator("network_interfaces", pre=True, allow_reuse=True)( make_immutable_sequence