diff options
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 |