diff --git a/monkey/common/__init__.py b/monkey/common/__init__.py index af48cd045..5dee4b146 100644 --- a/monkey/common/__init__.py +++ b/monkey/common/__init__.py @@ -4,3 +4,4 @@ Used for a common things between agent and island from .di_container import DIContainer, UnresolvableDependencyError from .operating_system import OperatingSystem from . import types +from . import base_models diff --git a/monkey/monkey_island/cc/models/base_models.py b/monkey/common/base_models.py similarity index 100% rename from monkey/monkey_island/cc/models/base_models.py rename to monkey/common/base_models.py diff --git a/monkey/monkey_island/cc/models/agent.py b/monkey/monkey_island/cc/models/agent.py index 73ff8d693..b3e79c4e2 100644 --- a/monkey/monkey_island/cc/models/agent.py +++ b/monkey/monkey_island/cc/models/agent.py @@ -4,8 +4,9 @@ from uuid import UUID from pydantic import Field +from common.base_models import MutableBaseModel + from . import MachineID -from .base_models import MutableBaseModel class Agent(MutableBaseModel): diff --git a/monkey/monkey_island/cc/models/machine.py b/monkey/monkey_island/cc/models/machine.py index 8e2c0d122..1ead17cc6 100644 --- a/monkey/monkey_island/cc/models/machine.py +++ b/monkey/monkey_island/cc/models/machine.py @@ -4,9 +4,9 @@ from typing import Optional, Sequence from pydantic import Field, PositiveInt, validator from common import OperatingSystem +from common.base_models import MutableBaseModel from common.types import HardwareID -from .base_models import MutableBaseModel from .transforms import make_immutable_sequence MachineID = PositiveInt diff --git a/monkey/monkey_island/cc/models/node.py b/monkey/monkey_island/cc/models/node.py index 6fa307734..136633aa6 100644 --- a/monkey/monkey_island/cc/models/node.py +++ b/monkey/monkey_island/cc/models/node.py @@ -2,8 +2,9 @@ from typing import Sequence, Tuple from pydantic import Field, validator +from common.base_models import MutableBaseModel + from . import CommunicationType, MachineID -from .base_models import MutableBaseModel from .transforms import make_immutable_nested_sequence ConnectionsSequence = Sequence[Tuple[MachineID, Sequence[CommunicationType]]]