Island: Use monkey_island.cc.models.Machine in IMachineRepository

This commit is contained in:
Mike Salvatore 2022-08-24 08:55:35 -04:00
parent cff363597a
commit 43a53112fc
1 changed files with 5 additions and 6 deletions

View File

@ -1,20 +1,19 @@
from abc import ABC
from typing import Optional, Sequence
from monkey_island.cc.models import Machine
class IMachineRepository(ABC):
# TODO define Machine object(ORM model)
def save_machine(self, machine: Machine): # noqa: F821
def save_machine(self, machine: Machine):
pass
# TODO define Machine object(ORM model)
# TODO define or re-use machine state.
# TODO investigate where should the state be stored in edge or both edge and machine
def get_machines(
self,
id: Optional[str] = None,
ips: Optional[Sequence[str]] = None,
state: Optional[MachineState] = None, # noqa: F821
is_island: Optional[bool] = None, # noqa: F841
) -> Sequence[Machine]: # noqa: F821
is_island: Optional[bool] = None,
) -> Sequence[Machine]:
pass