Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Agent
-
1
-
Agent 2017-05-03, Agent 2017-05-31
-
Not Needed
-
refactoring of code / pruning dead code
-
No Action
-
Refactor
Description
This block in Puppet::Type: https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type.rb#L1163-L1168 iterates over all of the properties of the type, checks if the given provider supports the property, and returns an array of all the supported property names.
Except we don't do anything with the result.
Before commit http://github.com/puppetlabs/puppet/commit/53241a91, which was a maint commit to remove superfluous variables we never used, the result of this block was assigned to the variable `all_properties` - which was never used. The commit removed the variable, but not the associated block.
I believe the intention was to filter out properties that weren't supported by the provider before we called `newattr` on them, except `newattr` https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type.rb#L769-L773 already does this filtering, and provides helpful debug output that a provider doesn't support a property so we're not managing it.
The block can be removed.