[augeas-devel] [Augeas] #284: Splunk lens
Augeas
trac at fedorahosted.org
Mon Jun 25 21:28:47 UTC 2012
#284: Splunk lens
-------------------------+--------------------
Reporter: timbrigham | Owner: lutter
Type: defect | Status: new
Priority: minor | Milestone: next
Component: Augeas | Version: 0.8.0
Resolution: | Keywords:
Blocked By: | Blocking:
-------------------------+--------------------
Comment (by raphink):
Thank you for this contribution.
Here are a few notes:
{{{
let entry = [ key IniFile.entry_re . sep . IniFile.sto_to_comment .
(comment|IniFile.eol) ] |
[ key IniFile.entry_re . store // . (comment|IniFile.eol) ]
|
[ key /\![A-Za-z][A-Za-z0-9\._-]+/ . del / / " " . store
/\/[A-Za-z0-9\.\/_-]+/ . (comment|IniFile.eol) ] |
comment
}}}
I understand that you want to support key/value entries, flags and
includes/other statements here. I wouldn't recommend storing empty values
for flags, but instead it is better to not store anything in this case, so
I'd rewrite the first two cases as:
{{{
key IniFile.entry_re . (sep . IniFile.sto_to_comment)? .
(comment|IniFile.eol) ]
}}}
By the way, there is no test for flags in the test file. Maybe it would be
good to make one.
`del / / " "` can be written `Sep.space`.
The comments in lens files are used to generate a documentation using
NaturalDocs. See other lenses such as `keepalived.aug` for examples of how
to write such inline documentation (also in test files, see
`test_keepalived.aug`).
--
Ticket URL: <https://fedorahosted.org/augeas/ticket/284#comment:1>
Augeas <http://augeas.net/>
a configuration API
More information about the augeas-devel
mailing list