Skip to content

Commit

Permalink
test-api: fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Gierszewski committed Aug 19, 2024
1 parent e0aab0e commit 0684d62
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions test/functional/api/cas/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,39 @@ 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,
)
command += (" -j " if shortcut else " --core-id ") + core_id
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(
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit 0684d62

Please sign in to comment.