Island: Decouple ConfigService.reset_config() from island_mode_service

This commit is contained in:
Mike Salvatore 2022-07-01 11:04:22 -04:00
parent 350ac6957f
commit 942e97cf18
1 changed files with 0 additions and 11 deletions

View File

@ -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