Please review pull request #798: Change logging facility to debug for not supported provider features opened by (zaphod42)

Description:

Bug #9160 was supposed to be targeted at the 2.7 line of code, but went into master instead in PR #370. This pull request applies the fix to the 2.7 code to address bug #14400.

  • Opened: Wed May 16 22:39:30 UTC 2012
  • Based on: puppetlabs:2.7.x (48ccf46244e5ab3cda3f3e5e0b100d77883af582)
  • Requested merge: zaphod42:bug/2.7.x/14400-user-resources-generate-spurious-messages (2fc7191cf2f0b3e0dbcbda1b2eddacead4f2a66e)

Diff follows:

diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb
index e416665..8d0e586 100644
--- a/lib/puppet/type.rb
+++ b/lib/puppet/type.rb
@@ -503,7 +503,7 @@ def newattr(name)
 
     if provider and ! provider.class.supports_parameter?(klass)
       missing = klass.required_features.find_all { |f| ! provider.class.feature?(f) }
-      info "Provider %s does not support features %s; not managing attribute %s" % [provider.class.name, missing.join(", "), name]
+      debug "Provider %s does not support features %s; not managing attribute %s" % [provider.class.name, missing.join(", "), name]
       return nil
     end
 
diff --git a/test/ral/manager/attributes.rb b/test/ral/manager/attributes.rb
index 8b0b8df..c3e449e 100755
--- a/test/ral/manager/attributes.rb
+++ b/test/ral/manager/attributes.rb
@@ -227,7 +227,7 @@ def test_newattr_and_required_features
       no.each do |a|
         assert_nil(resource.should(a), "Got value for unsupported %s in %s" % [a, prov.name])
         if Puppet::Util::Log.sendlevel?(:info)
-          assert(@logs.find { |l| l.message =~ /not managing attribute #{a}/ and l.level == :info }, "No warning about failed %s" % a)
+          assert(@logs.find { |l| l.message =~ /not managing attribute #{a}/ and l.level == :debug }, "No warning about failed %s" % a)
         end
       end
 

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to