Island: Add {get,set}_mode() to ISimulationRepository

This commit is contained in:
Mike Salvatore 2022-07-01 09:19:51 -04:00
parent 8b10d81d48
commit a24bf921c1
1 changed files with 20 additions and 0 deletions

View File

@ -1,6 +1,7 @@
from abc import ABC
from monkey_island.cc.models import Simulation
from monkey_island.cc.services.mode.mode_enum import IslandModeEnum
class ISimulationRepository(ABC):
@ -9,3 +10,22 @@ class ISimulationRepository(ABC):
def get_simulation(self):
pass
def get_mode(self) -> IslandModeEnum:
"""
Get's the island's current mode
:return The island's current mode
:raises RetrievalError: If the mode could not be retrieved
"""
pass
def set_mode(self, mode: IslandModeEnum):
"""
Set the island's mode
:param mode: The island's new mode
:raises StorageError: If the mode could not be saved
"""
pass