From 15862e5901d431dc62d9f5f26fb65aca3e5e4df8 Mon Sep 17 00:00:00 2001 From: Vladimir Avdeev Date: Thu, 20 Jul 2023 03:41:21 +0300 Subject: [PATCH] Add optional parameter "copies_number" in "frostfs-cli object put" Signed-off-by: Vladimir Avdeev --- src/frostfs_testlib/cli/frostfs_cli/object.py | 2 ++ src/frostfs_testlib/steps/cli/object.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/frostfs_testlib/cli/frostfs_cli/object.py b/src/frostfs_testlib/cli/frostfs_cli/object.py index 1c1d0ac..8915914 100644 --- a/src/frostfs_testlib/cli/frostfs_cli/object.py +++ b/src/frostfs_testlib/cli/frostfs_cli/object.py @@ -224,6 +224,7 @@ class FrostfsCliObject(CliCommand): address: Optional[str] = None, attributes: Optional[dict] = None, bearer: Optional[str] = None, + copies_number: Optional[int] = None, disable_filename: bool = False, disable_timestamp: bool = False, expire_at: Optional[int] = None, @@ -241,6 +242,7 @@ class FrostfsCliObject(CliCommand): address: Address of wallet account. attributes: User attributes in form of Key1=Value1,Key2=Value2. bearer: File with signed JSON or binary encoded bearer token. + copies_number: Number of copies of the object to store within the RPC call. cid: Container ID. disable_filename: Do not set well-known filename attribute. disable_timestamp: Do not set well-known timestamp attribute. diff --git a/src/frostfs_testlib/steps/cli/object.py b/src/frostfs_testlib/steps/cli/object.py index 8be7982..d575522 100644 --- a/src/frostfs_testlib/steps/cli/object.py +++ b/src/frostfs_testlib/steps/cli/object.py @@ -239,6 +239,7 @@ def put_object( shell: Shell, endpoint: str, bearer: Optional[str] = None, + copies_number: Optional[int] = None, attributes: Optional[dict] = None, xhdr: Optional[dict] = None, wallet_config: Optional[str] = None, @@ -256,6 +257,7 @@ def put_object( cid: ID of Container where we get the Object from shell: executor for cli command bearer: path to Bearer Token file, appends to `--bearer` key + copies_number: Number of copies of the object to store within the RPC call attributes: User attributes in form of Key1=Value1,Key2=Value2 endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key wallet_config: path to the wallet config @@ -276,6 +278,7 @@ def put_object( cid=cid, attributes=attributes, bearer=bearer, + copies_number=copies_number, expire_at=expire_at, no_progress=no_progress, xhdr=xhdr,