summaryrefslogtreecommitdiffstats
path: root/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py
diff options
context:
space:
mode:
authorM S Vishwanath Bhat <msvbhat@gmail.com>2016-05-19 18:53:35 +0530
committerM S Vishwanath Bhat <vbhat@redhat.com>2016-05-20 04:31:00 -0700
commit6837b2793bc3d2cc488aa49491f3f5ff09e925b7 (patch)
tree7c11fc698fbf668a9f3c635a4927b281929ef132 /tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py
parentdeaf8439fc42435988aae6a7b9ab681cc0d36b09 (diff)
distaf: Adding GlusterBaseClass to distaflibs-gluster
GlusterBaseClass is the base class for gluster related test cases. This has setup() method which takes care of creating volumes with correct volume type after checking global_mode flags etc. So all tests are recommended to use this base class. The teardown() method is to teardown the setup that test has created. Each test case should teardown, any setup it does apart from what is done in setup(). The cleanup() method is used internally for cleaning up the volumes when there is a change of volume type between the tests. This patch also makes relevant import path changes. The changes from tc.nodes[] to tc.servers[] in distaf-core broke few tests. This patch fixes them. Change-Id: I1a8ae20ca7cac13b7d25c587f98c23b430054a57 BUG: 1333738 Signed-off-by: M S Vishwanath Bhat <msvbhat@gmail.com> Reviewed-on: http://review.gluster.org/14239 Tested-by: M S Vishwanath Bhat <vbhat@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Apeksha D khakharia <akhakhar@redhat.com> Reviewed-by: Arthy Loganathan <aloganat@redhat.com> Reviewed-by: ShwethaHPanduranga
Diffstat (limited to 'tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py')
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py
index e36b7ee9855..721e1a907dc 100644
--- a/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py
@@ -59,7 +59,7 @@ def get_rebal_status(volname, server=''):
if the server pararmeter is empty it takes node info from config file
'''
if server == "":
- server = tc.nodes[0]
+ server = tc.servers[0]
status = tc.run(server, "gluster v rebalance %s status" %volname)
if status[0] != 0:
if "not started" in status[2]:
@@ -105,13 +105,13 @@ def rebal_start(volname, server=''):
Simple interface to start the gluster rebalance
@ pararmeter:
* volname
- * server - defaults to tc.nodes[0]
+ * server - defaults to tc.servers[0]
@ returns:
True on success
False otherwise
"""
if server == '':
- server = tc.nodes[0]
+ server = tc.servers[0]
ret = tc.run(server, "gluster volume rebalance %s start" % volname)
if ret[0] != 0:
tc.logger.error("rebalance start %s failed" % volname)