API fix for casadm standby init

Cache line size parameter is handled inconsistently in standby init and
start cache methods.

This patch fixes this inconsistency so both methods accept a proper
CacheLineSize object.

Some of the existing tests needed fixing as well, as included in this
patch.

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
This commit is contained in:
Krzysztof Majzerowicz-Jaszcz
2022-07-05 20:17:08 +02:00
parent e82b07746e
commit 09d36d5e11
5 changed files with 20 additions and 16 deletions

View File

@@ -53,7 +53,7 @@ def test_activate_corrupted():
with TestRun.step("Prepare standby instance"):
cache = casadm.standby_init(
cache_dev=cache_device,
cache_line_size=int(cls.value.value / Unit.KibiByte.value),
cache_line_size=cls,
cache_id=cache_id,
force=True,
)
@@ -154,7 +154,7 @@ def test_activate_corrupted_after_dump():
with TestRun.step("Prepare standby instance"):
cache = casadm.standby_init(
cache_dev=cache_device,
cache_line_size=int(cls.value.value / Unit.KibiByte.value),
cache_line_size=cls,
cache_id=cache_id,
force=True,
)

View File

@@ -1,5 +1,5 @@
#
# Copyright(c) 2019-2021 Intel Corporation
# Copyright(c) 2019-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -62,7 +62,7 @@ def test_activate_neg_cache_id():
):
standby_cache = casadm.standby_init(
standby_dev,
cache_line_size=int(cls.value.value / Unit.KibiByte.value),
cache_line_size=cls,
cache_id=standby_cache_id,
force=True,
)