Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions ocp_resources/datavolume.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,15 @@ def wait_deleted(self, timeout=TIMEOUT_4MINUTES):
super().wait_deleted(timeout=timeout)
return self.pvc.wait_deleted(timeout=timeout)

def wait(self, timeout=TIMEOUT_10MINUTES, failure_timeout=TIMEOUT_2MINUTES):
self._check_none_pending_status(failure_timeout=failure_timeout)
def wait(self, timeout=TIMEOUT_10MINUTES, failure_timeout=TIMEOUT_2MINUTES, wait_for_exists_only=False):
if wait_for_exists_only:
return super().wait(timeout=timeout)
else:
self._check_none_pending_status(failure_timeout=failure_timeout)

# If DV's status is not Pending, continue with the flow
self.wait_for_status(status=self.Status.SUCCEEDED, timeout=timeout)
self.pvc.wait_for_status(status=PersistentVolumeClaim.Status.BOUND, timeout=timeout)
# If DV's status is not Pending, continue with the flow
self.wait_for_status(status=self.Status.SUCCEEDED, timeout=timeout)
self.pvc.wait_for_status(status=PersistentVolumeClaim.Status.BOUND, timeout=timeout)

@property
def pvc(self):
Expand Down