Implement neofs-cli lib for container and object

Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
This commit is contained in:
Vladimir Avdeev 2022-08-19 05:22:20 +03:00 committed by Vladimir Domnich
parent d935c2cafa
commit 3294299612
14 changed files with 680 additions and 171 deletions

View file

@ -0,0 +1,25 @@
from typing import Optional
from .cli_command import NeofsCliCommandBase
class NeofsCliAccounting(NeofsCliCommandBase):
def balance(self, wallet: str, rpc_endpoint: str, address: Optional[str] = None,
owner: Optional[str] = None) -> str:
"""Get internal balance of NeoFS account
Args:
address: address of wallet account
owner: owner of balance account (omit to use owner from private key)
rpc_endpoint: remote node address (as 'multiaddr' or '<host>:<port>')
wallet: WIF (NEP-2) string or path to the wallet or binary key
Returns:
str: Command string
"""
return self._execute(
'accounting balance',
**{param: param_value for param, param_value in locals().items() if param not in ['self']}
)