On 18/07/12 20:58, Stefan Schulte wrote: > On Mon, Jul 16, 2012 at 11:19:52AM +0100, Dominic Cleal wrote: >> Hello, >> >> I'm currently implementing a new provider for the mounttab type (the one >> distributed in the puppetlabs/mount_providers module) in the >> augeasproviders[1] project. >> >> From the provider I need to access the list of options given in the >> mounttab resource, defined in the type as: >> >> newproperty(:options, :parent => Puppet::Property::List) do >> def delimiter >> "," >> end >> end >> >> The trouble with this is the type appears to be defining how the >> property is stored by specifying the delimiter, something that's >> normally the preserve of the provider. Since I'm passing the options >> into Augeas, I actually would like the original list of options to avoid >> parsing them back out of the joined string available from >> resource[:options]. >> >> Does anybody know how to get at this original list? >> >> [1] https://github.com/domcleal/augeasproviders / >> http://forge.puppetlabs.com/domcleal/augeasproviders >> > > I guess this should work: > > resource.original_parameters[:options] > > but this would not merge the should values with the current values > if membership is set to minimum.
Thanks Stefan, that worked perfectly. -- Dominic Cleal Red Hat Consulting m: +44 (0)7817 878113 -- 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.
