Island: Add docstrings to Node model

This commit is contained in:
Mike Salvatore 2022-09-07 09:39:39 -04:00
parent 094a0b1a8d
commit 35ecdb11ab
1 changed files with 11 additions and 0 deletions

View File

@ -10,5 +10,16 @@ NodeConnections: TypeAlias = Mapping[MachineID, Tuple[CommunicationType, ...]]
class Node(MutableInfectionMonkeyBaseModel):
"""
A network node and its outbound connections/communications
A node is identified by a MachineID and tracks all outbound communication to other machines on
the network. This is particularly useful for creating graphs of Infection Monkey's activity
throughout the network.
"""
machine_id: MachineID = Field(..., allow_mutation=False)
"""The MachineID of the node (source)"""
connections: NodeConnections
"""All outbound connections from this node to other machines"""