From 822d9d6eec823a1b36fef99fa58d628fa9237ade Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 21 Sep 2022 16:13:33 +0530 Subject: [PATCH] Island: Rename set_island_mode -> set_agent_configuration_per_island_mode --- monkey/monkey_island/cc/island_event_handlers/__init__.py | 2 +- ...d_mode.py => set_agent_configuration_per_island_mode.py} | 2 +- monkey/monkey_island/cc/setup/island_event_handlers.py | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) rename monkey/monkey_island/cc/island_event_handlers/{set_island_mode.py => set_agent_configuration_per_island_mode.py} (96%) diff --git a/monkey/monkey_island/cc/island_event_handlers/__init__.py b/monkey/monkey_island/cc/island_event_handlers/__init__.py index 92e385715..11343c2fa 100644 --- a/monkey/monkey_island/cc/island_event_handlers/__init__.py +++ b/monkey/monkey_island/cc/island_event_handlers/__init__.py @@ -1,3 +1,3 @@ from .reset_agent_configuration import reset_agent_configuration from .reset_machine_repository import reset_machine_repository -from .set_island_mode import set_island_mode +from .set_agent_configuration_per_island_mode import set_agent_configuration_per_island_mode diff --git a/monkey/monkey_island/cc/island_event_handlers/set_island_mode.py b/monkey/monkey_island/cc/island_event_handlers/set_agent_configuration_per_island_mode.py similarity index 96% rename from monkey/monkey_island/cc/island_event_handlers/set_island_mode.py rename to monkey/monkey_island/cc/island_event_handlers/set_agent_configuration_per_island_mode.py index 9e13ccef2..654dd1ebc 100644 --- a/monkey/monkey_island/cc/island_event_handlers/set_island_mode.py +++ b/monkey/monkey_island/cc/island_event_handlers/set_agent_configuration_per_island_mode.py @@ -5,7 +5,7 @@ from monkey_island.cc.models import IslandMode from monkey_island.cc.repository import IAgentConfigurationRepository -class set_island_mode: +class set_agent_configuration_per_island_mode: """ Callable class that sets the Island's mode """ diff --git a/monkey/monkey_island/cc/setup/island_event_handlers.py b/monkey/monkey_island/cc/setup/island_event_handlers.py index 274399eb2..4f86cca33 100644 --- a/monkey/monkey_island/cc/setup/island_event_handlers.py +++ b/monkey/monkey_island/cc/setup/island_event_handlers.py @@ -5,7 +5,7 @@ from monkey_island.cc.event_queue import IIslandEventQueue, IslandEventTopic from monkey_island.cc.island_event_handlers import ( reset_agent_configuration, reset_machine_repository, - set_island_mode, + set_agent_configuration_per_island_mode, ) from monkey_island.cc.repository import ( IAgentEventRepository, @@ -59,4 +59,6 @@ def _subscribe_clear_simulation_data_events( def _subscribe_set_island_mode_events( island_event_queue: IIslandEventQueue, container: DIContainer ): - island_event_queue.subscribe(IslandEventTopic.SET_MODE, container.resolve(set_island_mode)) + island_event_queue.subscribe( + IslandEventTopic.SET_MODE, container.resolve(set_agent_configuration_per_island_mode) + )