From aaebd7418154b3a50d23a69e54ccabe71b52e627 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 5 Aug 2022 08:54:09 +0200 Subject: [PATCH] Island: Export AgentConfiguration resource from __init__ --- monkey/monkey_island/cc/app.py | 2 +- monkey/monkey_island/cc/resources/__init__.py | 1 + .../monkey_island/cc/resources/test_agent_configuration.py | 4 +--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/app.py b/monkey/monkey_island/cc/app.py index 570d1bee8..3090deed7 100644 --- a/monkey/monkey_island/cc/app.py +++ b/monkey/monkey_island/cc/app.py @@ -12,6 +12,7 @@ from common import DIContainer from monkey_island.cc.database import database, mongo from monkey_island.cc.resources import ( AgentBinaries, + AgentConfiguration, ClearSimulationData, IPAddresses, IslandLog, @@ -20,7 +21,6 @@ from monkey_island.cc.resources import ( ResetAgentConfiguration, ) from monkey_island.cc.resources.AbstractResource import AbstractResource -from monkey_island.cc.resources.agent_configuration import AgentConfiguration from monkey_island.cc.resources.agent_controls import StopAgentCheck, StopAllAgents from monkey_island.cc.resources.attack.attack_report import AttackReport from monkey_island.cc.resources.auth.authenticate import Authenticate, init_jwt diff --git a/monkey/monkey_island/cc/resources/__init__.py b/monkey/monkey_island/cc/resources/__init__.py index 91024a6e3..a345595a3 100644 --- a/monkey/monkey_island/cc/resources/__init__.py +++ b/monkey/monkey_island/cc/resources/__init__.py @@ -5,3 +5,4 @@ from .island_log import IslandLog from .reset_agent_configuration import ResetAgentConfiguration from .propagation_credentials import PropagationCredentials from .ip_addresses import IPAddresses +from .agent_configuration import AgentConfiguration diff --git a/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py b/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py index e809084b9..b383bd013 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py +++ b/monkey/tests/unit_tests/monkey_island/cc/resources/test_agent_configuration.py @@ -8,9 +8,7 @@ from tests.unit_tests.monkey_island.conftest import get_url_for_resource from common.agent_configuration import AgentConfiguration from monkey_island.cc.repository import IAgentConfigurationRepository -from monkey_island.cc.resources.agent_configuration import ( - AgentConfiguration as AgentConfigurationResource, -) +from monkey_island.cc.resources import AgentConfiguration as AgentConfigurationResource AGENT_CONFIGURATION_URL = get_url_for_resource(AgentConfigurationResource)