[augeas-devel] match command in augtool and Java
Diego
diego.ml at zoho.com
Mon Dec 28 17:00:35 UTC 2015
Hi Augeas developers,
I'm toying with Augeas these days (great tool, thank you!!) and I've found a
mismatch between augtool and Java bindings.
I'm playing with a fake root and a /etc/network/interfaces file.
Using the same fake root, so the same interfaces file, from augtool I get:
augtool> match /files/etc/network/interfaces/*
/files/etc/network/interfaces/auto = (none)
/files/etc/network/interfaces/allow-hotplug = (none)
/files/etc/network/interfaces/iface[1] = eth0
/files/etc/network/interfaces/iface[2] = eth0
while from an equivalent Java program, the strings in:
augeasHandle.match("/files/etc/network/interfaces/*")
are:
/files/etc/network/interfaces/auto
/files/etc/network/interfaces/allow-hotplug
/files/etc/network/interfaces/iface[1]
/files/etc/network/interfaces/iface[2]
/files/etc/network/interfaces/auto/1
/files/etc/network/interfaces/allow-hotplug/1
/files/etc/network/interfaces/iface[1]/family
/files/etc/network/interfaces/iface[1]/method
/files/etc/network/interfaces/iface[2]/family
/files/etc/network/interfaces/iface[2]/method
/files/etc/network/interfaces/iface[2]/address
/files/etc/network/interfaces/iface[2]/gateway
so while in augtool I get only the direct childs of the interfaces node, in
Java I get all the nodes in the subtree.
Should this be considered a bug in the Java implementation?
Bests,
Diego
More information about the augeas-devel
mailing list