[augeas-devel] Help with cobbler lens

Bryan Kearney bkearney at redhat.com
Fri Dec 18 13:45:20 UTC 2009


On 12/17/2009 03:39 PM, David Lutterkort wrote:
> On Thu, 2009-12-17 at 11:24 -0500, Bryan Kearney wrote:
>> I took a first cut at a cobblersettings lens. You can see it at [1]. It
>> is meant to parse cobbler settings files [2] which is a basic YAML 1.0
>> syntax. It parses fine, but I am having issues saving a nested
>> structure.
>
> When I run 'augparse cobblersettings.aug', I get a whole bunch of type
> errors - do you get them, too ? Those need to be fixed first ...


I see them. The error messages are a bit obscure and the lens seemed to 
be working. Is there a FAQ on reading the error messages?

>
>> This is the error I see:
>>
>> augtool>  save
>> Saving failed
>> augtool>  get /augeas/files/etc/cobbler/settings/error/message
>> /augeas/files/etc/cobbler/settings/error/message = Failed to match
>>       { /value/ = /[^\001-\004\t\n
>> #:@]+|\"[^\001-\004\n\"]*\"|'[^\001-\004\n']*'/ }({ /value/ =
>> /[^\001-\004\t\n #:@]+|\"[^\001-\004\n\"]*\"|'[^\001-\004\n']*'/ })*
>>     with tree
>>       { "ksdevice" = "bootif" } { "lang" = "' '" } { "text" = "~" }
>
> What's the changes you made before the save ? Can you send those and/or
> a put test that demonstrates the problem ?


if you put the settings file from [1], or if you have cobbler 
installed.. there is nothing special about this file, you can do the 
folloing from augtool:

augtool> set /files/etc/cobbler/settings/allow_duplicate_hostnames 1
augtool> save
Saving failed
augtool> get /augeas/files/etc/cobbler/settings/
error/  lens    path
augtool> get /augeas/files/etc/cobbler/settings/error/message
/augeas/files/etc/cobbler/settings/error/message = Failed to match
     { /value/ = /[^\001-\004\t\n 
#:@]+|\"[^\001-\004\n\"]*\"|'[^\001-\004\n']*'/ }({ /value/ = 
/[^\001-\004\t\n #:@]+|\"[^\001-\004\n\"]*\"|'[^\001-\004\n']*'/ })*
   with tree
     { "ksdevice" = "bootif" } { "lang" = "' '" } { "text" = "~" }
augtool>


-- bk




More information about the augeas-devel mailing list