diff --git a/src/frostfs_testlib/cli/frostfs_adm/morph.py b/src/frostfs_testlib/cli/frostfs_adm/morph.py index aba147b7..3faa875d 100644 --- a/src/frostfs_testlib/cli/frostfs_adm/morph.py +++ b/src/frostfs_testlib/cli/frostfs_adm/morph.py @@ -127,12 +127,12 @@ class FrostfsAdmMorph(CliCommand): ) def force_new_epoch( - self, rpc_endpoint: Optional[str] = None, alphabet: Optional[str] = None + self, rpc_endpoint: Optional[str] = None, alphabet_wallets: Optional[str] = None ) -> CommandResult: """Create new FrostFS epoch event in the side chain. Args: - alphabet: Path to alphabet wallets dir. + alphabet_wallets: Path to alphabet wallets dir. rpc_endpoint: N3 RPC node endpoint. Returns: @@ -354,3 +354,29 @@ class FrostfsAdmMorph(CliCommand): if param not in ["self"] }, ) + + def remove_nodes( + self, node_netmap_keys: list[str], rpc_endpoint: Optional[str] = None, alphabet_wallets: Optional[str] = None + ) -> CommandResult: + """ Move node to the Offline state in the candidates list + and tick an epoch to update the netmap using frostfs-adm + + Args: + node_netmap_keys: list of nodes netmap keys. + alphabet_wallets: Path to alphabet wallets dir. + rpc_endpoint: N3 RPC node endpoint. + + Returns: + Command's result. + """ + if not len(node_netmap_keys): + raise AttributeError("Got empty node_netmap_keys list") + + return self._execute( + f"morph remove-nodes {' '.join(node_netmap_keys)}", + **{ + param: param_value + for param, param_value in locals().items() + if param not in ["self", "node_netmap_keys"] + }, + ) \ No newline at end of file