[augeas-devel] Problem with put direction on lens

David Lutterkort lutter at redhat.com
Wed Jul 18 22:58:58 UTC 2012


On Wed, 2012-07-18 at 15:47 -0700, David Lutterkort wrote:
> > 	test  Pdnsr_forward_zones.lns put empty  after
> > 		set "/zone[ .  = 'zone1.com' ]" "zone1.com";
> > 		set "/zone[ . = 'zone1.com' ]/server[ . = '10.1.1.20' ]" "10.1.1.20";
> > 		set "/zone[ . = 'zone1.com' ]/server[ . = '10.1.1.25' ]" "10.1.1.25"
> > 	 = "zone1.com=10.1.1.20,10.1.1.25"
> 
> The tree you get here is actually
> 
>         { }
>         { "zone" = "zone1.com" { ... } }

Forgot ot mention: since this was so hard to figure out, I added a
'print_tree' builtin (commit 9d369e01), so that you can say in your put
tests

        test  Pdnsr_forward_zones.lns put empty  after
                        set "/zone[ .  = 'zone1.com' ]" "zone1.com";
                        set "/zone[ . = 'zone1.com' ]/server[ . = '10.1.1.20' ]" "10.1.1.20";
                        set "/zone[ . = 'zone1.com' ]/server[ . = '10.1.1.25' ]" "10.1.1.25";
        	        preint_tree
                 = "zone1.com=10.1.1.20,10.1.1.25"

to see what your lens actually operates on.

David





More information about the augeas-devel mailing list