Island: Remove unneeded methods in IConfigRepository

Also remove stale comments. No encryption is needed here because
configuration does not contain anything sensitive.
This commit is contained in:
Mike Salvatore 2022-06-17 11:05:55 -04:00
parent 84db00b728
commit 62056175a1
1 changed files with 0 additions and 21 deletions

View File

@ -1,32 +1,11 @@
from abc import ABC
from typing import Any, Sequence
from common.configuration import AgentConfiguration
class IConfigRepository(ABC):
# Config
###############################################
# This returns the current config
# TODO investigate if encryption should be here or where
# TODO potentially should be a DTO as well, but it's structure is defined in schema already
def get_config(self) -> AgentConfiguration:
pass
def set_config(self, config: AgentConfiguration):
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