From 942e97cf18012434804001857ad408d533e90be6 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 1 Jul 2022 11:04:22 -0400 Subject: [PATCH] Island: Decouple ConfigService.reset_config() from island_mode_service --- monkey/monkey_island/cc/services/config.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/monkey/monkey_island/cc/services/config.py b/monkey/monkey_island/cc/services/config.py index 3cb5ce09f..99f5a589c 100644 --- a/monkey/monkey_island/cc/services/config.py +++ b/monkey/monkey_island/cc/services/config.py @@ -23,10 +23,7 @@ from monkey_island.cc.server_utils.encryption import ( encrypt_dict, get_datastore_encryptor, ) -from monkey_island.cc.services.config_manipulator import update_config_per_mode from monkey_island.cc.services.config_schema.config_schema import SCHEMA -from monkey_island.cc.services.mode.island_mode_service import get_mode -from monkey_island.cc.services.mode.mode_enum import IslandModeEnum from monkey_island.cc.services.post_breach_files import PostBreachFilesService logger = logging.getLogger(__name__) @@ -250,14 +247,6 @@ class ConfigService: @staticmethod def reset_config(): PostBreachFilesService.remove_PBA_files() - config = ConfigService.get_default_config(True) - - mode = get_mode() - if mode == IslandModeEnum.UNSET.value: - ConfigService.update_config(config, should_encrypt=False) - else: - update_config_per_mode(mode, config, should_encrypt=False) - logger.info("Monkey config reset was called") @staticmethod