From 32b611b2a6498b1de307142e335e09d1e0ec082c Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Thu, 7 Mar 2019 20:30:44 +0530 Subject: Reorder lib files removing redundant dir layer Move all the files of 'cns-libs/cnslibs/common' dir to the 'openshift-storage-libs/openshiftstoragelibs', because 'common' is the only dir there, which doesn't really makes sense. And "cns" is old project name, so, replace it with "openshift-storage-libs". Also, fix all the imports of these libs. Change-Id: Ife00a73554e73b21b214b15016b0c8dbbf423446 --- tests/functional/arbiter/test_arbiter.py | 8 +++--- .../gluster_block/test_restart_gluster_block.py | 9 +++--- .../test_gluster_services_restart.py | 10 +++---- .../functional/heketi/test_block_volumes_heketi.py | 16 +++++------ tests/functional/heketi/test_check_brick_paths.py | 10 ++++--- ...est_create_distributed_replica_heketi_volume.py | 26 ++++++++++-------- tests/functional/heketi/test_device_info.py | 4 +-- tests/functional/heketi/test_disabling_device.py | 8 +++--- .../functional/heketi/test_heketi_create_volume.py | 30 ++++++++++---------- .../heketi/test_heketi_device_operations.py | 32 ++++++++++++---------- tests/functional/heketi/test_heketi_metrics.py | 18 ++++++------ .../heketi/test_heketi_volume_operations.py | 12 ++++---- .../functional/heketi/test_node_enable_disable.py | 18 ++++++------ tests/functional/heketi/test_node_info.py | 4 +-- .../heketi/test_server_state_examine_gluster.py | 8 +++--- tests/functional/heketi/test_volume_creation.py | 8 +++--- tests/functional/heketi/test_volume_deletion.py | 6 ++-- .../heketi/test_volume_expansion_and_devices.py | 9 ++++-- tests/functional/heketi/test_volume_multi_req.py | 22 +++++++++------ .../test_dynamic_provisioning_block.py | 31 +++++++++++---------- .../provisioning/test_dynamic_provisioning_file.py | 22 +++++++-------- tests/functional/provisioning/test_pv_resize.py | 16 +++++------ .../provisioning/test_storage_class_cases.py | 10 +++---- tests/functional/test_heketi_restart.py | 13 +++++---- tests/functional/test_node_restart.py | 17 ++++++------ 25 files changed, 196 insertions(+), 171 deletions(-) (limited to 'tests/functional') diff --git a/tests/functional/arbiter/test_arbiter.py b/tests/functional/arbiter/test_arbiter.py index 587a74d3..ad1094b4 100644 --- a/tests/functional/arbiter/test_arbiter.py +++ b/tests/functional/arbiter/test_arbiter.py @@ -1,9 +1,9 @@ import ddt -from cnslibs.common.baseclass import BaseClass -from cnslibs.common import heketi_ops -from cnslibs.common import heketi_version -from cnslibs.common.openshift_ops import ( +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs import heketi_ops +from openshiftstoragelibs import heketi_version +from openshiftstoragelibs.openshift_ops import ( cmd_run_on_gluster_pod_or_node, get_gluster_vol_info_by_pvc_name, oc_create_pvc, diff --git a/tests/functional/gluster_block/test_restart_gluster_block.py b/tests/functional/gluster_block/test_restart_gluster_block.py index 90c10dec..96db077d 100644 --- a/tests/functional/gluster_block/test_restart_gluster_block.py +++ b/tests/functional/gluster_block/test_restart_gluster_block.py @@ -1,12 +1,13 @@ -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.heketi_ops import ( +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.heketi_ops import ( heketi_blockvolume_create, heketi_blockvolume_delete) -from cnslibs.common.openshift_ops import ( +from openshiftstoragelibs.openshift_ops import ( get_pod_name_from_dc, oc_delete, wait_for_pod_be_ready, - wait_for_resource_absence) + wait_for_resource_absence, +) class TestRestartGlusterBlockPod(BaseClass): diff --git a/tests/functional/gluster_stability/test_gluster_services_restart.py b/tests/functional/gluster_stability/test_gluster_services_restart.py index bbde551f..ff00407b 100644 --- a/tests/functional/gluster_stability/test_gluster_services_restart.py +++ b/tests/functional/gluster_stability/test_gluster_services_restart.py @@ -6,9 +6,9 @@ from unittest import skip import ddt from glusto.core import Glusto as g -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.heketi_ops import heketi_blockvolume_list -from cnslibs.common.openshift_ops import ( +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.heketi_ops import heketi_blockvolume_list +from openshiftstoragelibs.openshift_ops import ( get_pod_name_from_dc, match_pv_and_heketi_block_volumes, match_pvc_and_pv, @@ -27,7 +27,7 @@ from cnslibs.common.openshift_ops import ( wait_for_resource_absence, wait_for_service_status_on_gluster_pod_or_node, ) -from cnslibs.common.gluster_ops import ( +from openshiftstoragelibs.gluster_ops import ( get_block_hosting_volume_name, get_gluster_vol_hosting_nodes, match_heketi_and_gluster_block_volumes_by_prefix, @@ -35,7 +35,7 @@ from cnslibs.common.gluster_ops import ( restart_gluster_vol_brick_processes, wait_to_heal_complete, ) -from cnslibs.common import utils +from openshiftstoragelibs import utils HEKETI_BLOCK_VOLUME_REGEX = "^Id:(.*).Cluster:(.*).Name:%s_(.*)$" diff --git a/tests/functional/heketi/test_block_volumes_heketi.py b/tests/functional/heketi/test_block_volumes_heketi.py index b75f58ac..62f90500 100644 --- a/tests/functional/heketi/test_block_volumes_heketi.py +++ b/tests/functional/heketi/test_block_volumes_heketi.py @@ -1,11 +1,11 @@ - -from cnslibs.common.heketi_ops import (heketi_blockvolume_create, - heketi_blockvolume_delete, - heketi_blockvolume_list, - heketi_volume_create, - heketi_volume_delete - ) -from cnslibs.common.baseclass import BaseClass +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.heketi_ops import ( + heketi_blockvolume_create, + heketi_blockvolume_delete, + heketi_blockvolume_list, + heketi_volume_create, + heketi_volume_delete, +) class TestBlockVolumeOps(BaseClass): diff --git a/tests/functional/heketi/test_check_brick_paths.py b/tests/functional/heketi/test_check_brick_paths.py index 1b5aa32d..3c8aa6df 100644 --- a/tests/functional/heketi/test_check_brick_paths.py +++ b/tests/functional/heketi/test_check_brick_paths.py @@ -1,9 +1,11 @@ from glusto.core import Glusto as g -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.heketi_ops import (heketi_volume_create, - heketi_volume_delete) -from cnslibs.common import openshift_ops +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.heketi_ops import ( + heketi_volume_create, + heketi_volume_delete, +) +from openshiftstoragelibs import openshift_ops class TestHeketiVolume(BaseClass): diff --git a/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py b/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py index 93ef0593..04bce628 100644 --- a/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py +++ b/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py @@ -4,18 +4,20 @@ import math from glusto.core import Glusto as g from glustolibs.gluster.volume_ops import get_volume_list, get_volume_info -from cnslibs.common import exceptions -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.heketi_ops import (heketi_node_list, - heketi_node_enable, - heketi_node_disable, - heketi_node_info, - heketi_device_enable, - heketi_device_disable, - heketi_volume_create, - heketi_volume_list, - heketi_volume_delete) -from cnslibs.common import podcmd +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs import exceptions +from openshiftstoragelibs.heketi_ops import ( + heketi_device_disable, + heketi_device_enable, + heketi_node_disable, + heketi_node_enable, + heketi_node_info, + heketi_node_list, + heketi_volume_create, + heketi_volume_delete, + heketi_volume_list, +) +from openshiftstoragelibs import podcmd class TestHeketiVolume(BaseClass): diff --git a/tests/functional/heketi/test_device_info.py b/tests/functional/heketi/test_device_info.py index a48fd814..96199f74 100644 --- a/tests/functional/heketi/test_device_info.py +++ b/tests/functional/heketi/test_device_info.py @@ -1,5 +1,5 @@ -from cnslibs.common.baseclass import BaseClass -from cnslibs.common import heketi_ops +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs import heketi_ops class TestHeketiDeviceInfo(BaseClass): diff --git a/tests/functional/heketi/test_disabling_device.py b/tests/functional/heketi/test_disabling_device.py index f0e2c5c6..c8ec026b 100644 --- a/tests/functional/heketi/test_disabling_device.py +++ b/tests/functional/heketi/test_disabling_device.py @@ -1,10 +1,10 @@ from glusto.core import Glusto as g from glustolibs.gluster.volume_ops import get_volume_info -from cnslibs.common import exceptions -from cnslibs.common import baseclass -from cnslibs.common import heketi_ops -from cnslibs.common import podcmd +from openshiftstoragelibs import baseclass +from openshiftstoragelibs import exceptions +from openshiftstoragelibs import heketi_ops +from openshiftstoragelibs import podcmd class TestDisableHeketiDevice(baseclass.BaseClass): diff --git a/tests/functional/heketi/test_heketi_create_volume.py b/tests/functional/heketi/test_heketi_create_volume.py index c1be0d86..e9679317 100644 --- a/tests/functional/heketi/test_heketi_create_volume.py +++ b/tests/functional/heketi/test_heketi_create_volume.py @@ -2,20 +2,22 @@ from glusto.core import Glusto as g from glustolibs.gluster.volume_ops import get_volume_list, get_volume_info import six -from cnslibs.common.exceptions import ExecutionError -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.heketi_ops import (heketi_volume_create, - heketi_volume_list, - heketi_volume_info, - heketi_blockvolume_create, - heketi_blockvolume_delete, - heketi_cluster_list, - heketi_cluster_delete, - heketi_node_info, - heketi_node_list, - heketi_node_delete, - heketi_volume_delete) -from cnslibs.common import podcmd +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.exceptions import ExecutionError +from openshiftstoragelibs.heketi_ops import ( + heketi_blockvolume_create, + heketi_blockvolume_delete, + heketi_cluster_delete, + heketi_cluster_list, + heketi_node_delete, + heketi_node_info, + heketi_node_list, + heketi_volume_create, + heketi_volume_delete, + heketi_volume_info, + heketi_volume_list, +) +from openshiftstoragelibs import podcmd class TestHeketiVolume(BaseClass): diff --git a/tests/functional/heketi/test_heketi_device_operations.py b/tests/functional/heketi/test_heketi_device_operations.py index 8bd87089..bec1d01f 100644 --- a/tests/functional/heketi/test_heketi_device_operations.py +++ b/tests/functional/heketi/test_heketi_device_operations.py @@ -3,21 +3,23 @@ import json import ddt from glusto.core import Glusto as g -from cnslibs.common.exceptions import ExecutionError -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.heketi_ops import (heketi_node_enable, - heketi_node_info, - heketi_node_disable, - heketi_node_list, - heketi_volume_create, - heketi_device_add, - heketi_device_delete, - heketi_device_disable, - heketi_device_remove, - heketi_device_info, - heketi_device_enable, - heketi_topology_info, - heketi_volume_delete) +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.exceptions import ExecutionError +from openshiftstoragelibs.heketi_ops import ( + heketi_device_add, + heketi_device_delete, + heketi_device_disable, + heketi_device_enable, + heketi_device_info, + heketi_device_remove, + heketi_node_disable, + heketi_node_enable, + heketi_node_info, + heketi_node_list, + heketi_topology_info, + heketi_volume_create, + heketi_volume_delete, +) @ddt.ddt diff --git a/tests/functional/heketi/test_heketi_metrics.py b/tests/functional/heketi/test_heketi_metrics.py index 4653caee..f6601074 100644 --- a/tests/functional/heketi/test_heketi_metrics.py +++ b/tests/functional/heketi/test_heketi_metrics.py @@ -1,20 +1,20 @@ -from cnslibs.common import exceptions -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.heketi_ops import ( +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs import exceptions +from openshiftstoragelibs.heketi_ops import ( get_heketi_metrics, heketi_cluster_info, heketi_cluster_list, heketi_topology_info, heketi_volume_create, heketi_volume_delete, - heketi_volume_list - ) -from cnslibs.common import heketi_version -from cnslibs.common.openshift_ops import ( + heketi_volume_list, +) +from openshiftstoragelibs import heketi_version +from openshiftstoragelibs.openshift_ops import ( get_pod_name_from_dc, scale_dc_pod_amount_and_wait, - wait_for_pod_be_ready - ) + wait_for_pod_be_ready, +) class TestHeketiMetrics(BaseClass): diff --git a/tests/functional/heketi/test_heketi_volume_operations.py b/tests/functional/heketi/test_heketi_volume_operations.py index d7b9aa18..c5fc4f84 100644 --- a/tests/functional/heketi/test_heketi_volume_operations.py +++ b/tests/functional/heketi/test_heketi_volume_operations.py @@ -1,8 +1,10 @@ -from cnslibs.common.heketi_ops import (heketi_volume_delete, - heketi_volume_create, - heketi_volume_expand, - heketi_volume_info) -from cnslibs.common.baseclass import BaseClass +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.heketi_ops import ( + heketi_volume_create, + heketi_volume_delete, + heketi_volume_expand, + heketi_volume_info, +) class TestHeketiVolumeOperations(BaseClass): diff --git a/tests/functional/heketi/test_node_enable_disable.py b/tests/functional/heketi/test_node_enable_disable.py index b8ce2c71..dcd2f7b4 100644 --- a/tests/functional/heketi/test_node_enable_disable.py +++ b/tests/functional/heketi/test_node_enable_disable.py @@ -1,16 +1,18 @@ """Test cases to disable and enable node in heketi.""" import json -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.heketi_ops import (heketi_node_enable, - heketi_node_info, - heketi_node_disable, - heketi_node_list, - heketi_volume_create, - heketi_volume_delete - ) from glusto.core import Glusto as g +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.heketi_ops import ( + heketi_node_disable, + heketi_node_enable, + heketi_node_info, + heketi_node_list, + heketi_volume_create, + heketi_volume_delete, +) + class TestHeketiNodeState(BaseClass): """Test node enable and disable functionality.""" diff --git a/tests/functional/heketi/test_node_info.py b/tests/functional/heketi/test_node_info.py index ad60b844..5bf7270f 100644 --- a/tests/functional/heketi/test_node_info.py +++ b/tests/functional/heketi/test_node_info.py @@ -2,8 +2,8 @@ from glusto.core import Glusto as g from glustolibs.gluster.exceptions import ExecutionError from glustolibs.gluster.peer_ops import get_pool_list -from cnslibs.common.baseclass import BaseClass -from cnslibs.common import heketi_ops, podcmd +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs import heketi_ops, podcmd class TestHeketiVolume(BaseClass): diff --git a/tests/functional/heketi/test_server_state_examine_gluster.py b/tests/functional/heketi/test_server_state_examine_gluster.py index f74366ed..22352024 100644 --- a/tests/functional/heketi/test_server_state_examine_gluster.py +++ b/tests/functional/heketi/test_server_state_examine_gluster.py @@ -1,7 +1,7 @@ -from cnslibs.common.baseclass import BaseClass -from cnslibs.common import heketi_ops -from cnslibs.common import heketi_version -from cnslibs.common import openshift_ops +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs import heketi_ops +from openshiftstoragelibs import heketi_version +from openshiftstoragelibs import openshift_ops class TestHeketiServerStateExamineGluster(BaseClass): diff --git a/tests/functional/heketi/test_volume_creation.py b/tests/functional/heketi/test_volume_creation.py index 86618505..f8ca5d81 100644 --- a/tests/functional/heketi/test_volume_creation.py +++ b/tests/functional/heketi/test_volume_creation.py @@ -1,10 +1,10 @@ from glusto.core import Glusto as g from glustolibs.gluster import volume_ops -from cnslibs.common import exceptions -from cnslibs.common.baseclass import BaseClass -from cnslibs.common import heketi_ops -from cnslibs.common import podcmd +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs import exceptions +from openshiftstoragelibs import heketi_ops +from openshiftstoragelibs import podcmd class TestVolumeCreationTestCases(BaseClass): diff --git a/tests/functional/heketi/test_volume_deletion.py b/tests/functional/heketi/test_volume_deletion.py index 6f279899..7b1f2ded 100644 --- a/tests/functional/heketi/test_volume_deletion.py +++ b/tests/functional/heketi/test_volume_deletion.py @@ -1,8 +1,8 @@ from __future__ import division -from cnslibs.common.exceptions import ExecutionError -from cnslibs.common.baseclass import BaseClass -from cnslibs.common import heketi_ops +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.exceptions import ExecutionError +from openshiftstoragelibs import heketi_ops class TestVolumeDeleteTestCases(BaseClass): diff --git a/tests/functional/heketi/test_volume_expansion_and_devices.py b/tests/functional/heketi/test_volume_expansion_and_devices.py index 5e189e49..d87c18e5 100644 --- a/tests/functional/heketi/test_volume_expansion_and_devices.py +++ b/tests/functional/heketi/test_volume_expansion_and_devices.py @@ -4,9 +4,12 @@ import math from glusto.core import Glusto as g from glustolibs.gluster import volume_ops, rebalance_ops -from cnslibs.common.exceptions import ExecutionError -from cnslibs.common.baseclass import BaseClass -from cnslibs.common import heketi_ops, podcmd +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.exceptions import ExecutionError +from openshiftstoragelibs import ( + heketi_ops, + podcmd, +) class TestVolumeExpansionAndDevicesTestCases(BaseClass): diff --git a/tests/functional/heketi/test_volume_multi_req.py b/tests/functional/heketi/test_volume_multi_req.py index f6b0fcf6..3445a8a4 100644 --- a/tests/functional/heketi/test_volume_multi_req.py +++ b/tests/functional/heketi/test_volume_multi_req.py @@ -11,14 +11,20 @@ import yaml from glusto.core import Glusto as g -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.heketi_ops import ( - heketi_volume_list) -from cnslibs.common.naming import ( - make_unique_label, extract_method_name) -from cnslibs.common.openshift_ops import ( - oc_create, oc_delete, oc_get_pvc, oc_get_pv, oc_get_all_pvs) -from cnslibs.common.waiter import Waiter +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.heketi_ops import heketi_volume_list +from openshiftstoragelibs.naming import ( + make_unique_label, + extract_method_name, +) +from openshiftstoragelibs.openshift_ops import ( + oc_create, + oc_delete, + oc_get_all_pvs, + oc_get_pv, + oc_get_pvc, +) +from openshiftstoragelibs.waiter import Waiter def build_storage_class(name, resturl, restuser='foo', restuserkey='foo'): diff --git a/tests/functional/provisioning/test_dynamic_provisioning_block.py b/tests/functional/provisioning/test_dynamic_provisioning_block.py index 3adbcd43..85b842eb 100644 --- a/tests/functional/provisioning/test_dynamic_provisioning_block.py +++ b/tests/functional/provisioning/test_dynamic_provisioning_block.py @@ -1,15 +1,22 @@ from unittest import skip -from cnslibs.common.baseclass import GlusterBlockBaseClass -from cnslibs.common.cns_libs import ( +from glusto.core import Glusto as g + +from openshiftstoragelibs.baseclass import GlusterBlockBaseClass +from openshiftstoragelibs.openshift_storage_libs import ( get_iscsi_block_devices_by_path, get_iscsi_session, get_mpath_name_from_device_name, validate_multipath_pod, - ) -from cnslibs.common.command import cmd_run -from cnslibs.common.exceptions import ExecutionError -from cnslibs.common.openshift_ops import ( +) +from openshiftstoragelibs.command import cmd_run +from openshiftstoragelibs.exceptions import ExecutionError +from openshiftstoragelibs.heketi_ops import ( + heketi_blockvolume_delete, + heketi_blockvolume_info, + heketi_blockvolume_list +) +from openshiftstoragelibs.openshift_ops import ( cmd_run_on_gluster_pod_or_node, get_gluster_pod_names_by_pvc_name, get_pod_name_from_dc, @@ -25,15 +32,9 @@ from cnslibs.common.openshift_ops import ( scale_dc_pod_amount_and_wait, verify_pvc_status_is_bound, wait_for_pod_be_ready, - wait_for_resource_absence - ) -from cnslibs.common.heketi_ops import ( - heketi_blockvolume_delete, - heketi_blockvolume_info, - heketi_blockvolume_list - ) -from cnslibs.common.waiter import Waiter -from glusto.core import Glusto as g + wait_for_resource_absence, +) +from openshiftstoragelibs.waiter import Waiter class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass): diff --git a/tests/functional/provisioning/test_dynamic_provisioning_file.py b/tests/functional/provisioning/test_dynamic_provisioning_file.py index 3367bab2..f3b32d0f 100644 --- a/tests/functional/provisioning/test_dynamic_provisioning_file.py +++ b/tests/functional/provisioning/test_dynamic_provisioning_file.py @@ -1,11 +1,16 @@ import time from unittest import skip -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.exceptions import ExecutionError -from cnslibs.common.heketi_ops import ( - verify_volume_name_prefix) -from cnslibs.common.openshift_ops import ( +from glusto.core import Glusto as g + +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.exceptions import ExecutionError +from openshiftstoragelibs.heketi_ops import ( + heketi_volume_delete, + heketi_volume_list, + verify_volume_name_prefix, +) +from openshiftstoragelibs.openshift_ops import ( get_gluster_pod_names_by_pvc_name, get_pv_name_from_pvc, get_pod_name_from_dc, @@ -22,12 +27,7 @@ from cnslibs.common.openshift_ops import ( verify_pvc_status_is_bound, wait_for_pod_be_ready, wait_for_resource_absence) -from cnslibs.common.heketi_ops import ( - heketi_volume_delete, - heketi_volume_list - ) -from cnslibs.common.waiter import Waiter -from glusto.core import Glusto as g +from openshiftstoragelibs.waiter import Waiter class TestDynamicProvisioningP0(BaseClass): diff --git a/tests/functional/provisioning/test_pv_resize.py b/tests/functional/provisioning/test_pv_resize.py index 9490ce61..8c23ea8e 100644 --- a/tests/functional/provisioning/test_pv_resize.py +++ b/tests/functional/provisioning/test_pv_resize.py @@ -1,8 +1,11 @@ import ddt -from cnslibs.common.cns_libs import ( - enable_pvc_resize) -from cnslibs.common import heketi_ops -from cnslibs.common.openshift_ops import ( +from glusto.core import Glusto as g + +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.openshift_storage_libs import enable_pvc_resize +from openshiftstoragelibs.exceptions import ExecutionError +from openshiftstoragelibs import heketi_ops +from openshiftstoragelibs.openshift_ops import ( resize_pvc, get_pod_name_from_dc, get_pv_name_from_pvc, @@ -15,10 +18,7 @@ from cnslibs.common.openshift_ops import ( wait_for_events, wait_for_pod_be_ready, wait_for_resource_absence) -from cnslibs.common.openshift_version import get_openshift_version -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.exceptions import ExecutionError -from glusto.core import Glusto as g +from openshiftstoragelibs.openshift_version import get_openshift_version @ddt.ddt diff --git a/tests/functional/provisioning/test_storage_class_cases.py b/tests/functional/provisioning/test_storage_class_cases.py index 148bbb10..5ecfcd67 100644 --- a/tests/functional/provisioning/test_storage_class_cases.py +++ b/tests/functional/provisioning/test_storage_class_cases.py @@ -3,9 +3,10 @@ from unittest import skip import ddt from glusto.core import Glusto as g -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.cns_libs import validate_multipath_pod -from cnslibs.common.openshift_ops import ( +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.openshift_storage_libs import validate_multipath_pod +from openshiftstoragelibs.heketi_ops import verify_volume_name_prefix +from openshiftstoragelibs.openshift_ops import ( get_amount_of_gluster_nodes, get_gluster_blockvol_info_by_pvc_name, get_pod_name_from_dc, @@ -17,9 +18,8 @@ from cnslibs.common.openshift_ops import ( scale_dc_pod_amount_and_wait, wait_for_events, wait_for_pod_be_ready, - wait_for_resource_absence + wait_for_resource_absence, ) -from cnslibs.common.heketi_ops import verify_volume_name_prefix @ddt.ddt diff --git a/tests/functional/test_heketi_restart.py b/tests/functional/test_heketi_restart.py index a06bf9c6..0c32fea2 100644 --- a/tests/functional/test_heketi_restart.py +++ b/tests/functional/test_heketi_restart.py @@ -1,17 +1,18 @@ from jsondiff import diff -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.heketi_ops import ( +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.heketi_ops import ( heketi_topology_info, - hello_heketi, heketi_volume_create, - heketi_volume_delete + heketi_volume_delete, + hello_heketi, ) -from cnslibs.common.openshift_ops import ( +from openshiftstoragelibs.openshift_ops import ( get_pod_name_from_dc, oc_delete, wait_for_pod_be_ready, - wait_for_resource_absence) + wait_for_resource_absence, +) class TestRestartHeketi(BaseClass): diff --git a/tests/functional/test_node_restart.py b/tests/functional/test_node_restart.py index 6a0969ee..d1be4232 100644 --- a/tests/functional/test_node_restart.py +++ b/tests/functional/test_node_restart.py @@ -1,16 +1,17 @@ - import time - from unittest import skip -from cnslibs.common.baseclass import BaseClass -from cnslibs.common.openshift_ops import ( + +from glusto.core import Glusto as g + +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.exceptions import ExecutionError +from openshiftstoragelibs.openshift_ops import ( check_service_status_on_pod, get_ocp_gluster_pod_names, oc_rsh, - wait_for_pod_be_ready) -from cnslibs.common.waiter import Waiter -from cnslibs.common.exceptions import ExecutionError -from glusto.core import Glusto as g + wait_for_pod_be_ready, +) +from openshiftstoragelibs.waiter import Waiter class TestNodeRestart(BaseClass): -- cgit