From 410401a3197833b638fc2f38e670910fca5355e0 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 1 Jul 2022 12:44:35 -0400 Subject: [PATCH] Island; Remove disused IslandMode mongo document --- monkey/monkey_island/cc/models/island_mode_model.py | 7 ------- monkey/monkey_island/cc/services/database.py | 3 +-- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 monkey/monkey_island/cc/models/island_mode_model.py diff --git a/monkey/monkey_island/cc/models/island_mode_model.py b/monkey/monkey_island/cc/models/island_mode_model.py deleted file mode 100644 index 8d6aab74a..000000000 --- a/monkey/monkey_island/cc/models/island_mode_model.py +++ /dev/null @@ -1,7 +0,0 @@ -from mongoengine import Document, StringField - - -class IslandMode(Document): - COLLECTION_NAME = "island_mode" - - mode = StringField() diff --git a/monkey/monkey_island/cc/services/database.py b/monkey/monkey_island/cc/services/database.py index 46b5e0ffd..3dd512026 100644 --- a/monkey/monkey_island/cc/services/database.py +++ b/monkey/monkey_island/cc/services/database.py @@ -6,7 +6,6 @@ from monkey_island.cc.database import mongo from monkey_island.cc.models import Config from monkey_island.cc.models.agent_controls import AgentControls from monkey_island.cc.models.attack.attack_mitigations import AttackMitigations -from monkey_island.cc.models.island_mode_model import IslandMode from monkey_island.cc.services.config import ConfigService logger = logging.getLogger(__name__) @@ -33,7 +32,7 @@ class Database(object): @staticmethod def _should_drop(collection: str, drop_config: bool) -> bool: if not drop_config: - if collection == IslandMode.COLLECTION_NAME or collection == Config.COLLECTION_NAME: + if collection == Config.COLLECTION_NAME: return False return ( not collection.startswith("system.")