Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-1482) Fix Autorequires to only include resource title #46

Conversation

ferventcoder
Copy link
Contributor

Previously the acl module was using autorequires that include the resource name
and type, like Group['None']. With PUP-3177 (first available in Puppet 3.7.1
and in PE 3.7.0), this now results in invalid calls to Puppet::Resource.

Specifying the resource type is incorrect and not a best practice (it
is already handled by autorequire(:type) at the start of each of the
autorequire methods.

This adjusts the autorequires to follow the correct practice of only including
the resource title.

This also adjusts file autorequires to greatly simplify the logic and reduce
the extra call to catalog.resource which is called later by
Puppet::Resource. The reduction in logic means the file resource name case
needs to match exactly, but that is in line with how other requires should be
specified.

Previously the acl module was using autorequires that include the resource name
and type, like Group['None']. With PUP-3177 (first available in Puppet 3.7.1
and in PE 3.7.0), this call now results in invalid calls to `Puppet::Resource`.

Specifying the resource type is incorrect and not a best practice (it
is already handled by `autorequire(:type)` at the start of each of the
autorequire methods.

This adjusts the autorequires to follow the correct practice of only including
the resource title.

This also adjusts file autorequires to greatly simplify the logic and reduce
the extra call to `catalog.resource` which is called later by
`Puppet::Resource`. The reduction in logic means the file resource name case
needs to match exactly, but that is in line with how other requires should be
specified.
@ferventcoder
Copy link
Contributor Author

This supersedes joshcooper@c7b68ff

@joshcooper
Copy link
Contributor

👍

@ferventcoder
Copy link
Contributor Author

@cyberious you want to take a look sir?

@cyberious
Copy link
Contributor

👍

cyberious added a commit that referenced this pull request Dec 3, 2014
…x-autorequires

(MODULES-1482) Fix Autorequires to only include resource title
@cyberious cyberious merged commit 1dfd941 into puppetlabs:master Dec 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants