From 0684d621f6cd4b7a8b85b8789dc1789029fcd2a0 Mon Sep 17 00:00:00 2001 From: Kamil Gierszewski Date: Mon, 19 Aug 2024 09:42:44 +0200 Subject: [PATCH] test-api: fixup --- test/functional/api/cas/cli.py | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/test/functional/api/cas/cli.py b/test/functional/api/cas/cli.py index 864580ba6..9fb4a913e 100644 --- a/test/functional/api/cas/cli.py +++ b/test/functional/api/cas/cli.py @@ -174,7 +174,6 @@ def get_param_cutoff_cmd( command = _get_param_cmd( name=name, cache_id=cache_id, - core_id=core_id, output_format=output_format, shortcut=shortcut, ) @@ -182,6 +181,32 @@ def get_param_cutoff_cmd( return casadm_bin + command +def get_param_promotion_cmd( + cache_id: str, output_format: str = None, shortcut: bool = False +) -> str: + name = "promotion" + command = _get_param_cmd( + name=name, + cache_id=cache_id, + output_format=output_format, + shortcut=shortcut, + ) + return casadm_bin + command + + +def get_param_promotion_nhit_cmd( + cache_id: str, output_format: str = None, shortcut: bool = False +) -> str: + name = "promotion-nhit" + command = _get_param_cmd( + name=name, + cache_id=cache_id, + output_format=output_format, + shortcut=shortcut, + ) + return casadm_bin + command + + def get_param_cleaning_cmd(cache_id: str, output_format: str = None, shortcut: bool = False) -> str: name = "cleaning" command = _get_param_cmd( @@ -415,8 +440,9 @@ def ctl_init(force: bool = False) -> str: def script_try_add_cmd(cache_id: str, core_dev: str, core_id: str = None) -> str: command = " --script --add-core --try-add" command += " --cache-id " + cache_id + command += " --core-device " + core_dev if core_id: - command += " --core-device " + core_dev + command += f" --core-id " + core_id return casadm_bin + command