Issue #9007 has been updated by Ken Barber. Status changed from Needs More Information to Needs Decision Assignee deleted (Ken Barber)
So the current methodology kicking around is kwalify: <http://forge.puppetlabs.com/puppetlabs/kwalify> Or validate_* functions in stdlib: <http://forge.puppetlabs.com/puppetlabs/stdlib> Either of these are good choices. Kwalify is my preferred 'declarative' methodology, but it was discussed in that thread Nigel mentioned that such methodology belongs in incubation. Try either of these two methods and maybe let us know on the puppet-users or puppet-dev how you go. I think until we get enough push for this outside of core, there is little point adding anything in core to handle it atm. But happy to leave this ticket open if everyone else is, to discuss the possible future of such features in core. ---------------------------------------- Feature #9007: Construct for specifying parameter validity in paramterized classes in puppet language https://projects.puppetlabs.com/issues/9007#change-62556 Author: Joe McDonagh Status: Needs Decision Priority: Low Assignee: Category: parameterized classes Target version: Affected Puppet version: Keywords: parameters classes parameterized Branch: Currently, I'm doing this inside my parameterized classes: <pre> class mysql ( $ensure = "present", $server_type = "stock" ) { if ($ensure != "present" and $ensure != "absent") { fail "The mysql class only supports 'present' and 'absent' for ensure values." } if ($server_type != "stock" and $server_type != "puppet" and $server_type != "atlassian") { fail "The mysql class only supports 'stock', 'puppet', and 'atlassian' as server types as of now." } </pre> It would be nice if there some construct to specify valid parameters. I assume this is pretty easy to do in the Ruby DSL, but I think it'd be valuable to be able to do this and look nice in pure puppet. -- 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 puppet-bugs@googlegroups.com. To unsubscribe from this group, send email to puppet-bugs+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.