summaryrefslogtreecommitdiffstats
path: root/lib/puppet/resource/status.rb
Commit message (Collapse)AuthorAgeFilesLines
* (#5900) Include ResourceStatus#failed in serialized reportsNick Lewis2011-01-141-1/+2
| | | | | | | | | This property was excluded from serialization because it was believed that its value could be determined by looking at the events of a ResourceStatus. However, if a resource can't be retrieved, it will have no events created, and will have no other way of determining its status. Reviewed-By: Paul Berry
* Maint: Added "skipped" to the YAML output for Puppet::Resource::StatusPaul Berry2011-01-061-1/+2
| | | | | | In 2.6.4 and earlier, "skipped" appeared only when true. A recent change accidentally caused it to never appear. This change makes it always appear.
* (#5715) Added attributes resource_type and title to Puppet::Resource::Status.Paul Berry2010-12-301-2/+4
| | | | | These new attributes save report processors from having to parse the "resource" attribute.
* (#5715) Removed attribute source_description from the YAML representation ofPaul Berry2010-12-301-0/+6
| | | | | | | Puppet::Resource::Status. This attribute is only used for properly generating log messages and was never intended to appear in reports.
* (#5715) Make certain report attributes always present.Nick Lewis2010-12-301-0/+2
| | | | | | | The attributes Puppet::Resource::Status#changed, Puppet::Resource::Status#out_of_sync, and Puppet::Transaction::Event#audited used to only appear in reports when their state was true. Now they appear always.
* (#5715) Removed redundant attribute Resource::Status#versionPaul Berry2010-12-301-2/+2
|
* (#5715) Removed Resource::Status#skipped_reason. It was never used.Paul Berry2010-12-301-1/+1
|
* Modified the behavior of Puppet::Resource::Status as follows:Paul Berry2010-12-171-4/+9
| | | | | | | | | | - #change_count now only counts events that represent successful changes. It does not count failures, audits, or noops. - #changed is equivalent to #change_count > 0. - #out_of_sync_count (a new attribute) counts all events except audits. - #out_of_sync is equivalent to #out_of_sync_count > 0. This should hopefully make the summary statistics in reports more useful.
* (#5408) Reworked ResourceHarness so that code is clearer and all behaviors ↵Paul Berry2010-12-171-2/+6
| | | | | | | | | | | | | | are tested This patch removes the Puppet::Transaction::Change class and replaces it with a method, Puppet::Transaction::ResourceHarness#apply_parameter. The new code is shorter, more thoroughly unit tested, and addresses known bugs in the interaction between auditing and performing changes. This code does not address drawbacks in the report output (for example a resource is still flagged as changed even if it merely contains audit information); those will be addressed in a follow-up patch.
* Code smell: Two space indentationMarkus Roberts2010-07-091-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced 106806 occurances of ^( +)(.*$) with The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people who learned ruby in the 1900s) uses two-space indentation. 3 Examples: The code: end # Tell getopt which arguments are valid def test_get_getopt_args element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") becomes: end # Tell getopt which arguments are valid def test_get_getopt_args element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") The code: assert_equal(str, val) assert_instance_of(Float, result) end # Now test it with a passed object becomes: assert_equal(str, val) assert_instance_of(Float, result) end # Now test it with a passed object The code: end assert_nothing_raised do klass[:Yay] = "boo" klass["Cool"] = :yayness end becomes: end assert_nothing_raised do klass[:Yay] = "boo" klass["Cool"] = :yayness end
* [#3921] Remove unnecessary require 'puppet/resource'Rein Henrichs2010-02-171-51/+55
| | | | | | * Remove require statements * explicity define namespace modules/classes for Puppet::Resource::Status to avoid require dependency cycle.
* Mark resource/status as failed if they are associated with a failingJesse Wolfe2010-02-171-0/+3
| | | | | | | event. This restores behavior for resource dependencies that was broken in the #2759 series.
* Moving Metric management to the reportsLuke Kanies2010-02-171-2/+2
| | | | | | | | | | | | This is one less bit that the transaction does. The resource status objects had nearly enough information to do everything, so I just added that last bit, and moved everything over. It's all much cleaner now. I had to change some existing, internal APIs, but mostly this should be hidden from outside users. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding first version of Resource::Status classLuke Kanies2010-02-171-0/+51
This is the class that will be returned in reports, and they'll contain the events being created. Signed-off-by: Luke Kanies <luke@reductivelabs.com>