Issue #4049 has been updated by Ben Ford.
The workaround for now is a top level validator
Puppet::Type.newtype(:mytype) do
....
validate do
raise ArgumentError, 'mytype: someparam is required' unless
self[:someparam]
end
end
----------------------------------------
Bug #4049: isrequired not supported for newparam, newproperty (in types).
https://projects.puppetlabs.com/issues/4049#change-97226
* Author: Dan Bode
* Status: Accepted
* Priority: Normal
* Assignee:
* Category:
* Target version:
* Affected Puppet version: 0.25.5
* Keywords:
* Branch:
----------------------------------------
I have seen reference to a call isrequired should be supported for types.
newparam('blah') do
isrequired
end
This call should specify that certain attributes must be set when a resource is
declared.
It does not seem to work.
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.