Firstly, sorry for bringing this thread back - However I thought it 
probably best as it's got all the history of what I was working towards 
etc... 

Anyways, onto the problem at hand. 
I've created a new property against my netapp_volume provider called *
:snapschedule*. 
This property is taking a hash, and doing something very similar to the 
*:options 
*property above... 

Code was committed under: 
https://github.com/fatmcgav/fatmcgav-netapp/commit/6427581c546f2ccb5ebf2f19826afad38b424b9d

However it looks like something isnt quite right with the insync? def, as 
I'm seeing the following in puppet device run logs:
Info: starting applying configuration to actint-star-nactl01 at 
actint-star-nactl01
Warning: Local environment: "production" doesn't match server specified 
node environment "test", switching agent to "test".
Info: Retrieving plugin
Info: Caching catalog for actint-star-nactl01
Info: Applying configuration version '1357295208'
Processing Volume puppet_db02_oractrl
/Stage[main]/Act::Storage::Netapp/Act::Util::Netapp::Volume[puppet_db02_oractrl]/Netapp_notify[volume_define_puppet_db02_oractrl]/message:
 
defined 'message' as 'Processing Volume puppet_db02_oractrl'
/Stage[main]/Act::Storage::Netapp/Act::Util::Netapp::Volume[puppet_db02_oractrl]/Netapp_volume[v_puppet_db02_oractrl]/snapschedule:
 
snapschedule changed '{"days"=>0, "hours"=>0, "weeks"=>0, "minutes"=>0}' to 
'[{"hours"=>"0", "days"=>"0", "minutes"=>"0", "weeks"=>"0"}]'
Processing Volume puppet_db02_oraarch
/Stage[main]/Act::Storage::Netapp/Act::Util::Netapp::Volume[puppet_db02_oraarch]/Netapp_notify[volume_define_puppet_db02_oraarch]/message:
 
defined 'message' as 'Processing Volume puppet_db02_oraarch'
Processing Volume puppet_db02_data
/Stage[main]/Act::Storage::Netapp/Act::Util::Netapp::Volume[puppet_db02_data]/Netapp_notify[volume_define_puppet_db02_data]/message:
 
defined 'message' as 'Processing Volume puppet_db02_data'
/Stage[main]/Act::Storage::Netapp/Act::Util::Netapp::Volume[puppet_db02_data]/Netapp_volume[v_puppet_db02_data]/snapschedule:
 
snapschedule changed '{"days"=>0, "hours"=>0, "weeks"=>0, "minutes"=>0}' to 
'[{"hours"=>"0", "days"=>"0", "minutes"=>"0", "weeks"=>"0"}]'

As you can see, the hash contents are identical... However the '*to*' hash 
is wrapped in an array... 

Any ideas where I could be going wrong?

Cheers
Gavin 

On Monday, 26 November 2012 22:04:18 UTC, Gavin Williams wrote:
>
> John, 
>
> Again, very helpful... 
> My knowledge of puppet is growing every day thanks to posts like this :-) 
>
> Cheers 
> Gavin 
> On Nov 26, 2012 7:30 PM, "jcbollinger" <john.bollin...@stjude.org> wrote:
>
>>
>>
>> On Monday, November 26, 2012 12:19:09 PM UTC-6, Gavin Williams wrote:
>>>
>>> John
>>>
>>> Cheers again, that could be a good alternative way of doing it... Use 
>>> insync? just to trigger options=, and then work out what actually needs 
>>> setting there... 
>>>
>>
>> That's not just a good alternative, it's the right way to do it.  The job 
>> of insync? is simply to determine whether all of the resource's properties 
>> have the expected target values.  No more, no less.  The job of property 
>> setter methods such as options= is to update the underlying resource(*) so 
>> that the affected property has the assigned value.  It is there, at the 
>> interface between Puppet and the system, that you have flexibility.
>>
>> (*) The property setters of providers that implement flush() work a bit 
>> differently, but I don't think that's relevant here.  I mention it for 
>> completeness.
>>
>>
>> John
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/puppet-users/-/OEk9ZWDBvWUJ.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/DWXnKlb2V28J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to