My bad, I think I just missed those were modified as well. I can reinstate
those changes as well.

As for the architectural issue, yeah it would probably be better for
providers to warn/ignore this on their own rather than generalizing it in
type.rb, but that may be much more work so I think it's important to get
this check back in rather than causing errors or random behavior on
systems.

On Sat, 11 Sep 2010 12:30:08 -0700, Jesse Wolfe <[email protected]>
wrote:
> Generally I agree with this patch, but if we're restoring the code, then
> shouldn't we restore the unit tests, too?
> 
> And while for 2.6.x I suspect that the safest course of action is
reverting
> to the old behavior, I'd still prefer that, at some point in the future,
it
> be the Provider's responsibility to ignore parameters it doesn't support
> rather than the Type's responsibility to query the Provider about its
> features.
> 
> ~Jesse Wolfe
> 
> On Sat, Sep 11, 2010 at 8:55 AM, James Cammarata <[email protected]> wrote:
> 
>>
>> This was apparently caused by an earlier commit, per the bug.  I
>> reinstated
>> the lines that were removed from type.rb.
>>
>> Also available via my github: git://github.com/jimi1283/puppet.git
>>
>> ---
>>  lib/puppet/type.rb |    6 ++++++
>>  1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb
>> index 53c23aa..39dcf03 100644
>> --- a/lib/puppet/type.rb
>> +++ b/lib/puppet/type.rb
>> @@ -472,6 +472,12 @@ class Type
>>       raise Puppet::Error, "Resource type #{self.class.name} does not
>> support parameter #{name}"
>>     end
>>
>> +    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]
>> +      return nil
>> +    end
>> +
>>     return @parameters[name] if @parameters.include?(name)
>>
>>     @parameters[name] = klass.new(:resource => self)
>> --
>> 1.5.5.6
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>> --
>> 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]<puppet-dev%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-dev?hl=en.
>>
>>
> 
> -- 
> 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.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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