summaryrefslogtreecommitdiffstats
path: root/openshift-storage-libs/openshiftstoragelibs/baseclass.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-08-17 03:17:38 +0530
committerValerii Ponomarov <vponomar@redhat.com>2019-09-13 18:54:38 +0530
commit93502c9b6d3a072d1cbfac01ddef94fac43da914 (patch)
treeb425867e8d22d72e8ff3c6bd61e4aa4e87eddca3 /openshift-storage-libs/openshiftstoragelibs/baseclass.py
parentc5c02f6402ebe010e8db71eda738857d73f7e83d (diff)
Add test cases for the heketi zones feature
Add 10 test cases for testing Heketi zones feature. To make all the Heketi zones test cases run in the single suite using the same cluster set 'common.allow_heketi_zones_update' config option to "True" value. By default it is set to "False" and only small set of test cases can run having such value. Change-Id: I69a1f7c96c9f52a06134e715e113ccd9b06764e6
Diffstat (limited to 'openshift-storage-libs/openshiftstoragelibs/baseclass.py')
-rw-r--r--openshift-storage-libs/openshiftstoragelibs/baseclass.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/openshift-storage-libs/openshiftstoragelibs/baseclass.py b/openshift-storage-libs/openshiftstoragelibs/baseclass.py
index ae43387..3bd0f29 100644
--- a/openshift-storage-libs/openshiftstoragelibs/baseclass.py
+++ b/openshift-storage-libs/openshiftstoragelibs/baseclass.py
@@ -166,7 +166,8 @@ class BaseClass(unittest.TestCase):
allow_volume_expansion=False,
reclaim_policy="Delete",
set_hacount=None,
- is_arbiter_vol=False, arbiter_avg_file_size=None):
+ is_arbiter_vol=False, arbiter_avg_file_size=None,
+ heketi_zone_checking=None):
# Create secret if one is not specified
if not secret_name:
@@ -194,6 +195,13 @@ class BaseClass(unittest.TestCase):
parameters["volumeoptions"] += (
",user.heketi.average-file-size %s" % (
arbiter_avg_file_size))
+ if heketi_zone_checking:
+ if parameters.get("volumeoptions"):
+ parameters["volumeoptions"] += (
+ ",user.heketi.zone-checking %s" % heketi_zone_checking)
+ else:
+ parameters["volumeoptions"] = (
+ "user.heketi.zone-checking %s" % heketi_zone_checking)
if vol_name_prefix:
parameters["volumenameprefix"] = vol_name_prefix
elif create_vol_name_prefix: