Handle failed resources in heat-deploy-times.py

Currently it ignores failure events and reports those resources as
still in progress.  That's not really true, so let's report how long
it took for the resource to fail.  In some cases that may be useful
information too.

Change-Id: I3eeb6a6a589574cbd556e4ce712e2454c3aec3c9
This commit is contained in:
Ben Nemec 2017-06-29 15:03:00 +00:00
parent ce74b90174
commit 44510841d7
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ def process_events(all_events, events):
if name in events:
if status == 'CREATE_IN_PROGRESS':
times[name] = {'start': etime, 'elapsed': None}
elif status == 'CREATE_COMPLETE':
elif status == 'CREATE_COMPLETE' or status == 'CREATE_FAILED':
times[name]['elapsed'] = etime - times[name]['start']
for name, data in sorted(times.items(),
key = lambda x: x[1]['elapsed'],