Skip to content

Commit

Permalink
test-api: fix core pool parse
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
  • Loading branch information
Kamil Gierszewski authored and katlapinka committed Sep 16, 2024
1 parent 173810a commit cc5d796
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/functional/api/cas/casadm_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def get_cas_devices_dict() -> dict:
for device in device_list:
if device["type"] == "cache":
cache_id = int(device["id"])
core_pool = False
params = [
("id", cache_id),
("device_path", device["disk"]),
Expand All @@ -91,14 +92,17 @@ def get_cas_devices_dict() -> dict:
]
if core_pool:
params.append(("core_pool", device))
devices["core_pool"][(cache_id, int(device["id"]))] = dict(
devices["core_pool"][device["disk"]] = dict(
[(key, value) for key, value in params]
)
else:
devices["cores"][(cache_id, int(device["id"]))] = dict(
[(key, value) for key, value in params]
)

elif device["type"] == "core pool":
core_pool = True

return devices


Expand Down

0 comments on commit cc5d796

Please sign in to comment.