[#161] Add verbose flag for frostfs-cli #161

Closed
EliChin wants to merge 1 commit from EliChin/frostfs-testlib:feature/verbose into master
12 changed files with 38 additions and 2 deletions

View file

@ -11,6 +11,7 @@ class FrostfsCliAccounting(CliCommand):
rpc_endpoint: Optional[str] = None,
address: Optional[str] = None,
owner: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""Get internal balance of FrostFS account

View file

@ -6,7 +6,7 @@ from frostfs_testlib.shell import CommandResult
class FrostfsCliACL(CliCommand):
def extended_create(
self, cid: str, out: str, file: Optional[str] = None, rule: Optional[list] = None
self, cid: str, out: str, file: Optional[str] = None, rule: Optional[list] = None, verbose: bool = True,
) -> CommandResult:
"""Create extended ACL from the text representation.

View file

@ -22,6 +22,7 @@ class FrostfsCliContainer(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True
) -> CommandResult:
"""
Create a new container and register it in the FrostFS.
@ -66,6 +67,7 @@ class FrostfsCliContainer(CliCommand):
xhdr: Optional[dict] = None,
force: bool = False,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Delete an existing container.
@ -104,6 +106,7 @@ class FrostfsCliContainer(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Get container field info.
@ -140,6 +143,7 @@ class FrostfsCliContainer(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Get extended ACL table of container.
@ -174,6 +178,7 @@ class FrostfsCliContainer(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
**params,
) -> CommandResult:
"""
@ -205,6 +210,7 @@ class FrostfsCliContainer(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
List existing objects in container.
@ -238,6 +244,7 @@ class FrostfsCliContainer(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Set a new extended ACL table for the container.
@ -275,6 +282,7 @@ class FrostfsCliContainer(CliCommand):
xhdr: Optional[dict] = None,
generate_key: Optional[bool] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Show the nodes participating in the container in the current epoch.

View file

@ -13,6 +13,7 @@ class FrostfsCliControl(CliCommand):
force: Optional[bool] = None,
address: Optional[str] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""Set status of the storage node in FrostFS network map
@ -38,6 +39,7 @@ class FrostfsCliControl(CliCommand):
wallet: Optional[str] = None,
address: Optional[str] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""Set status of the storage node in FrostFS network map

View file

@ -14,6 +14,7 @@ class FrostfsCliNetmap(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Get current epoch number.
@ -44,6 +45,7 @@ class FrostfsCliNetmap(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Get information about FrostFS network.
@ -75,6 +77,7 @@ class FrostfsCliNetmap(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Get target node info.
@ -106,6 +109,7 @@ class FrostfsCliNetmap(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Request current local snapshot of the network map.

View file

@ -17,6 +17,7 @@ class FrostfsCliObject(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Delete object from FrostFS.
@ -57,6 +58,7 @@ class FrostfsCliObject(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Get object from FrostFS.
@ -100,6 +102,7 @@ class FrostfsCliObject(CliCommand):
hash_type: Optional[str] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Get object hash.
@ -146,6 +149,7 @@ class FrostfsCliObject(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Get object header.
@ -189,6 +193,7 @@ class FrostfsCliObject(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Lock object in container.
@ -234,6 +239,7 @@ class FrostfsCliObject(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Put object to FrostFS.
@ -282,6 +288,7 @@ class FrostfsCliObject(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Get payload range data of an object.
@ -325,6 +332,7 @@ class FrostfsCliObject(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Search object.
@ -367,6 +375,7 @@ class FrostfsCliObject(CliCommand):
ttl: Optional[int] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Search object nodes.

View file

@ -14,6 +14,7 @@ class FrostfsCliSession(CliCommand):
lifetime: Optional[int] = None,
address: Optional[str] = None,
json: Optional[bool] = False,
verbose: bool = True,
) -> CommandResult:
"""
Create session token.

View file

@ -14,6 +14,7 @@ class FrostfsCliShards(CliCommand):
address: Optional[str] = None,
all: bool = False,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Flush objects from the write-cache to the main storage.
@ -47,6 +48,7 @@ class FrostfsCliShards(CliCommand):
all: bool = False,
clear_errors: bool = False,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Set work mode of the shard.
@ -81,6 +83,7 @@ class FrostfsCliShards(CliCommand):
address: Optional[str] = None,
no_errors: bool = False,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Dump objects from shard to a file.
@ -112,6 +115,7 @@ class FrostfsCliShards(CliCommand):
address: Optional[str] = None,
json_mode: bool = False,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
List shards of the storage node.

View file

@ -17,6 +17,7 @@ class FrostfsCliStorageGroup(CliCommand):
address: Optional[str] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Put storage group to FrostFS.
@ -55,6 +56,7 @@ class FrostfsCliStorageGroup(CliCommand):
address: Optional[str] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Get storage group from FrostFS.
@ -92,6 +94,7 @@ class FrostfsCliStorageGroup(CliCommand):
address: Optional[str] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
List storage groups in FrostFS container.
@ -129,6 +132,7 @@ class FrostfsCliStorageGroup(CliCommand):
address: Optional[str] = None,
xhdr: Optional[dict] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Delete storage group from FrostFS.

View file

@ -10,6 +10,7 @@ class FrostfsCliTree(CliCommand):
wallet: Optional[str] = None,
rpc_endpoint: Optional[str] = None,
timeout: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""Get internal balance of FrostFS account

View file

@ -12,6 +12,7 @@ class FrostfsCliUtil(CliCommand):
to_file: str,
address: Optional[str] = None,
json: Optional[bool] = False,
verbose: bool = True,
) -> CommandResult:
"""
Sign bearer token to use it in requests.
@ -37,6 +38,7 @@ class FrostfsCliUtil(CliCommand):
from_file: str,
to_file: str,
address: Optional[str] = None,
verbose: bool = True,
) -> CommandResult:
"""
Sign session token to use it in requests.

View file

@ -10,4 +10,4 @@ class FrostfsCliVersion(CliCommand):
Returns:
Command's result.
"""
return self._execute("", version=True)
return self._execute("", version=True, verbose=True)