summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2018-12-15 23:40:26 +0530
committerValerii Ponomarov <vponomar@redhat.com>2018-12-15 23:40:26 +0530
commit90170d48e5d5190e1f552cb4792a5e093e30f8d0 (patch)
treeda84bd2926f9f993f32b623e9f941f3c034b06d5
parent480d47278e7e82ca596622da8db45ef6f4bde8d9 (diff)
Cleanup base classes
Remove unused/dead code from base classes. Change-Id: Ib355e0282541c60297c1b240f7ff8df3f06d9d69
-rw-r--r--cns-libs/cnslibs/cns/cns_baseclass.py225
-rw-r--r--tests/functional/common/gluster_block/test_restart_gluster_block.py4
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_disabling_device.py2
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_heketi_create_volume.py4
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_heketi_enable_device.py4
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_node_enable_disable.py4
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_node_info.py4
-rw-r--r--tests/functional/common/heketi/test_block_volumes_heketi.py4
-rw-r--r--tests/functional/common/heketi/test_check_entries.py4
-rw-r--r--tests/functional/common/heketi/test_create_distributed_replica_heketi_volume.py4
-rw-r--r--tests/functional/common/heketi/test_device_info.py2
-rw-r--r--tests/functional/common/heketi/test_heketi_metrics.py4
-rw-r--r--tests/functional/common/heketi/test_heketi_volume_operations.py24
-rw-r--r--tests/functional/common/heketi/test_volume_creation.py2
-rw-r--r--tests/functional/common/heketi/test_volume_deletion.py4
-rw-r--r--tests/functional/common/heketi/test_volume_expansion_and_devices.py4
-rw-r--r--tests/functional/common/heketi/test_volume_multi_req.py4
-rw-r--r--tests/functional/common/test_heketi_restart.py4
18 files changed, 35 insertions, 272 deletions
diff --git a/cns-libs/cnslibs/cns/cns_baseclass.py b/cns-libs/cnslibs/cns/cns_baseclass.py
index 5dfe430c..81ea8f18 100644
--- a/cns-libs/cnslibs/cns/cns_baseclass.py
+++ b/cns-libs/cnslibs/cns/cns_baseclass.py
@@ -1,28 +1,10 @@
from collections import OrderedDict
from cnslibs.common import command
-from cnslibs.common.exceptions import (
- ConfigError,
- ExecutionError)
+from cnslibs.common.exceptions import ExecutionError
from cnslibs.common.heketi_ops import (
heketi_blockvolume_delete,
- heketi_create_topology,
- heketi_volume_delete,
- hello_heketi)
-from cnslibs.common.cns_libs import (
- edit_iptables_cns,
- enable_kernel_module,
- edit_master_config_file,
- edit_multipath_conf_file,
- setup_router,
- start_rpcbind_service,
- update_nameserver_resolv_conf,
- update_router_ip_dnsmasq_conf)
-from cnslibs.common.docker_libs import (
- docker_add_registry,
- docker_insecure_registry)
+ heketi_volume_delete)
from cnslibs.common.openshift_ops import (
- create_namespace,
- get_ocp_gluster_pod_names,
get_pod_name_from_dc,
get_pv_name_from_pvc,
oc_create_app_dc_with_io,
@@ -31,7 +13,6 @@ from cnslibs.common.openshift_ops import (
oc_create_secret,
oc_delete,
oc_get_custom_resource,
- oc_rsh,
scale_dc_pod_amount_and_wait,
verify_pvc_status_is_bound,
wait_for_pod_be_ready,
@@ -68,14 +49,7 @@ class CnsBaseClass(unittest.TestCase):
cls.cns_username = g.config['cns']['setup']['cns_username']
cls.cns_password = g.config['cns']['setup']['cns_password']
cls.cns_project_name = g.config['cns']['setup']['cns_project_name']
- cls.add_registry = g.config['cns']['setup']['add_registry']
- cls.insecure_registry = g.config['cns']['setup']['insecure_registry']
- cls.routingconfig_subdomain = (g.config['cns']['setup']
- ['routing_config'])
cls.deployment_type = g.config['cns']['deployment_type']
- cls.executor = g.config['cns']['executor']
- cls.executor_user = g.config['cns']['executor_user']
- cls.executor_port = g.config['cns']['executor_port']
# Initializes heketi config variables
heketi_config = g.config['cns']['heketi_config']
@@ -290,168 +264,6 @@ class CnsBaseClass(unittest.TestCase):
return dc_name, pod_name
-class CnsSetupBaseClass(CnsBaseClass):
- '''
- This class does the basic CNS setup
- '''
- @classmethod
- def setUpClass(cls):
- '''
- CNS setup
- '''
- super(CnsSetupBaseClass, cls).setUpClass()
- mod_names = ('dm_thin_pool', 'dm_multipath', 'target_core_user')
- for node in cls.ocp_all_nodes:
- for mod_name in mod_names:
- if not enable_kernel_module(node, mod_name):
- raise ExecutionError(
- "failed to enable kernel module %s" % mod_name)
- if not start_rpcbind_service(node):
- raise ExecutionError("failed to start rpcbind service")
- if not edit_iptables_cns(node):
- raise ExecutionError("failed to edit iptables")
- cmd = "systemctl reload iptables"
- cmd_results = g.run_parallel(cls.ocp_all_nodes, cmd, "root")
- for node, ret_values in cmd_results.iteritems():
- ret, out, err = ret_values
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, node, out, err))
- if not edit_master_config_file(cls.ocp_master_node[0],
- cls.routingconfig_subdomain):
- raise ExecutionError("failed to edit master.conf file")
- cmd = "systemctl restart atomic-openshift-node.service"
- cmd_results = g.run_parallel(cls.ocp_nodes, cmd, "root")
- for node, ret_values in cmd_results.iteritems():
- ret, out, err = ret_values
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, node, out, err))
- cmd = ("systemctl restart atomic-openshift-master-api "
- "atomic-openshift-master-controllers")
- ret, out, err = g.run(cls.ocp_master_node[0], cmd, "root")
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: %s "
- "err: %s" % (
- cmd, cls.ocp_master_node[0], out, err))
- cmd = ("oc login -u system:admin && oadm policy "
- "add-cluster-role-to-user cluster-admin %s") % cls.cns_username
- ret, out, err = g.run(cls.ocp_master_node[0], cmd, "root")
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: %s "
- "err: %s" % (
- cmd, cls.ocp_master_node[0], out, err))
- for node in cls.ocp_all_nodes:
- ret = docker_add_registry(node, cls.add_registry)
- if not ret:
- raise ExecutionError("failed to edit add_registry in docker "
- "file on %s" % node)
- ret = docker_insecure_registry(node, cls.insecure_registry)
- if not ret:
- raise ExecutionError("failed to edit insecure_registry in "
- "docker file on %s" % node)
- cmd = "systemctl restart docker"
- cmd_results = g.run_parallel(cls.ocp_all_nodes, cmd, "root")
- for node, ret_values in cmd_results.iteritems():
- ret, out, err = ret_values
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, node, out, err))
- cmd = ("oc login %s:8443 -u %s -p %s --insecure-skip-tls-verify="
- "true" % (
- cls.ocp_master_node[0], cls.cns_username, cls.cns_password))
- ret, out, err = g.run(cls.ocp_client[0], cmd, "root")
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, cls.ocp_client[0], out, err))
- cmd = 'oadm policy add-scc-to-user privileged -z default'
- ret, out, err = g.run(cls.ocp_client[0], cmd, "root")
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, cls.ocp_client[0], out, err))
- ret = create_namespace(cls.ocp_client[0], cls.cns_project_name)
- if not ret:
- raise ExecutionError("failed to create namespace")
- cmd = 'oc project %s' % cls.cns_project_name
- ret, out, err = g.run(cls.ocp_client[0], cmd, "root")
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, cls.ocp_client[0], out, err))
- cls.router_name = "%s-router" % cls.cns_project_name
- if not setup_router(cls.ocp_client[0], cls.router_name):
- raise ExecutionError("failed to setup router")
- if not update_router_ip_dnsmasq_conf(cls.ocp_client[0],
- cls.router_name,
- cls.routingconfig_subdomain):
- raise ExecutionError("failed to update router ip in dnsmasq.conf")
- cmd = "systemctl restart dnsmasq.service"
- ret, out, err = g.run(cls.ocp_client[0], cmd, "root")
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, cls.ocp_client[0], out, err))
- cmd = 'oc project %s' % cls.cns_project_name
- ret, out, err = g.run(cls.ocp_master_node[0], cmd, "root")
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, cls.ocp_master_node[0], out, err))
- if not update_router_ip_dnsmasq_conf(cls.ocp_master_node[0],
- cls.router_name,
- cls.routingconfig_subdomain):
- raise ExecutionError("failed to update router ip in dnsmasq.conf")
- cmd = "systemctl restart dnsmasq.service"
- ret, out, err = g.run(cls.ocp_master_node[0], cmd, "root")
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, cls.ocp_master_node[0], out, err))
- if not update_nameserver_resolv_conf(cls.ocp_master_node[0], "EOF"):
- raise ExecutionError("failed to update namserver in resolv.conf")
- if cls.ocp_master_node[0] != cls.ocp_client[0]:
- if not update_nameserver_resolv_conf(cls.ocp_client[0]):
- raise ExecutionError(
- "failed to update namserver in resolv.conf")
-
- @classmethod
- def cns_deploy(cls):
- '''
- This function runs the cns-deploy
- '''
- ret = heketi_create_topology(cls.heketi_client_node,
- cls.topology_info)
- if not ret:
- raise ConfigError("Failed to create heketi topology file on %s"
- % cls.heketi_client_node)
- # temporary workaround till we get fix for bug -
- # https://bugzilla.redhat.com/show_bug.cgi?id=1505948
- cmd = "sed -i s/'exec -it'/'exec -i'/g /usr/bin/cns-deploy"
- ret, out, err = g.run(cls.ocp_client[0], cmd, "root")
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, cls.ocp_client[0], out, err))
- cmd = (
- "cns-deploy -n %s -g -c oc -t /usr/share/heketi/templates -l "
- "cns_deploy.log -v -w 600 -y /usr/share/heketi/topology.json" % (
- cls.cns_project_name))
- ret, out, err = g.run(cls.ocp_client[0], cmd, "root")
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, cls.ocp_client[0], out, err))
- # Checks if heketi server is alive
- if not hello_heketi(cls.heketi_client_node, cls.heketi_server_url):
- raise ConfigError("Heketi server %s is not alive"
- % cls.heketi_server_url)
-
-
class CnsGlusterBlockBaseClass(CnsBaseClass):
'''
This class is for setting up glusterblock on CNS
@@ -465,39 +277,6 @@ class CnsGlusterBlockBaseClass(CnsBaseClass):
cls.sc = cls.cns_storage_class.get(
'storage_class2',
cls.cns_storage_class.get('block_storage_class'))
- for node in cls.ocp_all_nodes:
- if not edit_iptables_cns(node):
- raise ExecutionError("failed to edit iptables")
- cmd = "systemctl reload iptables"
- cmd_results = g.run_parallel(cls.ocp_all_nodes, cmd, "root")
- gluster_pod_list = get_ocp_gluster_pod_names(cls.ocp_master_node[0])
- g.log.info("gluster_pod_list - %s" % gluster_pod_list)
- for pod in gluster_pod_list:
- cmd = "systemctl start gluster-blockd"
- ret, out, err = oc_rsh(cls.ocp_master_node[0], pod, cmd)
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (
- cmd, cls.ocp_master_node[0],
- out, err))
- cmd = "mpathconf --enable"
- cmd_results = g.run_parallel(cls.ocp_nodes, cmd, "root")
- for node, ret_values in cmd_results.iteritems():
- ret, out, err = ret_values
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (cmd, node, out, err))
- for node in cls.ocp_nodes:
- ret = edit_multipath_conf_file(node)
- if not ret:
- raise ExecutionError("failed to edit multipath.conf file")
- cmd = "systemctl restart multipathd"
- cmd_results = g.run_parallel(cls.ocp_nodes, cmd, "root")
- for node, ret_values in cmd_results.iteritems():
- ret, out, err = ret_values
- if ret != 0:
- raise ExecutionError("failed to execute cmd %s on %s out: "
- "%s err: %s" % (cmd, node, out, err))
class PodScalabilityBaseClass(CnsBaseClass):
diff --git a/tests/functional/common/gluster_block/test_restart_gluster_block.py b/tests/functional/common/gluster_block/test_restart_gluster_block.py
index c46460a0..aa2b1e62 100644
--- a/tests/functional/common/gluster_block/test_restart_gluster_block.py
+++ b/tests/functional/common/gluster_block/test_restart_gluster_block.py
@@ -1,4 +1,4 @@
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (
heketi_blockvolume_create,
heketi_blockvolume_delete)
@@ -9,7 +9,7 @@ from cnslibs.common.openshift_ops import (
wait_for_resource_absence)
-class TestRestartGlusterBlockPod(HeketiClientSetupBaseClass):
+class TestRestartGlusterBlockPod(HeketiBaseClass):
def test_restart_gluster_block_provisioner_pod(self):
# CNS-542 - Restart gluster-block provisioner pod
diff --git a/tests/functional/common/heketi/heketi_tests/test_disabling_device.py b/tests/functional/common/heketi/heketi_tests/test_disabling_device.py
index 41cd560c..43d222a2 100644
--- a/tests/functional/common/heketi/heketi_tests/test_disabling_device.py
+++ b/tests/functional/common/heketi/heketi_tests/test_disabling_device.py
@@ -8,7 +8,7 @@ from cnslibs.common import openshift_ops
from cnslibs.common import podcmd
-class TestDisableHeketiDevice(heketi_libs.HeketiClientSetupBaseClass):
+class TestDisableHeketiDevice(heketi_libs.HeketiBaseClass):
@podcmd.GlustoPod()
def test_create_volumes_enabling_and_disabling_heketi_devices(self):
"""Test case CNS-763"""
diff --git a/tests/functional/common/heketi/heketi_tests/test_heketi_create_volume.py b/tests/functional/common/heketi/heketi_tests/test_heketi_create_volume.py
index fcc00535..681c1258 100644
--- a/tests/functional/common/heketi/heketi_tests/test_heketi_create_volume.py
+++ b/tests/functional/common/heketi/heketi_tests/test_heketi_create_volume.py
@@ -5,7 +5,7 @@ from glusto.core import Glusto as g
from glustolibs.gluster.volume_ops import get_volume_list, get_volume_info
import six
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (heketi_volume_create,
heketi_volume_list,
heketi_volume_info,
@@ -20,7 +20,7 @@ from cnslibs.common.openshift_ops import get_ocp_gluster_pod_names
from cnslibs.common import podcmd
-class TestHeketiVolume(HeketiClientSetupBaseClass):
+class TestHeketiVolume(HeketiBaseClass):
"""
Class to test heketi volume create
"""
diff --git a/tests/functional/common/heketi/heketi_tests/test_heketi_enable_device.py b/tests/functional/common/heketi/heketi_tests/test_heketi_enable_device.py
index b5a8ef32..17ba6eb5 100644
--- a/tests/functional/common/heketi/heketi_tests/test_heketi_enable_device.py
+++ b/tests/functional/common/heketi/heketi_tests/test_heketi_enable_device.py
@@ -1,7 +1,7 @@
"""Test cases to enable device in heketi."""
import json
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (heketi_node_enable,
heketi_node_info,
heketi_node_disable,
@@ -13,7 +13,7 @@ from cnslibs.common.heketi_ops import (heketi_node_enable,
from glusto.core import Glusto as g
-class TestHeketiDeviceEnable(HeketiClientSetupBaseClass):
+class TestHeketiDeviceEnable(HeketiBaseClass):
"""Test device enable functionality from heketi-cli."""
def enable_node(self, node_id):
diff --git a/tests/functional/common/heketi/heketi_tests/test_node_enable_disable.py b/tests/functional/common/heketi/heketi_tests/test_node_enable_disable.py
index bce565c4..9fac9e01 100644
--- a/tests/functional/common/heketi/heketi_tests/test_node_enable_disable.py
+++ b/tests/functional/common/heketi/heketi_tests/test_node_enable_disable.py
@@ -1,7 +1,7 @@
"""Test cases to disable and enable node in heketi."""
import json
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (heketi_node_enable,
heketi_node_info,
heketi_node_disable,
@@ -10,7 +10,7 @@ from cnslibs.common.heketi_ops import (heketi_node_enable,
from glusto.core import Glusto as g
-class TestHeketiNodeState(HeketiClientSetupBaseClass):
+class TestHeketiNodeState(HeketiBaseClass):
"""Test node enable and disable functionality."""
def enable_node(self, node_id):
diff --git a/tests/functional/common/heketi/heketi_tests/test_node_info.py b/tests/functional/common/heketi/heketi_tests/test_node_info.py
index 26ac56f7..016b3ec4 100644
--- a/tests/functional/common/heketi/heketi_tests/test_node_info.py
+++ b/tests/functional/common/heketi/heketi_tests/test_node_info.py
@@ -2,12 +2,12 @@ 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.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common import heketi_ops, podcmd
from cnslibs.common.openshift_ops import get_ocp_gluster_pod_names
-class TestHeketiVolume(HeketiClientSetupBaseClass):
+class TestHeketiVolume(HeketiBaseClass):
"""
Class to test heketi volume create
"""
diff --git a/tests/functional/common/heketi/test_block_volumes_heketi.py b/tests/functional/common/heketi/test_block_volumes_heketi.py
index 4e405312..22dcf18d 100644
--- a/tests/functional/common/heketi/test_block_volumes_heketi.py
+++ b/tests/functional/common/heketi/test_block_volumes_heketi.py
@@ -5,10 +5,10 @@ from cnslibs.common.heketi_ops import (heketi_blockvolume_create,
heketi_volume_create,
heketi_volume_delete
)
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
-class TestBlockVolumeOps(HeketiClientSetupBaseClass):
+class TestBlockVolumeOps(HeketiBaseClass):
"""
Class to test heketi block volume deletion with and without block
volumes existing, heketi block volume list, heketi block volume info
diff --git a/tests/functional/common/heketi/test_check_entries.py b/tests/functional/common/heketi/test_check_entries.py
index be7add9e..92e682d9 100644
--- a/tests/functional/common/heketi/test_check_entries.py
+++ b/tests/functional/common/heketi/test_check_entries.py
@@ -1,12 +1,12 @@
from glusto.core import Glusto as g
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (heketi_volume_create,
heketi_volume_delete)
from cnslibs.common.openshift_ops import get_ocp_gluster_pod_names
-class TestHeketiVolume(HeketiClientSetupBaseClass):
+class TestHeketiVolume(HeketiBaseClass):
"""Check volume bricks presence in fstab files on Gluster PODs."""
def _find_bricks_in_fstab_files(self, brick_paths, present):
diff --git a/tests/functional/common/heketi/test_create_distributed_replica_heketi_volume.py b/tests/functional/common/heketi/test_create_distributed_replica_heketi_volume.py
index cbee7550..3dd4230b 100644
--- a/tests/functional/common/heketi/test_create_distributed_replica_heketi_volume.py
+++ b/tests/functional/common/heketi/test_create_distributed_replica_heketi_volume.py
@@ -4,7 +4,7 @@ import math
from glusto.core import Glusto as g
from glustolibs.gluster.volume_ops import get_volume_list, get_volume_info
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (heketi_node_list,
heketi_node_enable,
heketi_node_disable,
@@ -18,7 +18,7 @@ from cnslibs.common.openshift_ops import get_ocp_gluster_pod_names
from cnslibs.common import podcmd
-class TestHeketiVolume(HeketiClientSetupBaseClass):
+class TestHeketiVolume(HeketiBaseClass):
def setUp(self):
super(TestHeketiVolume, self).setUp()
diff --git a/tests/functional/common/heketi/test_device_info.py b/tests/functional/common/heketi/test_device_info.py
index 2086245d..b24390ad 100644
--- a/tests/functional/common/heketi/test_device_info.py
+++ b/tests/functional/common/heketi/test_device_info.py
@@ -2,7 +2,7 @@ from cnslibs.common import heketi_libs
from cnslibs.common import heketi_ops
-class TestHeketiDeviceInfo(heketi_libs.HeketiClientSetupBaseClass):
+class TestHeketiDeviceInfo(heketi_libs.HeketiBaseClass):
def test_heketi_devices_info_verification(self):
"""Test case CNS-765"""
diff --git a/tests/functional/common/heketi/test_heketi_metrics.py b/tests/functional/common/heketi/test_heketi_metrics.py
index cf7e2d40..a888b82b 100644
--- a/tests/functional/common/heketi/test_heketi_metrics.py
+++ b/tests/functional/common/heketi/test_heketi_metrics.py
@@ -1,4 +1,4 @@
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (
get_heketi_metrics,
heketi_cluster_info,
@@ -15,7 +15,7 @@ from cnslibs.common.openshift_ops import (
)
-class TestHeketiMetrics(HeketiClientSetupBaseClass):
+class TestHeketiMetrics(HeketiBaseClass):
def verify_heketi_metrics_with_topology_info(self):
topology = heketi_topology_info(
diff --git a/tests/functional/common/heketi/test_heketi_volume_operations.py b/tests/functional/common/heketi/test_heketi_volume_operations.py
index 69d4e056..b0deb31e 100644
--- a/tests/functional/common/heketi/test_heketi_volume_operations.py
+++ b/tests/functional/common/heketi/test_heketi_volume_operations.py
@@ -1,9 +1,7 @@
from unittest import skip
from glusto.core import Glusto as g
-from cnslibs.common.heketi_ops import (heketi_create_topology,
- heketi_topology_load,
- heketi_volume_delete,
+from cnslibs.common.heketi_ops import (heketi_volume_delete,
heketi_volume_create,
heketi_volume_expand,
heketi_volume_info,
@@ -15,11 +13,11 @@ from cnslibs.common.heketi_ops import (heketi_create_topology,
heketi_device_delete,
heketi_node_info,
heketi_node_list)
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
-from cnslibs.common.exceptions import ExecutionError, ConfigError
+from cnslibs.common.heketi_libs import HeketiBaseClass
+from cnslibs.common.exceptions import ExecutionError
-class TestHeketiVolumeOperations(HeketiClientSetupBaseClass):
+class TestHeketiVolumeOperations(HeketiBaseClass):
"""
Class to test heketi volume operations - create, expand
"""
@@ -27,20 +25,6 @@ class TestHeketiVolumeOperations(HeketiClientSetupBaseClass):
@classmethod
def setUpClass(cls):
super(TestHeketiVolumeOperations, cls).setUpClass()
-
- if cls.deployment_type == "crs_heketi_outside_openshift":
- ret = heketi_create_topology(cls.heketi_client_node,
- cls.topology_info)
- if not ret:
- raise ConfigError("Failed to create heketi topology file on %s"
- % cls.heketi_client_node)
-
- ret = heketi_topology_load(cls.heketi_client_node,
- cls.heketi_server_url)
- if not ret:
- raise ConfigError("Failed to load heketi topology on %s"
- % cls.heketi_client_node)
-
cls.volume_id = None
def volume_cleanup(self, volume_id):
diff --git a/tests/functional/common/heketi/test_volume_creation.py b/tests/functional/common/heketi/test_volume_creation.py
index 55699136..b3db8446 100644
--- a/tests/functional/common/heketi/test_volume_creation.py
+++ b/tests/functional/common/heketi/test_volume_creation.py
@@ -8,7 +8,7 @@ from cnslibs.common import openshift_ops
from cnslibs.common import podcmd
-class TestVolumeCreationTestCases(heketi_libs.HeketiClientSetupBaseClass):
+class TestVolumeCreationTestCases(heketi_libs.HeketiBaseClass):
"""
Class for volume creation related test cases
"""
diff --git a/tests/functional/common/heketi/test_volume_deletion.py b/tests/functional/common/heketi/test_volume_deletion.py
index 8b0adf98..b1be795b 100644
--- a/tests/functional/common/heketi/test_volume_deletion.py
+++ b/tests/functional/common/heketi/test_volume_deletion.py
@@ -1,11 +1,11 @@
from __future__ import division
from cnslibs.common.exceptions import ExecutionError
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common import heketi_ops
-class TestVolumeDeleteTestCases(HeketiClientSetupBaseClass):
+class TestVolumeDeleteTestCases(HeketiBaseClass):
"""
Class for volume deletion related test cases
diff --git a/tests/functional/common/heketi/test_volume_expansion_and_devices.py b/tests/functional/common/heketi/test_volume_expansion_and_devices.py
index 17ed5d9d..8e8dea9a 100644
--- a/tests/functional/common/heketi/test_volume_expansion_and_devices.py
+++ b/tests/functional/common/heketi/test_volume_expansion_and_devices.py
@@ -7,12 +7,12 @@ from glusto.core import Glusto as g
from glustolibs.gluster import volume_ops, rebalance_ops
from cnslibs.common.exceptions import ExecutionError
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.openshift_ops import get_ocp_gluster_pod_names
from cnslibs.common import heketi_ops, podcmd
-class TestVolumeExpansionAndDevicesTestCases(HeketiClientSetupBaseClass):
+class TestVolumeExpansionAndDevicesTestCases(HeketiBaseClass):
"""
Class for volume expansion and devices addition related test cases
"""
diff --git a/tests/functional/common/heketi/test_volume_multi_req.py b/tests/functional/common/heketi/test_volume_multi_req.py
index 244131e9..5b72cc91 100644
--- a/tests/functional/common/heketi/test_volume_multi_req.py
+++ b/tests/functional/common/heketi/test_volume_multi_req.py
@@ -11,7 +11,7 @@ import yaml
from glusto.core import Glusto as g
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (
heketi_volume_list)
from cnslibs.common.naming import (
@@ -192,7 +192,7 @@ def _heketi_name_id_map(vols):
@ddt.ddt
-class TestVolumeMultiReq(HeketiClientSetupBaseClass):
+class TestVolumeMultiReq(HeketiBaseClass):
def setUp(self):
super(TestVolumeMultiReq, self).setUp()
self.volcount = self._count_vols()
diff --git a/tests/functional/common/test_heketi_restart.py b/tests/functional/common/test_heketi_restart.py
index 2d7da8c3..6fd0e10f 100644
--- a/tests/functional/common/test_heketi_restart.py
+++ b/tests/functional/common/test_heketi_restart.py
@@ -1,6 +1,6 @@
from jsondiff import diff
-from cnslibs.common.heketi_libs import HeketiClientSetupBaseClass
+from cnslibs.common.heketi_libs import HeketiBaseClass
from cnslibs.common.heketi_ops import (
hello_heketi,
heketi_volume_create,
@@ -12,7 +12,7 @@ from cnslibs.common.openshift_ops import (
wait_for_resource_absence)
-class TestRestartHeketi(HeketiClientSetupBaseClass):
+class TestRestartHeketi(HeketiBaseClass):
def test_restart_heketi_pod(self):
""" CNS-450 Restarting heketi pod """