[augeas-devel] XPath and Augeas
David Lutterkort
lutter at redhat.com
Thu Aug 28 20:23:38 UTC 2008
On Thu, 2008-08-28 at 11:29 +0200, Free Ekanayaka wrote:
> in a previous post it was mentioned that the Augeas API can be used in
> together with the XPath one. Did I understant it correctly? How are
> the two libraries supposed to work together?
For now, Augeas implements the tiniest part of XPath notation, namely to
disambiguate multiple nodes with the same name,
e.g /files/etc/hosts/3/alias[2]
or /files/etc/ssh/sshd_config/AcceptEnv[last()].
The plan is to implement more of XPath to allow more flexible addressing
of nodes, so that you can say things like
/files/etc/hosts/*[ipaddr = "127.0.0.1"]
/files/etc/hosts/*[ipaddr = "127.0.0.1"]/alias[last() - 1]
/augeas/files//error
/files/etc/puppet/puppet.conf/section[value() = "main"]/vardir
Just not clear when I have time to do that :(
David
More information about the augeas-devel
mailing list