Add cost time printing in wait_for_volume_resource_status

This is to add printing of cost time for a volume resource
to reach the specified statuses.

Change-Id: I8cf5de6a8c386a7175a4d65b729e41b05c01406d
This commit is contained in:
zhufl 2017-08-28 13:51:22 +08:00
parent c961a656cc
commit 019ad73541
1 changed files with 2 additions and 0 deletions

View File

@ -211,6 +211,8 @@ def wait_for_volume_resource_status(client, resource_id, statuses):
(resource_name, resource_id, statuses, resource_status,
client.build_timeout))
raise lib_exc.TimeoutException(message)
LOG.info('%s %s reached %s after waiting for %f seconds',
resource_name, resource_id, statuses, time.time() - start)
def wait_for_volume_retype(client, volume_id, new_volume_type):