Luke,
On Mar 23, 10:42 pm, Martin Englund <[email protected]> wrote:
> > In 'validate', sometimes the other value isn't set - parameters are
> > set in the order in which they're defined in the file, so if you've
> > got a parameter that depends on another one, make sure you define the
> > required parameter first. That *should* make it work.
>
> This is how it is declared:
> zone { "dummy":
> path => "/zones/dummy",
> iptype => exclusive,
> ip => "dummy0",
> require => Zfs["$zpool/zones"]
> }
>
> What differs here from the current implementation is that when iptype
> is "exclusive" (the other, default, value is "shared") you just
> provide the interface name in ip (which normally is interface:ip), so
> I need to make the validation take the value of iptype into account.
> Now there must be a ":" in the ip parameter, but I need to skip that
> check when usign the exclusive iptype.
>
I've figured out an acceptable workaround:
I extract the validation from the ip and iptype properties to the type
validation, there I can reference both using self[:ip] and
self[:iptype].
cheers,
/Martin
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev?hl=en.