[#145] Refactoring old functions for FrostfsCli
FrostfaCli methods moved to FrostfsCliControl Signed-off-by: Mikhail Kadilov m.kadilov@yadro.com
This commit is contained in:
parent
f30905e594
commit
8ae8e0a447
1 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue