Fix issue with 404 logs on wait for delete.
In some cases the wait on volume deletes will receive a 404
error which results in a log output. However for these tests
this is the expected behavior so the log output isn't needed.
This adds a flag to suppress log output on 404 errors, which
is then used on all wait functions.
Fixes: bug 1084283
Change-Id: Id455a22317ecbdf318e9ad2ea0a76ad9f08ca899
diff --git a/tempest/services/volume/xml/volumes_client.py b/tempest/services/volume/xml/volumes_client.py
index ef5f3e9..9d2f159 100644
--- a/tempest/services/volume/xml/volumes_client.py
+++ b/tempest/services/volume/xml/volumes_client.py
@@ -82,10 +82,10 @@
volumes += [self._parse_volume(vol) for vol in list(body)]
return resp, volumes
- def get_volume(self, volume_id):
+ def get_volume(self, volume_id, wait=None):
"""Returns the details of a single volume"""
url = "volumes/%s" % str(volume_id)
- resp, body = self.get(url, self.headers)
+ resp, body = self.get(url, self.headers, wait=wait)
body = etree.fromstring(body)
return resp, self._parse_volume(body)
@@ -140,7 +140,7 @@
def is_resource_deleted(self, id):
try:
- self.get_volume(id)
+ self.get_volume(id, wait=True)
except exceptions.NotFound:
return True
return False