Issue #9007 has been updated by Ken Barber.

Status changed from Needs Decision to Duplicate

Actually, this is a duplicate of #7218 - so I'll mark it as such.
----------------------------------------
Feature #9007: Construct for specifying parameter validity in paramterized 
classes in puppet language
https://projects.puppetlabs.com/issues/9007#change-62557

Author: Joe McDonagh
Status: Duplicate
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 [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.

Reply via email to