diff options
| author | Paul Berry <paul@puppetlabs.com> | 2010-12-30 11:01:23 -0800 |
|---|---|---|
| committer | Paul Berry <paul@puppetlabs.com> | 2010-12-30 11:56:23 -0800 |
| commit | 98db2da4e9b35f6260bf07c641550b380b603baa (patch) | |
| tree | bbabd4b8603d4e0b88fa28d3c48848a6dfc5c2a7 /lib/puppet | |
| parent | bd4a8a13a85e6d64c987765cb83b1ebd4a63a341 (diff) | |
| download | puppet-98db2da4e9b35f6260bf07c641550b380b603baa.tar.gz puppet-98db2da4e9b35f6260bf07c641550b380b603baa.tar.xz puppet-98db2da4e9b35f6260bf07c641550b380b603baa.zip | |
(#5715) Removed unnecessary attributes from YAML of Puppet::Transaction::Event.
The removed attributes are file, line, resource, tags,
source_description, and default_log_level. These attributes were all
redundant with those in Puppet::Resource::Status.
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/transaction/event.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/transaction/event.rb b/lib/puppet/transaction/event.rb index b9fa5c38b..64980f1d9 100644 --- a/lib/puppet/transaction/event.rb +++ b/lib/puppet/transaction/event.rb @@ -8,6 +8,7 @@ class Puppet::Transaction::Event include Puppet::Util::Logging ATTRIBUTES = [:name, :resource, :property, :previous_value, :desired_value, :historical_value, :status, :message, :file, :line, :source_description, :audited] + YAML_ATTRIBUTES = %w{@audited @property @previous_value @desired_value @historical_value @message @name @status @time} attr_accessor *ATTRIBUTES attr_writer :tags attr_accessor :time @@ -47,6 +48,10 @@ class Puppet::Transaction::Event message end + def to_yaml_properties + (YAML_ATTRIBUTES & instance_variables).sort + end + private # If it's a failure, use 'err', else use either the resource's log level (if available) |
