summaryrefslogtreecommitdiff
path: root/lib/chef/resource_reporter.rb
diff options
context:
space:
mode:
authorKyleen MacGugan <kmacgugan@chef.io>2015-09-24 23:13:42 -0700
committerKyleen MacGugan <kmacgugan@chef.io>2015-10-21 16:29:50 -0700
commit4fe540a7aac53afa61ada419f76432052a3a28ec (patch)
treec86ddd0307fc91077192ad9e918afb6f429ef887 /lib/chef/resource_reporter.rb
parenta6c2c27021f9290c081e61f9af1a2f19e154f90c (diff)
downloadchef-4fe540a7aac53afa61ada419f76432052a3a28ec.tar.gz
Added run list expansion json conversion. Creates a json tree from the run list expansion trace.kyleen/addExpandedRunList
Added event to report expanded run list Updated json conversion to use chef compat json. Remove RunListExpansion from JsonCompat
Diffstat (limited to 'lib/chef/resource_reporter.rb')
-rw-r--r--lib/chef/resource_reporter.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/resource_reporter.rb b/lib/chef/resource_reporter.rb
index 7d13a5a5ce..1175b0afb3 100644
--- a/lib/chef/resource_reporter.rb
+++ b/lib/chef/resource_reporter.rb
@@ -112,6 +112,7 @@ class Chef
@exception = nil
@rest_client = rest_client
@error_descriptions = {}
+ @expanded_run_list = {}
end
def run_started(run_status)
@@ -217,6 +218,10 @@ class Chef
end
end
+ def run_list_expanded(run_list_expansion)
+ @expanded_run_list = run_list_expansion
+ end
+
def post_reporting_data
if reporting_enabled?
run_data = prepare_run_data
@@ -271,6 +276,7 @@ class Chef
run_data["data"] = {}
run_data["start_time"] = start_time.to_s
run_data["end_time"] = end_time.to_s
+ run_data["expanded_run_list"] = Chef::JSONCompat.to_json(@expanded_run_list)
if exception
exception_data = {}