From 247d2fbab7d3cfb475da32d282651a351028eb4b Mon Sep 17 00:00:00 2001 From: anurindm Date: Tue, 21 Nov 2023 10:20:01 +0300 Subject: [PATCH] Added logger config path attribute to NodeBase class Signed-off-by: Dmitry Anurin --- src/frostfs_testlib/storage/constants.py | 1 + src/frostfs_testlib/storage/dataclasses/node_base.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/frostfs_testlib/storage/constants.py b/src/frostfs_testlib/storage/constants.py index 9ad24eb..b1b7995 100644 --- a/src/frostfs_testlib/storage/constants.py +++ b/src/frostfs_testlib/storage/constants.py @@ -6,6 +6,7 @@ class ConfigAttributes: CONFIG_DIR = "service_config_dir" CONFIG_PATH = "config_path" SHARD_CONFIG_PATH = "shard_config_path" + LOGGER_CONFIG_PATH = "logger_config_path" LOCAL_WALLET_PATH = "local_wallet_path" LOCAL_WALLET_CONFIG = "local_config_path" ENDPOINT_DATA_0 = "endpoint_data0" diff --git a/src/frostfs_testlib/storage/dataclasses/node_base.py b/src/frostfs_testlib/storage/dataclasses/node_base.py index 4fc7dea..bf36665 100644 --- a/src/frostfs_testlib/storage/dataclasses/node_base.py +++ b/src/frostfs_testlib/storage/dataclasses/node_base.py @@ -120,6 +120,14 @@ class NodeBase(HumanReadableABC): ConfigAttributes.WALLET_CONFIG, ) + def get_logger_config_path(self) -> str: + """ + Returns config path for logger located on remote host + """ + config_attributes = self.host.get_service_config(self.name) + return self._get_attribute( + ConfigAttributes.LOGGER_CONFIG_PATH) if ConfigAttributes.LOGGER_CONFIG_PATH in config_attributes.attributes else None + @property def config_dir(self) -> str: return self._get_attribute(ConfigAttributes.CONFIG_DIR)