forked from p15670423/monkey
Island: Subscribe ISimulationRepository.set_mode to IslandEventTopic.SET_ISLAND_MODE
This commit is contained in:
parent
add31fe397
commit
547637d151
|
@ -1,4 +1,3 @@
|
||||||
from .reset_agent_configuration import reset_agent_configuration
|
from .reset_agent_configuration import reset_agent_configuration
|
||||||
from .reset_machine_repository import reset_machine_repository
|
from .reset_machine_repository import reset_machine_repository
|
||||||
from .set_agent_configuration_per_island_mode import set_agent_configuration_per_island_mode
|
from .set_agent_configuration_per_island_mode import set_agent_configuration_per_island_mode
|
||||||
from .set_simulation_mode import set_simulation_mode
|
|
||||||
|
|
|
@ -6,13 +6,13 @@ from monkey_island.cc.island_event_handlers import (
|
||||||
reset_agent_configuration,
|
reset_agent_configuration,
|
||||||
reset_machine_repository,
|
reset_machine_repository,
|
||||||
set_agent_configuration_per_island_mode,
|
set_agent_configuration_per_island_mode,
|
||||||
set_simulation_mode,
|
|
||||||
)
|
)
|
||||||
from monkey_island.cc.repository import (
|
from monkey_island.cc.repository import (
|
||||||
IAgentEventRepository,
|
IAgentEventRepository,
|
||||||
IAgentRepository,
|
IAgentRepository,
|
||||||
ICredentialsRepository,
|
ICredentialsRepository,
|
||||||
INodeRepository,
|
INodeRepository,
|
||||||
|
ISimulationRepository,
|
||||||
)
|
)
|
||||||
from monkey_island.cc.services.database import Database
|
from monkey_island.cc.services.database import Database
|
||||||
|
|
||||||
|
@ -62,4 +62,5 @@ def _subscribe_set_island_mode_events(
|
||||||
|
|
||||||
island_event_queue.subscribe(topic, container.resolve(set_agent_configuration_per_island_mode))
|
island_event_queue.subscribe(topic, container.resolve(set_agent_configuration_per_island_mode))
|
||||||
|
|
||||||
island_event_queue.subscribe(topic, container.resolve(set_simulation_mode))
|
simulation_repository = container.resolve(ISimulationRepository)
|
||||||
|
island_event_queue.subscribe(topic, simulation_repository.set_mode)
|
||||||
|
|
Loading…
Reference in New Issue