From 682e52c38f5fc4ccff0568ddb850812dc608c486 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Wed, 3 Aug 2022 17:01:14 +0200 Subject: [PATCH] Island: Register version_number convetnion --- monkey/monkey_island/cc/services/initialize.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monkey/monkey_island/cc/services/initialize.py b/monkey/monkey_island/cc/services/initialize.py index 7bb1063be..114a1b8c9 100644 --- a/monkey/monkey_island/cc/services/initialize.py +++ b/monkey/monkey_island/cc/services/initialize.py @@ -13,6 +13,7 @@ from common.agent_configuration import ( from common.aws import AWSInstance from common.common_consts.telem_categories import TelemCategoryEnum from common.utils.file_utils import get_binary_io_sha256_hash +from common.version import get_version from monkey_island.cc.repository import ( AgentBinaryRepository, FileAgentConfigurationRepository, @@ -93,6 +94,7 @@ def _register_conventions(container: DIContainer, data_dir: Path): ) container.register_convention(Path, "island_log_file_path", get_log_file_path(data_dir)) container.register_convention(Deployment, "deployment", _get_depyloyment_from_file(DEPLOYMENT_FILE_PATH)) + container.register_convention(str, "version_number", get_version()) def _register_repositories(container: DIContainer, data_dir: Path):