summaryrefslogtreecommitdiff
path: root/lib/chef/audit/audit_reporter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/audit/audit_reporter.rb')
-rw-r--r--lib/chef/audit/audit_reporter.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/chef/audit/audit_reporter.rb b/lib/chef/audit/audit_reporter.rb
index 21ffb62829..d022ac0c47 100644
--- a/lib/chef/audit/audit_reporter.rb
+++ b/lib/chef/audit/audit_reporter.rb
@@ -28,7 +28,7 @@ class Chef
attr_reader :rest_client, :audit_data, :ordered_control_groups, :run_status
private :rest_client, :audit_data, :ordered_control_groups, :run_status
- PROTOCOL_VERSION = '0.1.0'
+ PROTOCOL_VERSION = '0.1.1'
def initialize(rest_client)
@rest_client = rest_client
@@ -36,6 +36,10 @@ class Chef
@ordered_control_groups = Hash.new
end
+ def run_context
+ run_status.run_context
+ end
+
def audit_phase_start(run_status)
Chef::Log.debug("Audit Reporter starting")
@audit_data = AuditData.new(run_status.node.name, run_status.run_id)
@@ -71,7 +75,8 @@ class Chef
if ordered_control_groups.has_key?(name)
raise Chef::Exceptions::AuditControlGroupDuplicate.new(name)
end
- ordered_control_groups.store(name, ControlGroupData.new(name))
+ metadata = run_context.audits[name].metadata
+ ordered_control_groups.store(name, ControlGroupData.new(name, metadata))
end
def control_example_success(control_group_name, example_data)