From 8ae8e0a44707c0e54c998912cbbd6f4236760ec4 Mon Sep 17 00:00:00 2001 From: mkadilov Date: Fri, 16 Feb 2024 18:35:24 +0300 Subject: [PATCH] [#145] Refactoring old functions for FrostfsCli FrostfaCli methods moved to FrostfsCliControl Signed-off-by: Mikhail Kadilov m.kadilov@yadro.com --- src/frostfs_testlib/steps/node_management.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/frostfs_testlib/steps/node_management.py b/src/frostfs_testlib/steps/node_management.py index e319f0d..f1f9975 100644 --- a/src/frostfs_testlib/steps/node_management.py +++ b/src/frostfs_testlib/steps/node_management.py @@ -130,6 +130,10 @@ def node_shard_list(node: StorageNode, json: Optional[bool] = None) -> list[str] wallet_config_path = f"/tmp/{node.name}-config.yaml" wallet_password = host.get_service_config(node.name).attributes["wallet_password"] wallet_config = f'password: "{wallet_password}"' + service_config = host.get_service_config(node.name) + wallet_path = service_config.attributes["wallet_path"] + wallet_password = service_config.attributes["wallet_password"] + wallet_config = f'wallet: {wallet_path}\npassword: "{wallet_password}"' shell.exec(f"echo '{wallet_config}' > {wallet_config_path}") cli = FrostfsCli(shell, cli_config.exec_path, wallet_config_path) @@ -149,8 +153,10 @@ def node_shard_set_mode(node: StorageNode, shard: list[str], mode: str) -> str: shell = host.get_shell() cli_config = host.get_cli_config("frostfs-cli") wallet_config_path = f"/tmp/{node.name}-config.yaml" - wallet_password = host.get_service_config(node.name).attributes["wallet_password"] - wallet_config = f'password: "{wallet_password}"' + service_config = host.get_service_config(node.name) + wallet_path = service_config.attributes["wallet_path"] + wallet_password = service_config.attributes["wallet_password"] + wallet_config = f'wallet: {wallet_path}\npassword: "{wallet_password}"' shell.exec(f"echo '{wallet_config}' > {wallet_config_path}") cli = FrostfsCli(shell, cli_config.exec_path, wallet_config_path)