Common: Use MachineID instead of int in AbstractAgentEvent.target

This commit is contained in:
Mike Salvatore 2022-09-14 12:54:49 -04:00
parent 1b2b316e1f
commit f7ab5c5dd8
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ from typing import FrozenSet, Union
from pydantic import Field
from common.base_models import InfectionMonkeyBaseModel
from common.types import AgentID
from common.types import AgentID, MachineID
class AbstractAgentEvent(InfectionMonkeyBaseModel, ABC):
@ -25,6 +25,6 @@ class AbstractAgentEvent(InfectionMonkeyBaseModel, ABC):
"""
source: AgentID
target: Union[int, IPv4Address, None] = Field(default=None)
target: Union[MachineID, IPv4Address, None] = Field(default=None)
timestamp: float = Field(default_factory=time.time)
tags: FrozenSet[str] = Field(default_factory=frozenset)