diff options
| author | Luke Kanies <luke@madstop.com> | 2008-07-03 18:50:56 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-07-03 18:50:56 -0500 |
| commit | 73c06c05aec8834b6fdebac107fb289575779020 (patch) | |
| tree | 4db34c01a8a7de3032c97514a2b16d754447ca17 /lib/puppet | |
| parent | 6124c693c98217bdb747f455eefd09d303b0b2a5 (diff) | |
| download | puppet-73c06c05aec8834b6fdebac107fb289575779020.tar.gz puppet-73c06c05aec8834b6fdebac107fb289575779020.tar.xz puppet-73c06c05aec8834b6fdebac107fb289575779020.zip | |
Renaming Puppet::Event to Puppet::Transaction::Event
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/event.rb | 28 | ||||
| -rw-r--r-- | lib/puppet/transaction.rb | 6 | ||||
| -rw-r--r-- | lib/puppet/transaction/event.rb | 22 | ||||
| -rw-r--r-- | lib/puppet/type.rb | 1 |
4 files changed, 26 insertions, 31 deletions
diff --git a/lib/puppet/event.rb b/lib/puppet/event.rb deleted file mode 100644 index c1928a354..000000000 --- a/lib/puppet/event.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'puppet' -require 'puppet/util/methodhelper' -require 'puppet/util/errors' - -module Puppet - # events are transient packets of information; they result in one or more (or none) - # subscriptions getting triggered, and then they get cleared - # eventually, these will be passed on to some central event system - class Event - include Puppet - include Puppet::Util::MethodHelper - include Puppet::Util::Errors - - attr_accessor :event, :source, :transaction - - @@events = [] - - def initialize(args) - set_options symbolize_options(args) - requiredopts(:event, :source) - end - - def to_s - @source.to_s + " -> " + self.event.to_s - end - end -end - diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb index 84a41d5b8..78704bb13 100644 --- a/lib/puppet/transaction.rb +++ b/lib/puppet/transaction.rb @@ -6,6 +6,8 @@ require 'puppet' module Puppet class Transaction require 'puppet/transaction/change' + require 'puppet/transaction/event' + attr_accessor :component, :catalog, :ignoreschedules attr_accessor :sorted_resources, :configurator @@ -680,7 +682,7 @@ class Transaction [callback, subs.length] # And then add an event for it. - return [Puppet::Event.new( + return [Puppet::Transaction::Event.new( :event => :noop, :transaction => self, :source => resource @@ -712,7 +714,7 @@ class Transaction end # And then add an event for it. - trigged << Puppet::Event.new( + trigged << Puppet::Transaction::Event.new( :event => :triggered, :transaction => self, :source => resource diff --git a/lib/puppet/transaction/event.rb b/lib/puppet/transaction/event.rb new file mode 100644 index 000000000..418e70516 --- /dev/null +++ b/lib/puppet/transaction/event.rb @@ -0,0 +1,22 @@ +require 'puppet' +require 'puppet/util/methodhelper' +require 'puppet/util/errors' + +# events are transient packets of information; they result in one or more (or none) +# subscriptions getting triggered, and then they get cleared +# eventually, these will be passed on to some central event system +class Puppet::Transaction::Event + include Puppet::Util::MethodHelper + include Puppet::Util::Errors + + attr_accessor :event, :source, :transaction + + def initialize(args) + set_options symbolize_options(args) + requiredopts(:event, :source) + end + + def to_s + @source.to_s + " -> " + self.event.to_s + end +end diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index b7de11de5..45dd7f5b5 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -1,6 +1,5 @@ require 'puppet' require 'puppet/util/log' -require 'puppet/event' require 'puppet/util/metric' require 'puppet/property' require 'puppet/parameter' |
