-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I did some more troubleshooting and...'um, no' would be the correct answer :-(.

I'm not quite sure why though.

For instance, overriding 'initialize' allows me to access everything, but 
calling something in 'munge' in a property doesn't. Seems weird.

Thanks,

Trevor

On 04/01/2012 07:37 PM, Luke Kanies wrote:
> On Mar 30, 2012, at 2:05 PM, Trevor Vaughan wrote:
> 
>> I am able to access the various parameter values in insync? etc...,
>> using resource[:value]. However, in munge, all references to the
>> property values are coming back empty.
>>
>> Something like:
>>
>> newparam(:bar) do ... end
>>
>> newproperty(:foo) do
>>  def insync?(is)
>>    debug(resource[:bar]) <-- works
>>    ....
>>  end
>>
>>  munge do |value|
>>    value = "#{value} #{resource[:bar]}" <--- empty
>>  end
>> end
> 
> I think that you can do that, as long as the parameter whose value you're 
> using is defined first, but it might also be that all non-namevar parameters 
> are always defined after properties.  If it's not working, then, um, no? :)
> 

- -- 
Trevor Vaughan
 Vice President, Onyx Point, Inc.
 email: [email protected]
 phone: 410-541-ONYX (6699)
 pgp: 0x6C701E94

- -- This account not approved for unencrypted sensitive information --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJPePE/AAoJECNCGV1OLcypYToIAJt0+WbFSxIp5S7Ifc6LKJc3
L3V30ORTINIC6HnI2z+Lcdv4MaJFztfyGmZYRK8TeI8wTGsRO81z4GUNGK2IicVc
67pz7s7qURgAmkszJJiM3hUaVODJ1+LewMmTynrVGrLdEgN6VI54GOQ68Am+ZeC3
qskpx832jX+VBr/4YZ4sMJaM6tpds8HpHSrJtIL27h+Birdqs3ufqdDvCTr3Fq20
lnDvyRaEpoBXiEHhvQ8d5xbqdFC9E8WB+SEk9okCv5k4/+ua1Ju8e8U3dzH4c1ET
UiYG9wQpIKcOjGM9pHMhQvmIkR54bJQktJqI8CBsIwYIuIVj+UQr1W9AfRDrBPE=
=QwpF
-----END PGP SIGNATURE-----

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

<<attachment: tvaughan.vcf>>

Reply via email to