diff options
author | Luke Kanies <luke@madstop.com> | 2009-11-04 17:23:38 -0500 |
---|---|---|
committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
commit | 242209d251c7807378d3af6d9bffbc9ed59be723 (patch) | |
tree | c72f80f7b75e228eaa975a5cff10bee2f02bf512 /lib | |
parent | a4b77f61f26b20a48e0e55f8fc8bfef338878e6e (diff) | |
download | puppet-242209d251c7807378d3af6d9bffbc9ed59be723.tar.gz puppet-242209d251c7807378d3af6d9bffbc9ed59be723.tar.xz puppet-242209d251c7807378d3af6d9bffbc9ed59be723.zip |
Correcting comments and making report timestamp internal
We had some no-longer-correct comments in the Transaction
class, which are now removed. This also moves the timestamp
for reports into the report class, so it's created at
initialization by the report, rather than by the transaction.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/transaction.rb | 11 | ||||
-rw-r--r-- | lib/puppet/transaction/report.rb | 1 |
2 files changed, 3 insertions, 9 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb index aee541fb1..7e478abb2 100644 --- a/lib/puppet/transaction.rb +++ b/lib/puppet/transaction.rb @@ -58,8 +58,7 @@ class Puppet::Transaction end end - # Apply all changes for a resource, returning a list of the events - # generated. + # Apply all changes for a resource def apply(resource) begin changes = resource.evaluate @@ -191,11 +190,6 @@ class Puppet::Transaction end end - # A bit of hackery here -- if skipcheck is true, then we're the - # top-level resource. If that's the case, then make sure all of - # the changes list this resource as a proxy. This is really only - # necessary for rollback, since we know the generating resource - # during forward changes. unless children.empty? @changes[changecount..-1].each { |change| change.proxy = resource } end @@ -326,8 +320,7 @@ class Puppet::Transaction # Then all of the change-related metrics report.newmetric(:changes, :total => @changes.length) - - report.time = Time.now + return report end # Should we ignore tags? diff --git a/lib/puppet/transaction/report.rb b/lib/puppet/transaction/report.rb index 45a249f48..5a0332f66 100644 --- a/lib/puppet/transaction/report.rb +++ b/lib/puppet/transaction/report.rb @@ -28,6 +28,7 @@ class Puppet::Transaction::Report @logs = [] @events = [] @host = Puppet[:certname] + @time = Time.now end def name |