update CAS API to adapt changes in casadm
Signed-off-by: Damian Raczkowski <damian.raczkowski@intel.com>
This commit is contained in:
parent
4a933f603b
commit
f67543e7b3
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright(c) 2019-2021 Intel Corporation
|
||||
# Copyright(c) 2019-2022 Intel Corporation
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
@ -85,8 +85,8 @@ def flush_cache_cmd(cache_id: str, shortcut: bool = False):
|
||||
|
||||
|
||||
def flush_core_cmd(cache_id: str, core_id: str, shortcut: bool = False):
|
||||
command = (f" -E -i {cache_id} -j {core_id}" if shortcut
|
||||
else f" --flush-core --cache-id {cache_id} --core-id {core_id}")
|
||||
command = (f" -F -i {cache_id} -j {core_id}" if shortcut
|
||||
else f" --flush-cache --cache-id {cache_id} --core-id {core_id}")
|
||||
return casadm_bin + command
|
||||
|
||||
|
||||
|
@ -20,8 +20,6 @@ casadm_help = [
|
||||
r"-P --stats Print statistics for cache instance",
|
||||
r"-Z --reset-counters Reset cache statistics for core device within cache instance",
|
||||
r"-F --flush-cache Flush all dirty data from the caching device to core devices",
|
||||
r"-E --flush-core Flush dirty data of a given core from the caching device "
|
||||
r"to this core device",
|
||||
r"-C --io-class Manage IO classes",
|
||||
r"-V --version Print CAS version",
|
||||
r"-H --help Print help",
|
||||
@ -61,20 +59,14 @@ ioclass_help = [
|
||||
r"-o --output-format \<FORMAT\> Output format: \{table|csv\}"
|
||||
]
|
||||
|
||||
flush_core_help = [
|
||||
r"Usage: casadm --flush-core --cache-id \<ID\> --core-id \<ID\>",
|
||||
r"Flush dirty data of a given core from the caching device to this core device",
|
||||
r"Options that are valid with --flush-core \(-E\) are:",
|
||||
r"-i --cache-id \<ID\> Identifier of cache instance \<1-16384\>",
|
||||
r"-j --core-id \<ID\> Identifier of core \<0-4095\> within given cache "
|
||||
r"instance"
|
||||
]
|
||||
|
||||
flush_cache_help = [
|
||||
r"Usage: casadm --flush-cache --cache-id \<ID\>",
|
||||
r"Flush all dirty data from the caching device to core devices",
|
||||
r"Options that are valid with --flush-cache \(-F\) are:",
|
||||
r"-i --cache-id \<ID\> Identifier of cache instance \<1-16384\>"
|
||||
r"-j --core-id \<ID\> Identifier of core \<0-4095\> within given cache "
|
||||
r"instance. This is an optional parameter When provided, it will flush core with provided"
|
||||
r" id connected to cache. In other case it will flush cache."
|
||||
]
|
||||
|
||||
reset_counters_help = [
|
||||
|
@ -74,10 +74,6 @@ def test_cli_help(shortcut):
|
||||
+ (" -H" if shortcut else " --help"))
|
||||
check_stdout_msg(output, flush_cache_help)
|
||||
|
||||
output = TestRun.executor.run("casadm" + (" -E" if shortcut else " --flush-core")
|
||||
+ (" -H" if shortcut else " --help"))
|
||||
check_stdout_msg(output, flush_core_help)
|
||||
|
||||
output = TestRun.executor.run("casadm" + (" -C" if shortcut else " --io-class")
|
||||
+ (" -H" if shortcut else " --help"))
|
||||
check_stdout_msg(output, ioclass_help)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Copyright(c) 2012-2021 Intel Corporation
|
||||
# Copyright(c) 2012-2022 Intel Corporation
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
@ -530,7 +530,7 @@ flush_cache() {
|
||||
flush_core() {
|
||||
check_options ${FUNCNAME[0]}
|
||||
|
||||
local COMMAND="$CAS --flush-core --cache-id $CACHE_ID_OPTION --core-id $CORE_ID_OPTION"
|
||||
local COMMAND="$CAS --flush-cache --cache-id $CACHE_ID_OPTION --core-id $CORE_ID_OPTION"
|
||||
|
||||
run_cmd $COMMAND
|
||||
clear_options
|
||||
|
Loading…
Reference in New Issue
Block a user