diff options
author | Luke Kanies <luke@madstop.com> | 2008-07-04 22:14:37 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-07-04 22:14:37 -0500 |
commit | b0febd263c0cb8e61d512898f7c79868ea77e619 (patch) | |
tree | 3f35c4b2d7186d3c69c070c9edc684ccdc51f658 /lib/puppet/transaction.rb | |
parent | df528a66cafc8538c3208bf0b52fdbe1065f6e48 (diff) | |
parent | 81be1c5c3f85f514505e99fab5b8a2b2ae6fbec8 (diff) | |
download | puppet-b0febd263c0cb8e61d512898f7c79868ea77e619.tar.gz puppet-b0febd263c0cb8e61d512898f7c79868ea77e619.tar.xz puppet-b0febd263c0cb8e61d512898f7c79868ea77e619.zip |
Merge branch '0.24.x'
Conflicts:
lib/puppet/util/settings.rb
spec/integration/defaults.rb
spec/unit/node/catalog.rb
spec/unit/type/interface.rb
spec/unit/type/ssh_authorized_key.rb
Diffstat (limited to 'lib/puppet/transaction.rb')
-rw-r--r-- | lib/puppet/transaction.rb | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb index fb00a592d..e6dc60681 100644 --- a/lib/puppet/transaction.rb +++ b/lib/puppet/transaction.rb @@ -2,10 +2,12 @@ # and performs them require 'puppet' -require 'puppet/propertychange' module Puppet class Transaction + require 'puppet/transaction/change' + require 'puppet/transaction/event' + attr_accessor :component, :catalog, :ignoreschedules attr_accessor :sorted_resources, :configurator @@ -96,7 +98,7 @@ class Transaction # Create an edge with this resource as both the source and # target. The triggering method treats these specially for # logging. - events = resourceevents.collect { |e| e.event } + events = resourceevents.collect { |e| e.name } set_trigger(Puppet::Relationship.new(resource, resource, :callback => :refresh, :event => events)) end end @@ -109,7 +111,6 @@ class Transaction changes.collect { |change| @changes << change @count += 1 - change.transaction = self events = nil begin # use an array, so that changes can return more than one @@ -278,7 +279,7 @@ class Transaction # of course, bad. edge = orig_edge.class.new(orig_edge.source, orig_edge.target) label = orig_edge.label.dup - label[:event] = events.collect { |e| e.event } + label[:event] = events.collect { |e| e.name } edge.label = label set_trigger(edge) end @@ -680,11 +681,7 @@ class Transaction [callback, subs.length] # And then add an event for it. - return [Puppet::Event.new( - :event => :noop, - :transaction => self, - :source => resource - )] + return [Puppet::Transaction::Event.new(:noop, resource)] end if subs.length == 1 and subs[0].source == resource @@ -712,11 +709,7 @@ class Transaction end # And then add an event for it. - trigged << Puppet::Event.new( - :event => :triggered, - :transaction => self, - :source => resource - ) + trigged << Puppet::Transaction::Event.new(:triggered, resource) triggered(resource, callback) end |