Adding timeout for more cli actions

Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
Andrey Berezin 2023-03-09 14:25:39 +03:00 committed by Gitea
parent 8ed26cef7d
commit f2ecce44bf
6 changed files with 57 additions and 19 deletions

View file

@ -13,6 +13,7 @@ class FrostfsCliNetmap(CliCommand):
generate_key: bool = False,
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
) -> CommandResult:
"""
Get current epoch number.
@ -24,6 +25,7 @@ class FrostfsCliNetmap(CliCommand):
ttl: TTL value in request meta header (default 2).
wallet: Path to the wallet or binary key.
xhdr: Dict with request X-Headers.
timeout: Timeout for an operation (default 15s).
Returns:
Command's result.
@ -41,6 +43,7 @@ class FrostfsCliNetmap(CliCommand):
generate_key: bool = False,
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
) -> CommandResult:
"""
Get information about FrostFS network.
@ -52,6 +55,7 @@ class FrostfsCliNetmap(CliCommand):
ttl: TTL value in request meta header (default 2)
wallet: Path to the wallet or binary key
xhdr: Request X-Headers in form of Key=Value
timeout: Timeout for an operation (default 15s).
Returns:
Command's result.
@ -70,6 +74,7 @@ class FrostfsCliNetmap(CliCommand):
json: bool = False,
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
) -> CommandResult:
"""
Get target node info.
@ -82,6 +87,7 @@ class FrostfsCliNetmap(CliCommand):
ttl: TTL value in request meta header (default 2).
wallet: Path to the wallet or binary key.
xhdr: Dict with request X-Headers.
timeout: Timeout for an operation (default 15s).
Returns:
Command's result.
@ -99,6 +105,7 @@ class FrostfsCliNetmap(CliCommand):
generate_key: bool = False,
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
) -> CommandResult:
"""
Request current local snapshot of the network map.
@ -110,6 +117,7 @@ class FrostfsCliNetmap(CliCommand):
ttl: TTL value in request meta header (default 2).
wallet: Path to the wallet or binary key.
xhdr: Dict with request X-Headers.
timeout: Timeout for an operation (default 15s).
Returns:
Command's result.