forked from TrueCloudLab/frostfs-testlib
[#272] Add --generate-key flag to object operations
Signed-off-by: Kirill Sosnovskikh <k.sosnovskikh@yadro.com>
This commit is contained in:
parent
7a500330de
commit
a983e0566e
2 changed files with 25 additions and 1 deletions
|
@ -100,6 +100,7 @@ class FrostfsCliContainer(CliCommand):
|
||||||
cid: str,
|
cid: str,
|
||||||
wallet: Optional[str] = None,
|
wallet: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
await_mode: bool = False,
|
await_mode: bool = False,
|
||||||
to: Optional[str] = None,
|
to: Optional[str] = None,
|
||||||
json_mode: bool = False,
|
json_mode: bool = False,
|
||||||
|
@ -121,6 +122,7 @@ class FrostfsCliContainer(CliCommand):
|
||||||
wallet: WIF (NEP-2) string or path to the wallet or binary key.
|
wallet: WIF (NEP-2) string or path to the wallet or binary key.
|
||||||
xhdr: Dict with request X-Headers.
|
xhdr: Dict with request X-Headers.
|
||||||
timeout: Timeout for the operation (default 15s).
|
timeout: Timeout for the operation (default 15s).
|
||||||
|
generate_key: Generate a new private key.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Command's result.
|
Command's result.
|
||||||
|
@ -136,6 +138,7 @@ class FrostfsCliContainer(CliCommand):
|
||||||
cid: str,
|
cid: str,
|
||||||
wallet: Optional[str] = None,
|
wallet: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
await_mode: bool = False,
|
await_mode: bool = False,
|
||||||
to: Optional[str] = None,
|
to: Optional[str] = None,
|
||||||
session: Optional[str] = None,
|
session: Optional[str] = None,
|
||||||
|
@ -157,6 +160,7 @@ class FrostfsCliContainer(CliCommand):
|
||||||
wallet: WIF (NEP-2) string or path to the wallet or binary key.
|
wallet: WIF (NEP-2) string or path to the wallet or binary key.
|
||||||
xhdr: Dict with request X-Headers.
|
xhdr: Dict with request X-Headers.
|
||||||
timeout: Timeout for the operation (default 15s).
|
timeout: Timeout for the operation (default 15s).
|
||||||
|
generate_key: Generate a new private key.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Command's result.
|
Command's result.
|
||||||
|
@ -172,6 +176,7 @@ class FrostfsCliContainer(CliCommand):
|
||||||
rpc_endpoint: str,
|
rpc_endpoint: str,
|
||||||
wallet: Optional[str] = None,
|
wallet: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
owner: Optional[str] = None,
|
owner: Optional[str] = None,
|
||||||
ttl: Optional[int] = None,
|
ttl: Optional[int] = None,
|
||||||
xhdr: Optional[dict] = None,
|
xhdr: Optional[dict] = None,
|
||||||
|
@ -189,6 +194,7 @@ class FrostfsCliContainer(CliCommand):
|
||||||
wallet: WIF (NEP-2) string or path to the wallet or binary key.
|
wallet: WIF (NEP-2) string or path to the wallet or binary key.
|
||||||
xhdr: Dict with request X-Headers.
|
xhdr: Dict with request X-Headers.
|
||||||
timeout: Timeout for the operation (default 15s).
|
timeout: Timeout for the operation (default 15s).
|
||||||
|
generate_key: Generate a new private key.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Command's result.
|
Command's result.
|
||||||
|
@ -204,6 +210,7 @@ class FrostfsCliContainer(CliCommand):
|
||||||
cid: str,
|
cid: str,
|
||||||
wallet: Optional[str] = None,
|
wallet: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
ttl: Optional[int] = None,
|
ttl: Optional[int] = None,
|
||||||
xhdr: Optional[dict] = None,
|
xhdr: Optional[dict] = None,
|
||||||
timeout: Optional[str] = None,
|
timeout: Optional[str] = None,
|
||||||
|
@ -219,6 +226,7 @@ class FrostfsCliContainer(CliCommand):
|
||||||
wallet: WIF (NEP-2) string or path to the wallet or binary key.
|
wallet: WIF (NEP-2) string or path to the wallet or binary key.
|
||||||
xhdr: Dict with request X-Headers.
|
xhdr: Dict with request X-Headers.
|
||||||
timeout: Timeout for the operation (default 15s).
|
timeout: Timeout for the operation (default 15s).
|
||||||
|
generate_key: Generate a new private key.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Command's result.
|
Command's result.
|
||||||
|
@ -291,7 +299,7 @@ class FrostfsCliContainer(CliCommand):
|
||||||
timeout: duration Timeout for the operation (default 15 s)
|
timeout: duration Timeout for the operation (default 15 s)
|
||||||
short: shorten the output of node information.
|
short: shorten the output of node information.
|
||||||
xhdr: Dict with request X-Headers.
|
xhdr: Dict with request X-Headers.
|
||||||
generate_key: Generate a new private key
|
generate_key: Generate a new private key.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
wallet: Optional[str] = None,
|
wallet: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
bearer: Optional[str] = None,
|
bearer: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
session: Optional[str] = None,
|
session: Optional[str] = None,
|
||||||
ttl: Optional[int] = None,
|
ttl: Optional[int] = None,
|
||||||
xhdr: Optional[dict] = None,
|
xhdr: Optional[dict] = None,
|
||||||
|
@ -25,6 +26,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
address: Address of wallet account.
|
address: Address of wallet account.
|
||||||
bearer: File with signed JSON or binary encoded bearer token.
|
bearer: File with signed JSON or binary encoded bearer token.
|
||||||
cid: Container ID.
|
cid: Container ID.
|
||||||
|
generate_key: Generate new private key.
|
||||||
oid: Object ID.
|
oid: Object ID.
|
||||||
rpc_endpoint: Remote node address (as 'multiaddr' or '<host>:<port>').
|
rpc_endpoint: Remote node address (as 'multiaddr' or '<host>:<port>').
|
||||||
session: Filepath to a JSON- or binary-encoded token of the object DELETE session.
|
session: Filepath to a JSON- or binary-encoded token of the object DELETE session.
|
||||||
|
@ -49,6 +51,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
wallet: Optional[str] = None,
|
wallet: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
bearer: Optional[str] = None,
|
bearer: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
file: Optional[str] = None,
|
file: Optional[str] = None,
|
||||||
header: Optional[str] = None,
|
header: Optional[str] = None,
|
||||||
no_progress: bool = False,
|
no_progress: bool = False,
|
||||||
|
@ -66,6 +69,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
bearer: File with signed JSON or binary encoded bearer token.
|
bearer: File with signed JSON or binary encoded bearer token.
|
||||||
cid: Container ID.
|
cid: Container ID.
|
||||||
file: File to write object payload to. Default: stdout.
|
file: File to write object payload to. Default: stdout.
|
||||||
|
generate_key: Generate new private key.
|
||||||
header: File to write header to. Default: stdout.
|
header: File to write header to. Default: stdout.
|
||||||
no_progress: Do not show progress bar.
|
no_progress: Do not show progress bar.
|
||||||
oid: Object ID.
|
oid: Object ID.
|
||||||
|
@ -93,6 +97,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
wallet: Optional[str] = None,
|
wallet: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
bearer: Optional[str] = None,
|
bearer: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
range: Optional[str] = None,
|
range: Optional[str] = None,
|
||||||
salt: Optional[str] = None,
|
salt: Optional[str] = None,
|
||||||
ttl: Optional[int] = None,
|
ttl: Optional[int] = None,
|
||||||
|
@ -108,6 +113,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
address: Address of wallet account.
|
address: Address of wallet account.
|
||||||
bearer: File with signed JSON or binary encoded bearer token.
|
bearer: File with signed JSON or binary encoded bearer token.
|
||||||
cid: Container ID.
|
cid: Container ID.
|
||||||
|
generate_key: Generate new private key.
|
||||||
oid: Object ID.
|
oid: Object ID.
|
||||||
range: Range to take hash from in the form offset1:length1,...
|
range: Range to take hash from in the form offset1:length1,...
|
||||||
rpc_endpoint: Remote node address (as 'multiaddr' or '<host>:<port>').
|
rpc_endpoint: Remote node address (as 'multiaddr' or '<host>:<port>').
|
||||||
|
@ -135,6 +141,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
wallet: Optional[str] = None,
|
wallet: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
bearer: Optional[str] = None,
|
bearer: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
file: Optional[str] = None,
|
file: Optional[str] = None,
|
||||||
json_mode: bool = False,
|
json_mode: bool = False,
|
||||||
main_only: bool = False,
|
main_only: bool = False,
|
||||||
|
@ -153,6 +160,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
bearer: File with signed JSON or binary encoded bearer token.
|
bearer: File with signed JSON or binary encoded bearer token.
|
||||||
cid: Container ID.
|
cid: Container ID.
|
||||||
file: File to write object payload to. Default: stdout.
|
file: File to write object payload to. Default: stdout.
|
||||||
|
generate_key: Generate new private key.
|
||||||
json_mode: Marshal output in JSON.
|
json_mode: Marshal output in JSON.
|
||||||
main_only: Return only main fields.
|
main_only: Return only main fields.
|
||||||
oid: Object ID.
|
oid: Object ID.
|
||||||
|
@ -183,6 +191,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
expire_at: Optional[int] = None,
|
expire_at: Optional[int] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
bearer: Optional[str] = None,
|
bearer: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
session: Optional[str] = None,
|
session: Optional[str] = None,
|
||||||
ttl: Optional[int] = None,
|
ttl: Optional[int] = None,
|
||||||
xhdr: Optional[dict] = None,
|
xhdr: Optional[dict] = None,
|
||||||
|
@ -195,6 +204,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
address: Address of wallet account.
|
address: Address of wallet account.
|
||||||
bearer: File with signed JSON or binary encoded bearer token.
|
bearer: File with signed JSON or binary encoded bearer token.
|
||||||
cid: Container ID.
|
cid: Container ID.
|
||||||
|
generate_key: Generate new private key.
|
||||||
oid: Object ID.
|
oid: Object ID.
|
||||||
lifetime: Lock lifetime.
|
lifetime: Lock lifetime.
|
||||||
expire_at: Lock expiration epoch.
|
expire_at: Lock expiration epoch.
|
||||||
|
@ -222,6 +232,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
attributes: Optional[dict] = None,
|
attributes: Optional[dict] = None,
|
||||||
bearer: Optional[str] = None,
|
bearer: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
copies_number: Optional[int] = None,
|
copies_number: Optional[int] = None,
|
||||||
disable_filename: bool = False,
|
disable_filename: bool = False,
|
||||||
disable_timestamp: bool = False,
|
disable_timestamp: bool = False,
|
||||||
|
@ -246,6 +257,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
disable_timestamp: Do not set well-known timestamp attribute.
|
disable_timestamp: Do not set well-known timestamp attribute.
|
||||||
expire_at: Last epoch in the life of the object.
|
expire_at: Last epoch in the life of the object.
|
||||||
file: File with object payload.
|
file: File with object payload.
|
||||||
|
generate_key: Generate new private key.
|
||||||
no_progress: Do not show progress bar.
|
no_progress: Do not show progress bar.
|
||||||
notify: Object notification in the form of *epoch*:*topic*; '-'
|
notify: Object notification in the form of *epoch*:*topic*; '-'
|
||||||
topic means using default.
|
topic means using default.
|
||||||
|
@ -273,6 +285,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
wallet: Optional[str] = None,
|
wallet: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
bearer: Optional[str] = None,
|
bearer: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
file: Optional[str] = None,
|
file: Optional[str] = None,
|
||||||
json_mode: bool = False,
|
json_mode: bool = False,
|
||||||
raw: bool = False,
|
raw: bool = False,
|
||||||
|
@ -289,6 +302,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
bearer: File with signed JSON or binary encoded bearer token.
|
bearer: File with signed JSON or binary encoded bearer token.
|
||||||
cid: Container ID.
|
cid: Container ID.
|
||||||
file: File to write object payload to. Default: stdout.
|
file: File to write object payload to. Default: stdout.
|
||||||
|
generate_key: Generate new private key.
|
||||||
json_mode: Marshal output in JSON.
|
json_mode: Marshal output in JSON.
|
||||||
oid: Object ID.
|
oid: Object ID.
|
||||||
range: Range to take data from in the form offset:length.
|
range: Range to take data from in the form offset:length.
|
||||||
|
@ -315,6 +329,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
wallet: Optional[str] = None,
|
wallet: Optional[str] = None,
|
||||||
address: Optional[str] = None,
|
address: Optional[str] = None,
|
||||||
bearer: Optional[str] = None,
|
bearer: Optional[str] = None,
|
||||||
|
generate_key: Optional[bool] = None,
|
||||||
filters: Optional[list] = None,
|
filters: Optional[list] = None,
|
||||||
oid: Optional[str] = None,
|
oid: Optional[str] = None,
|
||||||
phy: bool = False,
|
phy: bool = False,
|
||||||
|
@ -332,6 +347,7 @@ class FrostfsCliObject(CliCommand):
|
||||||
bearer: File with signed JSON or binary encoded bearer token.
|
bearer: File with signed JSON or binary encoded bearer token.
|
||||||
cid: Container ID.
|
cid: Container ID.
|
||||||
filters: Repeated filter expressions or files with protobuf JSON.
|
filters: Repeated filter expressions or files with protobuf JSON.
|
||||||
|
generate_key: Generate new private key.
|
||||||
oid: Object ID.
|
oid: Object ID.
|
||||||
phy: Search physically stored objects.
|
phy: Search physically stored objects.
|
||||||
root: Search for user objects.
|
root: Search for user objects.
|
||||||
|
|
Loading…
Reference in a new issue