Use common "waiters.wait_for_snapshot_status" function everywhere
In Tempest we have the waiters.wait_for_snapshot_status function that
is already used in some places. So this commit replaces the use of the
wait_for_snapshot_status method defined in the base_snapshots_client.py
file with the use of the waiters.wait_for_snapshot_status function.
Change-Id: Ic017d468cc1478d8207ba482f161ed63c9b168fe
diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py
index 16352c6..e7223c7 100644
--- a/tempest/scenario/test_stamp_pattern.py
+++ b/tempest/scenario/test_stamp_pattern.py
@@ -68,15 +68,15 @@
self.snapshots_client.delete_snapshot(snapshot['id'])
try:
while self.snapshots_client.show_snapshot(
- snapshot['id'])['snapshot']:
+ snapshot['id'])['snapshot']:
time.sleep(1)
except lib_exc.NotFound:
pass
self.addCleanup(cleaner)
waiters.wait_for_volume_status(self.volumes_client,
volume['id'], 'available')
- self.snapshots_client.wait_for_snapshot_status(snapshot['id'],
- 'available')
+ waiters.wait_for_snapshot_status(self.snapshots_client,
+ snapshot['id'], 'available')
self.assertEqual(snapshot_name, snapshot['display_name'])
return snapshot