Handle unreachable case in the log statistics
The unreachable status is a fail state that should be treat. Change-Id: Ia610448421196572909567deb144d9a490be27a0
This commit is contained in:
@@ -190,6 +190,8 @@ class ValidationLog(object):
|
||||
for h in self.content['stats'].keys():
|
||||
if self.content['stats'][h].get('failures'):
|
||||
failed += 1
|
||||
if self.content['stats'][h].get('unreachable'):
|
||||
failed += 1
|
||||
return ('FAILED' if failed else 'PASSED')
|
||||
|
||||
@property
|
||||
@@ -220,6 +222,8 @@ class ValidationLog(object):
|
||||
for h in self.content['stats'].keys():
|
||||
if self.content['stats'][h].get('failures'):
|
||||
hosts.append('{},{}'.format(h, 'FAILED'))
|
||||
elif self.content['stats'][h].get('unreachable'):
|
||||
hosts.append('{},{}'.format(h, 'UNREACHABLE'))
|
||||
else:
|
||||
hosts.append('{},{}'.format(h, 'PASSED'))
|
||||
return ', '.join(hosts)
|
||||
|
||||
Reference in New Issue
Block a user