OS tools refactor
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
This commit is contained in:
@@ -8,7 +8,7 @@ from api.cas.casadm_parser import *
|
||||
from api.cas.core import Core
|
||||
from api.cas.dmesg import get_metadata_size_on_device
|
||||
from api.cas.statistics import CacheStats, CacheIoClassStats
|
||||
from test_utils.os_utils import *
|
||||
from test_tools.os_tools import *
|
||||
from connection.utils.output import Output
|
||||
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
from enum import Enum, IntFlag
|
||||
|
||||
from test_utils.os_utils import get_kernel_module_parameter
|
||||
from test_tools.os_tools import get_kernel_module_parameter
|
||||
from types.size import Size, Unit
|
||||
from types.time import Time
|
||||
|
||||
|
@@ -6,8 +6,7 @@
|
||||
|
||||
from enum import Enum
|
||||
from core.test_run import TestRun
|
||||
from test_utils import os_utils
|
||||
from test_utils.os_utils import ModuleRemoveMethod
|
||||
from test_tools import os_tools
|
||||
|
||||
|
||||
class CasModule(Enum):
|
||||
@@ -15,12 +14,12 @@ class CasModule(Enum):
|
||||
|
||||
|
||||
def reload_all_cas_modules():
|
||||
os_utils.unload_kernel_module(CasModule.cache.value, ModuleRemoveMethod.modprobe)
|
||||
os_utils.load_kernel_module(CasModule.cache.value)
|
||||
os_tools.unload_kernel_module(CasModule.cache.value)
|
||||
os_tools.load_kernel_module(CasModule.cache.value)
|
||||
|
||||
|
||||
def unload_all_cas_modules():
|
||||
os_utils.unload_kernel_module(CasModule.cache.value, os_utils.ModuleRemoveMethod.rmmod)
|
||||
os_tools.unload_kernel_module(CasModule.cache.value)
|
||||
|
||||
|
||||
def is_cas_management_dev_present():
|
||||
|
@@ -20,7 +20,7 @@ from api.cas.cli import *
|
||||
from api.cas.core import Core
|
||||
from core.test_run import TestRun
|
||||
from storage_devices.device import Device
|
||||
from test_utils.os_utils import reload_kernel_module
|
||||
from test_tools.os_tools import reload_kernel_module
|
||||
from connection.utils.output import CmdException, Output
|
||||
from types.size import Size, Unit
|
||||
|
||||
|
@@ -16,7 +16,7 @@ from api.cas.statistics import CoreStats, CoreIoClassStats
|
||||
from core.test_run_utils import TestRun
|
||||
from storage_devices.device import Device
|
||||
from test_tools import fs_utils, disk_utils
|
||||
from test_utils.os_utils import sync
|
||||
from test_tools.os_tools import sync
|
||||
from test_tools.common.wait import wait
|
||||
from types.size import Unit, Size
|
||||
|
||||
|
@@ -9,8 +9,7 @@ import os
|
||||
from core.test_run import TestRun
|
||||
from api.cas import cas_module
|
||||
from api.cas.version import get_installed_cas_version
|
||||
from test_utils import os_utils
|
||||
from test_tools import git
|
||||
from test_tools import git, os_tools
|
||||
from connection.utils.output import CmdException
|
||||
|
||||
|
||||
|
@@ -15,7 +15,7 @@ from packaging import version
|
||||
|
||||
from core.test_run import TestRun
|
||||
from test_tools import fs_utils
|
||||
from test_utils import os_utils
|
||||
from test_tools.os_tools import get_kernel_version
|
||||
|
||||
default_config_file_path = "/tmp/opencas_ioclass.conf"
|
||||
|
||||
@@ -166,7 +166,7 @@ class IoClass:
|
||||
"file_offset",
|
||||
"request_size",
|
||||
]
|
||||
if os_utils.get_kernel_version() >= version.Version("4.13"):
|
||||
if get_kernel_version() >= version.Version("4.13"):
|
||||
rules.append("wlth")
|
||||
|
||||
rule = random.choice(rules)
|
||||
|
Reference in New Issue
Block a user