Fixes in tests and CAS API due to the change with by-id devices paths
Signed-off-by: Katarzyna Lapinska <katarzyna.lapinska@intel.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
from api.cas.casadm_parser import *
|
||||
from api.cas.cli import *
|
||||
from api.cas.statistics import CacheStats, CacheIoClassStats
|
||||
from storage_devices.device import Device
|
||||
from test_utils.os_utils import *
|
||||
|
||||
|
||||
@@ -24,7 +23,7 @@ class Cache:
|
||||
if output.exit_code == 0 and output.stdout.strip():
|
||||
return output.stdout.split()[1]
|
||||
else:
|
||||
raise Exception(f"There is no cache started on {self.cache_device.path}.")
|
||||
raise Exception(f"There is no cache started on {self.cache_device.get_device_id()}.")
|
||||
|
||||
def get_core_devices(self):
|
||||
return get_cores(self.cache_id)
|
||||
|
@@ -44,9 +44,9 @@ class Core(Device):
|
||||
output_lines = output.stdout.splitlines()
|
||||
for line in output_lines:
|
||||
split_line = line.split(',')
|
||||
if (split_line[0] == "core"
|
||||
and (split_line[2] == fs_utils.readlink(self.core_device.path)
|
||||
or split_line[5] == self.path)):
|
||||
if split_line[0] == "core" and (
|
||||
split_line[2] == os.path.join("/dev", self.core_device.get_device_id())
|
||||
or split_line[5] == self.path):
|
||||
return {"core_id": split_line[1],
|
||||
"core_device": split_line[2],
|
||||
"status": split_line[3],
|
||||
|
Reference in New Issue
Block a user