summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2010-12-29 16:00:23 -0800
committerPaul Berry <paul@puppetlabs.com>2010-12-30 11:55:15 -0800
commitbd4a8a13a85e6d64c987765cb83b1ebd4a63a341 (patch)
tree6550c457968e6769395fbb7d551caef5e90704fa /lib
parent716ee1cd76a2b30c10e715bca3e22896d9c4e36f (diff)
downloadpuppet-bd4a8a13a85e6d64c987765cb83b1ebd4a63a341.tar.gz
puppet-bd4a8a13a85e6d64c987765cb83b1ebd4a63a341.tar.xz
puppet-bd4a8a13a85e6d64c987765cb83b1ebd4a63a341.zip
(#5715) Make certain report attributes always present.
The attributes Puppet::Resource::Status#changed, Puppet::Resource::Status#out_of_sync, and Puppet::Transaction::Event#audited used to only appear in reports when their state was true. Now they appear always.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/resource/status.rb2
-rw-r--r--lib/puppet/transaction/event.rb1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/puppet/resource/status.rb b/lib/puppet/resource/status.rb
index 43d3f1644..b138c6520 100644
--- a/lib/puppet/resource/status.rb
+++ b/lib/puppet/resource/status.rb
@@ -47,6 +47,8 @@ module Puppet
@resource = resource.to_s
@change_count = 0
@out_of_sync_count = 0
+ @changed = false
+ @out_of_sync = false
[:file, :line].each do |attr|
send(attr.to_s + "=", resource.send(attr))
diff --git a/lib/puppet/transaction/event.rb b/lib/puppet/transaction/event.rb
index e3537bb08..b9fa5c38b 100644
--- a/lib/puppet/transaction/event.rb
+++ b/lib/puppet/transaction/event.rb
@@ -16,6 +16,7 @@ class Puppet::Transaction::Event
EVENT_STATUSES = %w{noop success failure audit}
def initialize(*args)
+ @audited = false
options = args.last.is_a?(Hash) ? args.pop : ATTRIBUTES.inject({}) { |hash, attr| hash[attr] = args.pop; hash }
options.each { |attr, value| send(attr.to_s + "=", value) unless value.nil? }