[augeas-devel] using python-augeas to parse a Httpd-style conf file

Greg Swift gregswift at gmail.com
Wed Nov 20 16:18:28 UTC 2013


https://github.com/hercules-team/python-augeas/blob/master/test/test_augeas.py

The test file is a good example of using the library.

You can specify the lense you want to use to read a file, so you can use
that method to see if it can read that file. There will probably be enough
differences that it will fail...

That being said if they are similar formatting you can use the httpd lense
as a basis for making a lense for tgtd and LIO.

-greg



On Mon, Nov 18, 2013 at 7:44 PM, Andy Grover <agrover at redhat.com> wrote:

> Hi all,
>
> I'm looking to use python-augeas to parse an Apache-style conf file into
> some sort of tree structure, which I can then walk and output in another
> format.
>
> (More info: I'm looking to write a tool to convert configuration for the
> tgtd iscsi target to the LIO iscsi target.)
>
> Any tips for how I could get python-augeas to do this?
>
> Thanks -- Regards -- Andy
>
> _______________________________________________
> augeas-devel mailing list
> augeas-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/augeas-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20131120/74e62f4b/attachment.htm>


More information about the augeas-devel mailing list