Method: Puppet::Transaction::Report#raw_summary

Defined in:
lib/vendor/puppet/transaction/report.rb

#raw_summaryObject

Provide a raw hash summary of this report.



118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/vendor/puppet/transaction/report.rb', line 118

def raw_summary
  report = { "version" => { "config" => configuration_version, "puppet" => Puppet.version  } }

  @metrics.each do |name, metric|
    key = metric.name.to_s
    report[key] = {}
    metric.values.each do |name, label, value|
      report[key][name.to_s] = value
    end
    report[key]["total"] = 0 unless key == "time" or report[key].include?("total")
  end
  (report["time"] ||= {})["last_run"] = Time.now.tv_sec
  report
end