forked from p15670423/monkey
Island: Register FileSimulationRepository with the DIContainer
This commit is contained in:
parent
d2906ef23b
commit
350ac6957f
|
@ -8,9 +8,11 @@ from common.utils.file_utils import get_binary_io_sha256_hash
|
||||||
from monkey_island.cc.repository import (
|
from monkey_island.cc.repository import (
|
||||||
AgentBinaryRepository,
|
AgentBinaryRepository,
|
||||||
FileAgentConfigurationRepository,
|
FileAgentConfigurationRepository,
|
||||||
|
FileSimulationRepository,
|
||||||
IAgentBinaryRepository,
|
IAgentBinaryRepository,
|
||||||
IAgentConfigurationRepository,
|
IAgentConfigurationRepository,
|
||||||
IFileRepository,
|
IFileRepository,
|
||||||
|
ISimulationRepository,
|
||||||
LocalStorageFileRepository,
|
LocalStorageFileRepository,
|
||||||
RetrievalError,
|
RetrievalError,
|
||||||
)
|
)
|
||||||
|
@ -45,6 +47,7 @@ def initialize_services(data_dir: Path) -> DIContainer:
|
||||||
container.register_instance(
|
container.register_instance(
|
||||||
IAgentConfigurationRepository, container.resolve(FileAgentConfigurationRepository)
|
IAgentConfigurationRepository, container.resolve(FileAgentConfigurationRepository)
|
||||||
)
|
)
|
||||||
|
container.register_instance(ISimulationRepository, container.resolve(FileSimulationRepository))
|
||||||
|
|
||||||
# This is temporary until we get DI all worked out.
|
# This is temporary until we get DI all worked out.
|
||||||
PostBreachFilesService.initialize(container.resolve(IFileRepository))
|
PostBreachFilesService.initialize(container.resolve(IFileRepository))
|
||||||
|
|
Loading…
Reference in New Issue