Skip to content

Commit 1543a41

Browse files
authored
feat(storage): add deprecation warning to dv.wait() (#2613)
* Storage: add deprecation warning to dv.wait() * update warning message
1 parent 36a110b commit 1543a41

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ocp_resources/datavolume.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ def wait_deleted(self, timeout=TIMEOUT_4MINUTES):
249249
return self.pvc.wait_deleted(timeout=timeout)
250250

251251
def wait(self, timeout=TIMEOUT_10MINUTES, failure_timeout=TIMEOUT_2MINUTES, wait_for_exists_only=False, sleep=1):
252+
warn(
253+
message="DataVolume.wait() is deprecated and will be removed in "
254+
"the next version. Use wait_for_dv_success() instead.",
255+
category=DeprecationWarning,
256+
stacklevel=2,
257+
)
252258
if wait_for_exists_only:
253259
return super().wait(timeout=timeout, sleep=sleep)
254260
else:

0 commit comments

Comments
 (0)