From 451de5e07e7ef6dd68e684aaa431839583a82089 Mon Sep 17 00:00:00 2001 From: anurindm Date: Thu, 14 Nov 2024 16:22:06 +0300 Subject: [PATCH] [#320] Added shards detach function Signed-off-by: Dmitry Anurin --- src/frostfs_testlib/cli/frostfs_cli/shards.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/frostfs_testlib/cli/frostfs_cli/shards.py b/src/frostfs_testlib/cli/frostfs_cli/shards.py index 82ea87b..68a2f54 100644 --- a/src/frostfs_testlib/cli/frostfs_cli/shards.py +++ b/src/frostfs_testlib/cli/frostfs_cli/shards.py @@ -241,3 +241,21 @@ class FrostfsCliShards(CliCommand): "control shards evacuation status", **{param: value for param, value in locals().items() if param not in ["self"]}, ) + + def detach(self, endpoint: str, address: Optional[str] = None, id: Optional[str] = None, timeout: Optional[str] = None): + """ + Detach and close the shards + + Args: + address: Address of wallet account + endpoint: Remote node control address (as 'multiaddr' or ':') + id: List of shard IDs in base58 encoding + timeout: Timeout for an operation (default 15s) + + Returns: + Command's result. + """ + return self._execute( + "control shards detach", + **{param: value for param, value in locals().items() if param not in ["self"]}, + )