diff options
author | Ashmitha <asambast@redhat.com> | 2019-09-12 11:36:56 +0530 |
---|---|---|
committer | vponomar <vponomar@redhat.com> | 2019-09-18 10:14:50 +0000 |
commit | 764d7bd68ec0b4ea9229c381b3b4195367b44b83 (patch) | |
tree | ebb90ffd2664a1661bb5e384f9133df785af5bdc /openshift-storage-libs | |
parent | aa7321198d3c37271243879cac49a8133e43cabd (diff) |
Add testcase for passing clusterid when creating storage class
Change-Id: I4a6fd02f5713b4e86a9d70cdaffd3ca9369932f4
Diffstat (limited to 'openshift-storage-libs')
-rw-r--r-- | openshift-storage-libs/openshiftstoragelibs/baseclass.py | 4 | ||||
-rw-r--r-- | openshift-storage-libs/openshiftstoragelibs/openshift_ops.py | 4 |
2 files changed, 5 insertions, 3 deletions
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: |