Island: Add docstrings to Machine

This commit is contained in:
Mike Salvatore 2022-08-29 14:35:45 -04:00
parent 43a53112fc
commit ebcfe5a9fc
1 changed files with 13 additions and 0 deletions

View File

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