From 764d7bd68ec0b4ea9229c381b3b4195367b44b83 Mon Sep 17 00:00:00 2001 From: Ashmitha Date: Thu, 12 Sep 2019 11:36:56 +0530 Subject: Add testcase for passing clusterid when creating storage class Change-Id: I4a6fd02f5713b4e86a9d70cdaffd3ca9369932f4 --- openshift-storage-libs/openshiftstoragelibs/baseclass.py | 4 +++- openshift-storage-libs/openshiftstoragelibs/openshift_ops.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'openshift-storage-libs/openshiftstoragelibs') diff --git a/openshift-storage-libs/openshiftstoragelibs/baseclass.py b/openshift-storage-libs/openshiftstoragelibs/baseclass.py index 14fa09dc..c8cb1d37 100644 --- a/openshift-storage-libs/openshiftstoragelibs/baseclass.py +++ b/openshift-storage-libs/openshiftstoragelibs/baseclass.py @@ -166,6 +166,7 @@ class BaseClass(unittest.TestCase): allow_volume_expansion=False, reclaim_policy="Delete", set_hacount=None, + clusterid=None, hacount=None, is_arbiter_vol=False, arbiter_avg_file_size=None, heketi_zone_checking=None): @@ -188,7 +189,8 @@ class BaseClass(unittest.TestCase): secret_namespace_option: self.sc.get( "secretnamespace", self.sc.get("restsecretnamespace")), } - + if clusterid: + parameters["clusterid"] = clusterid if hacount: parameters["hacount"] = six.text_type(hacount) elif set_hacount: diff --git a/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py b/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py index 9b81cdf4..8aaa1418 100644 --- a/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py +++ b/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py @@ -289,8 +289,8 @@ def oc_create_sc(hostname, sc_name_prefix="autotests-sc", allowed_parameters = ( 'resturl', 'secretnamespace', 'restuser', 'secretname', 'restauthenabled', 'restsecretnamespace', 'restsecretname', - 'hacount', 'clusterids', 'chapauthenabled', 'volumenameprefix', - 'volumeoptions', 'volumetype' + 'hacount', 'clusterids', 'clusterid', 'chapauthenabled', + 'volumenameprefix', 'volumeoptions', 'volumetype' ) for parameter in parameters.keys(): if parameter.lower() not in allowed_parameters: -- cgit