File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 88from ocp_resources .persistent_volume_claim import PersistentVolumeClaim
99from ocp_resources .resource import NamespacedResource , Resource
1010from timeout_sampler import TimeoutExpiredError , TimeoutSampler
11+ from warnings import warn
1112
1213
1314class DataVolume (NamespacedResource ):
@@ -281,7 +282,7 @@ def wait_for_dv_success(
281282 Args:
282283 timeout (int): Time to wait for the DataVolume to succeed.
283284 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
285286 stop_status_func (function): function that is called inside the TimeoutSampler
286287 if it returns True - stop the Sampler and raise TimeoutExpiredError
287288 Example:
@@ -307,6 +308,8 @@ def test_dv():
307308 wait_timeout = timeout ,
308309 func = lambda : self .exists ,
309310 ):
311+ if dv_garbage_collection_enabled is not None :
312+ warn ("garbage collector is deprecated and removed in version v4.19" , DeprecationWarning )
310313 # DV reach success if the status is Succeeded, or if DV garbage collection enabled and the DV does not exist
311314 if sample and sample .get ("status" , {}).get ("phase" ) == self .Status .SUCCEEDED :
312315 break
You can’t perform that action at this time.
0 commit comments