diff options
author | Arun Kumar <arukumar@redhat.com> | 2019-11-15 14:23:35 +0530 |
---|---|---|
committer | Arun Kumar <arukumar@redhat.com> | 2020-02-20 11:47:40 +0530 |
commit | 6de6312070b5705fac73f5e834c158f62a51dcd3 (patch) | |
tree | 200cd7e27953eef7b69710c2670f1107f070b211 /openshift-storage-libs/openshiftstoragelibs/baseclass.py | |
parent | 818f744afe9c8fe0347d57ea689320c400cf4922 (diff) |
[Test] Add tc to validate cassandra pod when BHV brick process is down
Change-Id: If0024c4b99eee0d0971077556b033ace5104c982
Diffstat (limited to 'openshift-storage-libs/openshiftstoragelibs/baseclass.py')
-rw-r--r-- | openshift-storage-libs/openshiftstoragelibs/baseclass.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/openshift-storage-libs/openshiftstoragelibs/baseclass.py b/openshift-storage-libs/openshiftstoragelibs/baseclass.py index b8080d23..f30c2bad 100644 --- a/openshift-storage-libs/openshiftstoragelibs/baseclass.py +++ b/openshift-storage-libs/openshiftstoragelibs/baseclass.py @@ -738,13 +738,21 @@ class GlusterBlockBaseClass(BaseClass): msg = "All paths are not up in mpath %s on Node %s" % (out, node) self.assertNotIn(state, out, msg) - def get_block_hosting_volume_by_pvc_name(self, pvc_name): + def get_block_hosting_volume_by_pvc_name( + self, pvc_name, heketi_server_url=None, gluster_node=None, + ocp_client_node=None): """Get block hosting volume of pvc name given Args: pvc_name (str): pvc name for which the BHV name needs to be returned + Kwargs: + heketi_server_url (str): heketi server url to run heketi commands + gluster_node (str): gluster node where to run gluster commands + ocp_client_node (str): ocp cleint node where to run oc commands """ + if not heketi_server_url: + heketi_server_url = self.heketi_server_url pv_name = get_pv_name_from_pvc(self.ocp_client[0], pvc_name) block_volume = oc_get_custom_resource( self.ocp_client[0], 'pv', @@ -754,6 +762,7 @@ class GlusterBlockBaseClass(BaseClass): # get block hosting volume from block volume block_hosting_vol = get_block_hosting_volume_name( - self.heketi_client_node, self.heketi_server_url, block_volume) + self.heketi_client_node, heketi_server_url, block_volume, + gluster_node=gluster_node, ocp_client_node=ocp_client_node) return block_hosting_vol |