On Mar 23, 2010, at 2:25 PM, Martin Englund wrote:

On Mar 23, 10:13 pm, Luke Kanies <[email protected]> wrote:
On Mar 23, 2010, at 2:11 PM, Martin Englund wrote:

I'm working on a modification of the zone type (bug #3399) and I need
to reference the value of a property I'm adding from an existing
property, but I've not been able to figure out how to do that. The
documentation only lists some easy cases :)

Any pointers how to do that?

resource[:propertyname] should do it.

Nope, didn't work.

I forgot to mention that I'm calling resource[:iptype] from the
validate method, if that matters.

Hmm, yeah, that probably does. You *might* need to use '@resource' rather than 'resource', but I don't think so.

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.

--
A government big enough to give you everything you want is big enough
to take from you everything you have. --Gerald R. Ford
---------------------------------------------------------------------
Luke Kanies  -|-   http://reductivelabs.com   -|-   +1(615)594-8199

--
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.

Reply via email to