[augeas-devel] put value failure

Jason Kincl jkincl1 at lsu.edu
Sat Jan 7 00:18:28 UTC 2012


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,

-- 
Jason Kincl
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xymon.aug
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20120106/16efbfe0/attachment.ksh>


More information about the augeas-devel mailing list