[luci] Luci CBI

Conor O'Gorman i at conorogorman.net
Wed Jan 16 19:51:37 CET 2013


On Wed, 2013-01-16 at 18:45 +0000, Conor O'Gorman wrote:
> On Wed, 2013-01-16 at 19:25 +0100, Marcos Lois Bermúdez wrote:
> > But will be posible to CBI to use other format for particular modules, 
> > my goal is to parse / generate diferent formats per service, this will 
> > for example allow me parse some service config files that are broken in 
> > multiple files, and allow me to update this files manually, and Luci 
> > will se the changes without need to exec another program to translate 
> > between formats.
> > 
> > I don't know if it's posible or break the CBI purpose.
> 
> You would need to make significant changes, judging by what you say. But
> all the code is there, and it's a reasonable OO design.
> Whether you need to adjust the CBI classes, or the backend UCI classes I
> cannot say, sounds more like the UCI lua classes backend, and that's
> just from a rough knowledge of the structure. It will need reasonable
> Lua skills.
> 

The UCI c code also has some sort of plugin structure that could I think
handle alternative formats. That might be closer to what you need. But
then I don't know how it would decide which format it should be using.
Maybe a bit too awkward.

Conor





More information about the luci mailing list