[Puppet-dev] Re: [augeas-devel] Re: Augeas and Puppet
Bryan Kearney
bkearney at redhat.com
Wed Aug 13 19:25:51 UTC 2008
Raphaël Pinson wrote:
<SNIP>
>
> For get, I'd expect to test the value of the node. For match, I'd expect
> to test the array of nodes returned, for example testing how many nodes
> matched the expression.
>
> e.g.
> If get returns no value, it means the value of the node is empty.
> If match returns no value, it means there is no such node.
I have updated the module [1] and it support the following onlyif syntax:
# onlyif syntax:
# get [AUGEAS_PATH] [COMPARATOR] [STRING]
# match [MATCH_PATH] size [COMPARATOR] [INT]
# match [MATCH_PATH] include [STRING]
# match [MATCH_PATH] == [AN_ARRAY]
#
# where
# AUGEAS_PATH is a valid path scoped by the context
# MATCH_PATH is a valid match syntax scoped by the context
# COMPARATOR is in the set [> >= != == <= <]
# STRING is a string
# INT is a number
# AN_ARRAY is in the form ['a string', 'another']
You can see the test script using this here[2].
Comments/critics welcome.
-- bk
[1] http://git.et.redhat.com/?p=ace.git;a=tree;f=modules/augeas;
[2]
http://git.et.redhat.com/?p=ace.git;a=blob_plain;f=modules/augeas/test.pp;hb=HEAD
More information about the augeas-devel
mailing list