On 04/15/2014 03:01 AM, Andy Parker wrote: > I'm wondering if there is a way of either doing this in a module (do > the constraint check in a provider), or if there is a change we can > make to allow this to be in a module. It would be great to be able to > have the extension points so that these kinds of things don't have to > go into the puppet repository in order to be tried out.
Thanks for the input. I even *had* been thinking of hacking the constraint evaluation into the new type's generate hook. This way, the agent would naturally run them before the transaction, thinking it was a constraint's way to do generate additional resources. This has two limitations, though: 1. The cosmetic issue that the error output alludes to the generation of additional resources and 2. the critical problem that this hook has no way to interrupt the transaction. Usually, exceptions that are raised from types and providers are handled as "resource local" problems. They will fail the resource, but not the transaction as a whole. I currently see no way to do this without patching the transaction code. Of course, we could just introduce an appropriate hook into the core and do everything else in modules for a time then. Seeing as the lonterm goal of the feature would be to serve as the mortar between third party modules, I'd still see it in tier 1, but that's just my gut feeling. It may just become a very common dependency such as concat_file I guess. But can we deprecate defined() in favor of an external module? :-) Cheers, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/534CC263.2070403%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/d/optout.