[#155] Change args to optionally
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
This commit is contained in:
parent
a3bda0b34f
commit
d6a2cf92a2
1 changed files with 10 additions and 17 deletions
|
@ -68,11 +68,7 @@ class FrostfsCliShards(CliCommand):
|
||||||
return self._execute_with_password(
|
return self._execute_with_password(
|
||||||
"control shards set-mode",
|
"control shards set-mode",
|
||||||
wallet_password,
|
wallet_password,
|
||||||
**{
|
**{param: value for param, value in locals().items() if param not in ["self", "wallet_password"]},
|
||||||
param: value
|
|
||||||
for param, value in locals().items()
|
|
||||||
if param not in ["self", "wallet_password"]
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def dump(
|
def dump(
|
||||||
|
@ -105,18 +101,14 @@ class FrostfsCliShards(CliCommand):
|
||||||
return self._execute_with_password(
|
return self._execute_with_password(
|
||||||
"control shards dump",
|
"control shards dump",
|
||||||
wallet_password,
|
wallet_password,
|
||||||
**{
|
**{param: value for param, value in locals().items() if param not in ["self", "wallet_password"]},
|
||||||
param: value
|
|
||||||
for param, value in locals().items()
|
|
||||||
if param not in ["self", "wallet_password"]
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def list(
|
def list(
|
||||||
self,
|
self,
|
||||||
endpoint: str,
|
endpoint: str,
|
||||||
wallet: str,
|
wallet: Optional[str] = None,
|
||||||
wallet_password: str,
|
wallet_password: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
json_mode: bool = False,
|
json_mode: bool = False,
|
||||||
timeout: Optional[str] = None,
|
timeout: Optional[str] = None,
|
||||||
|
@ -135,12 +127,13 @@ class FrostfsCliShards(CliCommand):
|
||||||
Returns:
|
Returns:
|
||||||
Command's result.
|
Command's result.
|
||||||
"""
|
"""
|
||||||
|
if not wallet_password:
|
||||||
|
return self._execute(
|
||||||
|
"control shards list",
|
||||||
|
**{param: value for param, value in locals().items() if param not in ["self"]},
|
||||||
|
)
|
||||||
return self._execute_with_password(
|
return self._execute_with_password(
|
||||||
"control shards list",
|
"control shards list",
|
||||||
wallet_password,
|
wallet_password,
|
||||||
**{
|
**{param: value for param, value in locals().items() if param not in ["self", "wallet_password"]},
|
||||||
param: value
|
|
||||||
for param, value in locals().items()
|
|
||||||
if param not in ["self", "wallet_password"]
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue