Apologies for the follow up but to help clarify my problem I have
attached my test case that fails.

Thanks,

On 01/06/2012 06:18 PM, Jason Kincl wrote:
> Hi,
> 
> I am working on a lens for Xymon (a monitoring solution evolved from
> BigBrother) and I have almost everything working but when I try to put
> values into a new subtree for a page I am running into a failed to match
> exception.
> 
> Basically the page is exactly the same as the page definition found in
> the bbhosts.aug lens that ships with Augeas already. It is:
> page page-name title that extends to end of line
> 
> On a get function my lens picks up the page name and title fine but when
> I create a new page subtree and try to add a title Augeas cannot seem to
> figure out how to add it in. I think this is a problem with the way I am
> storing the value for the title.
> 
> [ label "pagetitle" . Util.del_ws_spc . store /[^ \t][^\n]+/ .
> Util.del_str "\n" ]
> 
> (If this gets mangled in transport it is the same way it is done in the
> bbhost.aug file, and it too has the same put problem.
> 
> My question is, is there a better way to grab a value that may have
> spaces to the end of line character that Augeas can understand when it
> tries to put values back in?
> 
> Attached is a copy of my xymon.aug so far, it could use some comments
> but I hope to submit it for addition into the distribution.
> 
> Thanks,
> 
> 
> 
> 
> _______________________________________________
> augeas-devel mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/augeas-devel

-- 
Jason Kincl

module Test_xymon1 =

  test Xymon.lns put "page page1 page 1 test\n1.1.1.1 host1 #\n"
    after
    set "/page[2]" "page2" ;
    set "/page[2]/directory" "/etc/xymon/pages.d/page2" ;
    set "/page[2]/pagetitle" "page 2 title!"
    = ""


_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to