forked from TrueCloudLab/frostfs-testlib
[#182] Refactoring old functions for FrostfsCli
Refactoring old functions for FrostfsCli Signed-off-by: Mikhail Kadilov m.kadilov@yadro.com
This commit is contained in:
parent
273f0d13a5
commit
3fc3eaadf3
5 changed files with 121 additions and 63 deletions
|
@ -39,10 +39,10 @@ class FrostfsCliShards(CliCommand):
|
|||
def set_mode(
|
||||
self,
|
||||
endpoint: str,
|
||||
wallet: str,
|
||||
wallet_password: str,
|
||||
mode: str,
|
||||
id: Optional[list[str]],
|
||||
wallet: Optional[str] = None,
|
||||
wallet_password: Optional[str] = None,
|
||||
address: Optional[str] = None,
|
||||
all: bool = False,
|
||||
clear_errors: bool = False,
|
||||
|
@ -65,6 +65,11 @@ class FrostfsCliShards(CliCommand):
|
|||
Returns:
|
||||
Command's result.
|
||||
"""
|
||||
if not wallet_password:
|
||||
return self._execute(
|
||||
"control shards set-mode",
|
||||
**{param: value for param, value in locals().items() if param not in ["self"]},
|
||||
)
|
||||
return self._execute_with_password(
|
||||
"control shards set-mode",
|
||||
wallet_password,
|
||||
|
@ -137,3 +142,4 @@ class FrostfsCliShards(CliCommand):
|
|||
wallet_password,
|
||||
**{param: value for param, value in locals().items() if param not in ["self", "wallet_password"]},
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue