There's a lot of great design advice in here. Thank you for taking the time
to write it up; I'll definitely do a deeper dive on this when I've solved
my immediate problem and check this advice against some of the other rules
I've written. I often find Puppet to be as much of a mind-bender as
w
On Thursday, February 12, 2015 at 1:53:25 PM UTC-6, jwil...@gmail.com wrote:
>
> Well, I was thinking of doing a type similar to what xmlstarlet does,
> including being able to add and remove nodes. I don't really need the
> added behavior of adding and removing nodes from the file right now,
Well, I was thinking of doing a type similar to what xmlstarlet does,
including being able to add and remove nodes. I don't really need the
added behavior of adding and removing nodes from the file right now, so I
left command as a future expansion parameter, but it basically only accepts
'rep
On Wednesday, February 11, 2015 at 11:09:32 AM UTC-6, jwil...@gmail.com
wrote:
>
> Hi all!
>
> I'm working on a custom type that applies xpaths to files. I expect the
> interface to look something like:
>
> xpath { "some update":
> xpath => "/some/xpath",
> command => "replace",
>
I did try to do that for another type I wrote and it was a mess. I ended
up having a single namevar that required a particular format that my type
then processed to get the parameters I needed. I'll take a look at your
example; I'm sure I'll learn something from it. Maybe it's worth another
If more than one parameter make sense for a namevar, then you can use
composite namevars, by using `isnamevar` for sevaral parameters and adding
a `self.title_patterns` method to define how to parse the title and feed
the namevar parameters.
See
https://github.com/hercules-team/augeasproviders