From 8f048a9b34c5a6b92107ae7acc28c94815feb2fa Mon Sep 17 00:00:00 2001 From: vakarisz Date: Wed, 18 May 2022 17:28:26 +0300 Subject: [PATCH] Island: Delete IRepository.py, because it's split up --- monkey/monkey_island/cc/dal/IRepository.py | 59 ---------------------- 1 file changed, 59 deletions(-) delete mode 100644 monkey/monkey_island/cc/dal/IRepository.py diff --git a/monkey/monkey_island/cc/dal/IRepository.py b/monkey/monkey_island/cc/dal/IRepository.py deleted file mode 100644 index 8dd84a330..000000000 --- a/monkey/monkey_island/cc/dal/IRepository.py +++ /dev/null @@ -1,59 +0,0 @@ -from abc import ABC -from typing import Any, Optional, Sequence - -from monkey_island.cc.models import Config, Monkey -from monkey_island.cc.models.edge import Edge - - -class IRepository(ABC): - - # Config - ############################################### - - # This returns the current config - # TODO investigate if encryption should be here or where - def get_config(self) -> dict: - pass - - def set_config(self, config: dict): - pass - - # Used when only a subset of config is submitted, for example only PBAFiles - # Used by passing keys, like ['monkey', 'post_breach_actions', 'linux_filename'] - # Using a list is less ambiguous IMO, than using . notation - def set_config_field(self, key_list: Sequence[str], value: Any): - pass - - # Used when only a subset of config is needed, for example only PBAFiles - # Used by passing keys, like ['monkey', 'post_breach_actions', 'linux_filename'] - # Using a list is less ambiguous IMO, than using . notation - # TODO Still in doubt about encryption, this should probably be determined automatically - def get_config_field(self, key_list: Sequence[str]) -> Any: - pass - - # Edges - ############################################### - - def get_all_edges(self): - pass - - def get_edge(self, src_node_id: str, dst_node_id: str) -> Edge: - pass - - def save_edge(self, edge: Edge): - pass - - def get_by_dst_node(self, dst_node_id: str) -> Sequence[Edge]: - pass - - # If tunnel is None then it gets all edges, if True/False then gets only - # tunneling/non-tunneling edges - def get_by_src_node(self, src_node_id: str, tunnel: Optional[bool] = None) -> Sequence[Edge]: - pass - - def get_by_id(self, edge_id: str) -> Edge: - pass - - # Scan telemetries might change the label once we know more about the target system - def set_label(self, edge_id: str, label: str): - pass