forked from p15670423/monkey
Common: Use MachineID instead of int in AbstractAgentEvent.target
This commit is contained in:
parent
1b2b316e1f
commit
f7ab5c5dd8
|
@ -6,7 +6,7 @@ from typing import FrozenSet, Union
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
|
|
||||||
from common.base_models import InfectionMonkeyBaseModel
|
from common.base_models import InfectionMonkeyBaseModel
|
||||||
from common.types import AgentID
|
from common.types import AgentID, MachineID
|
||||||
|
|
||||||
|
|
||||||
class AbstractAgentEvent(InfectionMonkeyBaseModel, ABC):
|
class AbstractAgentEvent(InfectionMonkeyBaseModel, ABC):
|
||||||
|
@ -25,6 +25,6 @@ class AbstractAgentEvent(InfectionMonkeyBaseModel, ABC):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
source: AgentID
|
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)
|
timestamp: float = Field(default_factory=time.time)
|
||||||
tags: FrozenSet[str] = Field(default_factory=frozenset)
|
tags: FrozenSet[str] = Field(default_factory=frozenset)
|
||||||
|
|
Loading…
Reference in New Issue