forked from p15670423/monkey
Island: Use monkey_island.cc.models.Machine in IMachineRepository
This commit is contained in:
parent
cff363597a
commit
43a53112fc
|
@ -1,20 +1,19 @@
|
||||||
from abc import ABC
|
from abc import ABC
|
||||||
from typing import Optional, Sequence
|
from typing import Optional, Sequence
|
||||||
|
|
||||||
|
from monkey_island.cc.models import Machine
|
||||||
|
|
||||||
|
|
||||||
class IMachineRepository(ABC):
|
class IMachineRepository(ABC):
|
||||||
# TODO define Machine object(ORM model)
|
def save_machine(self, machine: Machine):
|
||||||
def save_machine(self, machine: Machine): # noqa: F821
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# TODO define Machine object(ORM model)
|
|
||||||
# TODO define or re-use machine state.
|
# 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(
|
def get_machines(
|
||||||
self,
|
self,
|
||||||
id: Optional[str] = None,
|
id: Optional[str] = None,
|
||||||
ips: Optional[Sequence[str]] = None,
|
ips: Optional[Sequence[str]] = None,
|
||||||
state: Optional[MachineState] = None, # noqa: F821
|
state: Optional[MachineState] = None, # noqa: F821
|
||||||
is_island: Optional[bool] = None, # noqa: F841
|
is_island: Optional[bool] = None,
|
||||||
) -> Sequence[Machine]: # noqa: F821
|
) -> Sequence[Machine]:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue