File tree 1 file changed +4
-1
lines changed 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 8
8
from ocp_resources .persistent_volume_claim import PersistentVolumeClaim
9
9
from ocp_resources .resource import NamespacedResource , Resource
10
10
from timeout_sampler import TimeoutExpiredError , TimeoutSampler
11
+ from warnings import warn
11
12
12
13
13
14
class DataVolume (NamespacedResource ):
@@ -281,7 +282,7 @@ def wait_for_dv_success(
281
282
Args:
282
283
timeout (int): Time to wait for the DataVolume to succeed.
283
284
failure_timeout (int): Time to wait for the DataVolume to have not Pending/None status
284
- dv_garbage_collection_enabled (bool, default: False): if True, expect that DV will disappear after success
285
+ dv_garbage_collection_enabled (bool, default: False): DV garbage collection is deprecated and removed in v4.19
285
286
stop_status_func (function): function that is called inside the TimeoutSampler
286
287
if it returns True - stop the Sampler and raise TimeoutExpiredError
287
288
Example:
@@ -307,6 +308,8 @@ def test_dv():
307
308
wait_timeout = timeout ,
308
309
func = lambda : self .exists ,
309
310
):
311
+ if dv_garbage_collection_enabled is not None :
312
+ warn ("garbage collector is deprecated and removed in version v4.19" , DeprecationWarning )
310
313
# DV reach success if the status is Succeeded, or if DV garbage collection enabled and the DV does not exist
311
314
if sample and sample .get ("status" , {}).get ("phase" ) == self .Status .SUCCEEDED :
312
315
break
You can’t perform that action at this time.
0 commit comments