From 6dd9c9ca8ce001bb913a5a535f1ade4229e4fb75 Mon Sep 17 00:00:00 2001 From: Katarzyna Treder Date: Wed, 11 Dec 2024 17:54:57 +0100 Subject: [PATCH] Iostat refactor Signed-off-by: Katarzyna Treder --- test_tools/iostat.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test_tools/iostat.py b/test_tools/iostat.py index 094327f..2a07dcb 100644 --- a/test_tools/iostat.py +++ b/test_tools/iostat.py @@ -4,7 +4,6 @@ # from core.test_run import TestRun -from storage_devices.device import Device from type_def.size import Size, Unit, UnitPerSecond from type_def.time import Time import csv @@ -84,7 +83,7 @@ class IOstatExtended: @classmethod def get_iostat_list( cls, - devices_list: [Device], + devices_list: [str], since_boot: bool = True, interval: int = 1, ): @@ -138,7 +137,7 @@ class IOstatBasic: @classmethod def get_iostat_list( cls, - devices_list: [Device], + devices_list: [str], since_boot: bool = True, interval: int = 1, ): @@ -150,8 +149,8 @@ class IOstatBasic: def _get_iostat_list( - class_type: type, - devices_list: [Device], + class_type: type(IOstatExtended) | type(IOstatBasic), + devices_list: [str], since_boot: bool, interval: int, ): @@ -163,7 +162,7 @@ def _get_iostat_list( if not since_boot: iostat_cmd += f"-y {interval} 1 " - iostat_cmd += " ".join([name.get_device_id() for name in devices_list]) + iostat_cmd += " ".join(devices_list) sed_cmd = "sed -n '/^$/d;s/\s\+/,/g;/^Device/,$p'"