Afternoon all Had a code detox over the weekend, and came back to it this morning refreshed, and have fixed several of the issues I was encountering below :) :D
Latest code has been pushed to github<https://github.com/fatmcgav/puppet-oracle/commits/oranfstab_dev>, but long and short was: 1) Set '*:array_matching => :all*' on the mounts property, and restructured back to the array of hashes format. 2) Identified an issue with matching should & is values, which was causing the provider to fail. After a quick google, I found a note in the f5_virtualserver<https://github.com/puppetlabs/puppetlabs-f5/blob/master/lib/puppet/type/f5_virtualserver.rb>type which suggested an alternative method to compare array of hashes. Added that to *insync?* and it all sprang into life :D 3) Added properties and associated code for *localips* and *remoteips*properties... Regex had me stumped for a little while, until I worked out that the expression I was using didn't worked with Ruby 1.8.7 due to the capture groups, so swapped that out for a 1.8.7 compatible regex, and all started working again... However I've still got a couple of issues: 1) Skip_record is still being triggered, so need to look at why that is... 2) The run failed when converting a resource from present to absent, so need to look at that aswell... However overall I'm very happy with the progress... It's nearly fit for purpose :) Any pointers on about 2 issues greatly appreciated though... Cheers Gavin On Saturday, 26 January 2013 10:44:32 UTC, Gavin Williams wrote: > > Jeff > > Cheers for the pointers... > > I was coding late last night, and again this morning, and think I've made > some good progress... > > Latest code has been pushed to > github<https://github.com/fatmcgav/puppet-oracle/commit/d411c965c8019d9f1a7d1a340f745291200419dd> > . > > This seems to work OK, however there's a few niggles I've got to figure > out... > 1) I'm trying to pass an array in on the 'mounts' property, but for > whatever reason the record only ever contains the first array value... > Have put a load of debug logging in place, copy of run log is on > pastebin<http://pastebin.com/V8K7LAqq> > . > > 2) I've had to override 'self.match_providers_with_resources', and comment > out *"next if skip_record?(record)"*, as it was causing the record to be > skipped and the file wasn't being generated :s > > Comments welcome... > > Cheers > Gavin > On Friday, 25 January 2013 19:30:42 UTC, Jeff McCune wrote: >> >> On Fri, Jan 25, 2013 at 9:41 AM, Gavin Williams <[email protected]>wrote: >> >>> I've just pushed an updated code set to >>> https://github.com/fatmcgav/puppet-oracle/commits/oranfstab_dev >>> >>> Thoughts before I plow on too much further? >>> >> >> I recommend trying to avoid using `class << oranfstab`, the so called >> "eigenclass" or "singleton class" is quite magical and really tripped me up >> when I was first learning Puppet and Ruby. >> >> It might be more direct and clear for other readers to create a new class >> that's a subclass of String in order to implement the `to_line` method. At >> the top of the file you could then create the strings using >> OranString.new('/var/opt/oracle/oranfstab') and >> OranString.new('/etc/oranfstab'). >> >> I've got a meeting to run off to, but are there other specific areas of >> this that you'd like us to focus our feedback on? >> >> -Jeff >> > -- 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]. Visit this group at http://groups.google.com/group/puppet-dev?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
