Add optional parameter "copies_number" in "frostfs-cli object put"

Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
This commit is contained in:
Vladimir Avdeev 2023-07-20 03:41:21 +03:00
parent 4896abcec3
commit 15862e5901
2 changed files with 5 additions and 0 deletions

View file

@ -224,6 +224,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,
copies_number: Optional[int] = None,
disable_filename: bool = False, disable_filename: bool = False,
disable_timestamp: bool = False, disable_timestamp: bool = False,
expire_at: Optional[int] = None, expire_at: Optional[int] = None,
@ -241,6 +242,7 @@ class FrostfsCliObject(CliCommand):
address: Address of wallet account. address: Address of wallet account.
attributes: User attributes in form of Key1=Value1,Key2=Value2. attributes: User attributes in form of Key1=Value1,Key2=Value2.
bearer: File with signed JSON or binary encoded bearer token. 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. cid: Container ID.
disable_filename: Do not set well-known filename attribute. disable_filename: Do not set well-known filename attribute.
disable_timestamp: Do not set well-known timestamp attribute. disable_timestamp: Do not set well-known timestamp attribute.

View file

@ -239,6 +239,7 @@ def put_object(
shell: Shell, shell: Shell,
endpoint: str, endpoint: str,
bearer: Optional[str] = None, bearer: Optional[str] = None,
copies_number: Optional[int] = None,
attributes: Optional[dict] = None, attributes: Optional[dict] = None,
xhdr: Optional[dict] = None, xhdr: Optional[dict] = None,
wallet_config: Optional[str] = None, wallet_config: Optional[str] = None,
@ -256,6 +257,7 @@ def put_object(
cid: ID of Container where we get the Object from cid: ID of Container where we get the Object from
shell: executor for cli command shell: executor for cli command
bearer: path to Bearer Token file, appends to `--bearer` key 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 attributes: User attributes in form of Key1=Value1,Key2=Value2
endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
wallet_config: path to the wallet config wallet_config: path to the wallet config
@ -276,6 +278,7 @@ def put_object(
cid=cid, cid=cid,
attributes=attributes, attributes=attributes,
bearer=bearer, bearer=bearer,
copies_number=copies_number,
expire_at=expire_at, expire_at=expire_at,
no_progress=no_progress, no_progress=no_progress,
xhdr=xhdr, xhdr=xhdr,