From 9da4b8f3365e6c4c33f5c09f11089ba24b85798a Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 30 Jun 2014 16:01:52 -0500 Subject: [PATCH] Add unreachable counts to job tasks endpoint --- awx/api/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/api/views.py b/awx/api/views.py index a8e502d6b7..586796be0d 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -1635,6 +1635,7 @@ class JobJobTasksList(BaseJobEventsList): task_start_event.task, 'reported_hosts': 0, 'skipped_count': 0, + 'unreachable_count': 0, 'successful_count': 0, } @@ -1654,6 +1655,9 @@ class JobJobTasksList(BaseJobEventsList): task_data['changed'] = True else: task_data['successful_count'] += child_data['num'] + elif child_data['event'] == 'runner_on_unreachable': + task_data['host_count'] += child_data['num'] + task_data['unreachable_count'] += child_data['num'] elif child_data['event'] == 'runner_on_skipped': task_data['host_count'] += child_data['num'] task_data['reported_hosts'] += child_data['num']