summaryrefslogtreecommitdiffstats
path: root/openshift-storage-libs/openshiftstoragelibs/baseclass.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-04-02 22:35:45 +0530
committervponomar <vponomar@redhat.com>2019-04-11 11:56:38 +0000
commit0b2c88ee59b52312c86bcceea1645a57671894af (patch)
tree4379ea502d11cea577ec4c3de9c606b9bfc231a4 /openshift-storage-libs/openshiftstoragelibs/baseclass.py
parent5fe05c3d09126453423a3d2ee97a4586ec6592c1 (diff)
Fix support of OCP3.6 and 3.7
Project has lots of inconsistencies with OCP3.6 and 3.7 So, fix it. Change-Id: I8d38773637b779e1c2e1631568f100c1ab1fdd50
Diffstat (limited to 'openshift-storage-libs/openshiftstoragelibs/baseclass.py')
-rw-r--r--openshift-storage-libs/openshiftstoragelibs/baseclass.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/openshift-storage-libs/openshiftstoragelibs/baseclass.py b/openshift-storage-libs/openshiftstoragelibs/baseclass.py
index 375ab7c..9b6976f 100644
--- a/openshift-storage-libs/openshiftstoragelibs/baseclass.py
+++ b/openshift-storage-libs/openshiftstoragelibs/baseclass.py
@@ -28,6 +28,7 @@ from openshiftstoragelibs.openshift_ops import (
wait_for_pod_be_ready,
wait_for_resource_absence,
)
+from openshiftstoragelibs.openshift_version import get_openshift_version
class BaseClass(unittest.TestCase):
@@ -214,8 +215,11 @@ class BaseClass(unittest.TestCase):
for pvc_name in pvc_names:
verify_pvc_status_is_bound(node, pvc_name, timeout, wait_step)
finally:
- reclaim_policy = oc_get_custom_resource(
- node, 'sc', ':.reclaimPolicy', sc_name)[0]
+ if get_openshift_version() < "3.9":
+ reclaim_policy = "Delete"
+ else:
+ reclaim_policy = oc_get_custom_resource(
+ node, 'sc', ':.reclaimPolicy', sc_name)[0]
for pvc_name in pvc_names:
if reclaim_policy == 'Retain':