[augeas-devel] Re: XPath and Augeas

Free Ekanayaka free at 64studio.com
Sat Aug 30 08:49:32 UTC 2008


Hi David,

|--==> On Thu, 28 Aug 2008 20:23:38 +0000, David Lutterkort <lutter at redhat.com> said:

  DL> 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?

  DL> For now, Augeas implements the tiniest part of XPath notation, namely to
  DL> disambiguate multiple nodes with the same name,
  DL> e.g /files/etc/hosts/3/alias[2]
  DL> or /files/etc/ssh/sshd_config/AcceptEnv[last()]. 

  DL> The plan is to implement more of XPath to allow more flexible addressing
  DL> of nodes, so that you can say things like

  DL>          /files/etc/hosts/*[ipaddr = "127.0.0.1"]
  DL>          /files/etc/hosts/*[ipaddr = "127.0.0.1"]/alias[last() - 1]
  DL>          /augeas/files//error
  DL>          /files/etc/puppet/puppet.conf/section[value() = "main"]/vardir

Oh, that would really be of great help.

Ciao,

Free




More information about the augeas-devel mailing list