forked from p15670423/monkey
Island: Add preliminary Simulation class
Includes just the island's mode for now.
This commit is contained in:
parent
e14101998f
commit
0137c89158
|
@ -0,0 +1,21 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
from marshmallow import Schema, post_load
|
||||
from marshmallow_enum import EnumField
|
||||
|
||||
from monkey_island.cc.services.mode.mode_enum import IslandModeEnum
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Simulation:
|
||||
mode: IslandModeEnum
|
||||
|
||||
|
||||
class SimulationSchema(Schema):
|
||||
mode = EnumField(IslandModeEnum)
|
||||
|
||||
@post_load
|
||||
def _make_simulation(self, data, **kwargs):
|
||||
return Simulation(**data)
|
|
@ -197,6 +197,9 @@ _make_network_scan_configuration # unused method (monkey/common/configuration/a
|
|||
_make_propagation_configuration # unused method (monkey/common/configuration/agent_configuration.py:167)
|
||||
_make_agent_configuration # unused method (monkey/common/configuration/agent_configuration.py:192)
|
||||
|
||||
# Models
|
||||
_make_simulation # unused method (monkey/monkey_island/cc/models/simulation.py:19
|
||||
|
||||
|
||||
# TODO DELETE AFTER RESOURCE REFACTORING
|
||||
NetworkMap
|
||||
|
|
Loading…
Reference in New Issue