summaryrefslogtreecommitdiffstats
path: root/tests/functional/common/heketi/heketi_tests/test_node_info.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2018-12-20 23:04:22 +0530
committerValerii Ponomarov <vponomar@redhat.com>2018-12-25 20:54:32 +0530
commit8b6107b62dacf5edc264f4f0206771d8fa07f7bf (patch)
tree775a3755324ea3a272a65ba9eddf100a605208d1 /tests/functional/common/heketi/heketi_tests/test_node_info.py
parent418b6a6dd31e70888cfcc343922d43e4646f7184 (diff)
Add abstraction between deployment types and gluster commands
Now, it is possible to run glustolibs commands on both deployment types: containerized and standalone. It is possible using 'auto_get_gluster_endpoint' as target for lib function in addition to the '@podcmd.GlustoPod()' decorator. Example: """ from glustolibs.gluster.volume_ops import get_volume_list from cnslibs.common import heketi_libs from cnslibs.common import podcmd class TestExample(heketi_libs.HeketiBaseClass): @podcmd.GlustoPod() def test_get_vol_list_either_on_node_or_on_pod(self): volumes = get_volume_list('auto_get_gluster_endpoint') """ Also, delete all the current usages of 'deployment_type' config option, and delete the option as unneeded anymore. Change-Id: I281f287c432a5a9efefda588be436ee285188697
Diffstat (limited to 'tests/functional/common/heketi/heketi_tests/test_node_info.py')
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_node_info.py9
1 files changed, 1 insertions, 8 deletions
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 016b3ec4..3f956d62 100644
--- a/tests/functional/common/heketi/heketi_tests/test_node_info.py
+++ b/tests/functional/common/heketi/heketi_tests/test_node_info.py
@@ -4,7 +4,6 @@ from glustolibs.gluster.peer_ops import get_pool_list
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(HeketiBaseClass):
@@ -44,13 +43,7 @@ class TestHeketiVolume(HeketiBaseClass):
hostname = []
g.log.info("Get the pool list")
- if self.deployment_type == "cns":
- gluster_pod = get_ocp_gluster_pod_names(
- self.heketi_client_node)[1]
- p = podcmd.Pod(self.heketi_client_node, gluster_pod)
- list_of_pools = get_pool_list(p)
- else:
- list_of_pools = get_pool_list(self.heketi_client_node)
+ list_of_pools = get_pool_list('auto_get_gluster_endpoint')
self.assertTrue(list_of_pools, ("Failed to get the "
"pool list from gluster pods/nodes"))
g.log.info("Successfully got the pool list from gluster pods/nodes")