From f8b96b793f087bbbcde8a875ad52fe401a76c84a Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Fri, 20 Sep 2019 20:22:29 +0530 Subject: Add multiple PVCs states waiter Add new function called 'wait_for_pvcs_be_bound', which allows us to wait for 'Bound' state of multiple PVCs using single timeout. Also, reuse this new function in the baseclass.py Change-Id: Ia3809d322925b90fdef984db59b3e9e83a82abc7 --- openshift-storage-libs/openshiftstoragelibs/baseclass.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'openshift-storage-libs/openshiftstoragelibs/baseclass.py') diff --git a/openshift-storage-libs/openshiftstoragelibs/baseclass.py b/openshift-storage-libs/openshiftstoragelibs/baseclass.py index 156aee86..69985f6b 100644 --- a/openshift-storage-libs/openshiftstoragelibs/baseclass.py +++ b/openshift-storage-libs/openshiftstoragelibs/baseclass.py @@ -34,7 +34,7 @@ from openshiftstoragelibs.openshift_ops import ( oc_get_pods, scale_dcs_pod_amount_and_wait, switch_oc_project, - verify_pvc_status_is_bound, + wait_for_pvcs_be_bound, wait_for_resources_absence, ) from openshiftstoragelibs.openshift_storage_libs import ( @@ -250,8 +250,7 @@ class BaseClass(unittest.TestCase): # Wait for PVCs to be in bound state try: - for pvc_name in pvc_names: - verify_pvc_status_is_bound(node, pvc_name, timeout, wait_step) + wait_for_pvcs_be_bound(node, pvc_names, timeout, wait_step) finally: if get_openshift_version() < "3.9": reclaim_policy = "Delete" -- cgit