Issue #8233 has been updated by Luke Kanies.
I've just posted my code to the list with this message: This patch set significantly simplifies the management and definition of parameters in Puppet::Type subclasses. The main goal of this work is to make it easier to split Puppet::Type into three classes (a class/module for managing which types exist, a class for modeling resource types, and a class for modeling resources). We previously had completely separate methods for parameters, properties, and metaparameters, and this generally unifies them, and definitely simplifies and cleans up the interfaces. The vast majority of this work falls into two categories: * Restructuring Puppet::Type * Changing the rest of the system to reflect those changes, primarily just renaming methods or something very close to that There are three potential issues with this commit series: * We remove the old methods, so there's no backward compatibility for the few people who used them * We change the behavior of Puppet::Type.parameters, which used to return a list of parameter names and now returns actual parameter classes * We no longer support having properties and metaparameters with the same name. This means we had to disable 'alias' in the Nagios types. In general, I think the affect of this is minimal to none, but we can look at modifying the commit series if it's deemed to big of a step. ---------------------------------------- Refactor #8233: Puppet::Type parameter handling should be cleaner https://projects.puppetlabs.com/issues/8233 Author: Luke Kanies Status: Accepted Priority: Normal Assignee: Luke Kanies Category: RAL Target version: Affected Puppet version: Keywords: Branch: luke/refactor/master/8233-refactor_parameter_management In the course of trying a few approaches to refactoring how the RAL is built, it's become clear that one of the main impediments to it is the crusty interface for managing parameters in Puppet::Type - e.g., lots of redundant methods for managing parameters, properties, and metaparameters, and a ton of confusing naming. These should be cleaned up, both for short-term sanity and for long-term refactoring enablement. I've got a branch that does exactly that, fortunately. :) The only potential issues with my branch are: * It changes the interface of Puppet::Type.parameters - this previously returned a list of names, and now it returns the class referred to by a given parameter name * It removes the old methods, rather than keeping them around for backward compatibility. In other words, this branch breaks compatibility with some methods used in managing builtin resource types. I expect a better approach is to retain backward compatibility, but I wanted to post the code and get feedback rather than deciding on my own. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en.
