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
Cannot use action_class methods #85
Comments
I don't believe the methods in |
I searched whether that was true or not but couldn't find anything. So if that is the case then the documentation is misleading, and the cookbook "loses" some functionality. I propose moving those methods out of the action_class this way they would be available outside and inside the actions. I can make a PR is this would be accepted. |
Have a look at this cookbook https://github.com/ist-dsi/cookbook-vault-certificate. The resource vault_certificate has both action_class and "direct methods" on the resource promoting code reuse not only on the resource implementation but on the chef recipe where the resource is being used |
If we move these into a helper library, it would be more visible. That might be more portable anyway and what we've been doing on other cookbooks. Feel free to create a PR which does this so you can restore the functionality. |
Can you point me to a cookbook where that is being done? |
π» Brief Description
action_class methods cannot be invoked
π₯ Cookbook version
2.0.16
π©βπ³ Chef-Infra Version
18
π© Platform details
CentOS 7
AlmaLinux 8
Steps To Reproduce
Fails with:
π Expected behavior
The correct path should be printed.
β Additional context
The key_path is being used in other resources.
This error occurs when using a kitchen converge.
The text was updated successfully, but these errors were encountered: