[augeas-devel] Re: [config-model-users] Semantic problem in augeas sshd lens ?

David Lutterkort dlutter at redhat.com
Mon Aug 4 18:17:34 UTC 2008


On Sat, 2008-08-02 at 10:20 +0200, Dominique Dumont wrote:
> David Lutterkort <dlutter at redhat.com> writes:
> 
> > It's two different ways of mapping array-like constructs into the tree:
> > lenses can either create multiple nodes with the same label, or use
> > 'seq' to generate labels that are integers taken from a sequence.
> >
> > The reason to use one or the other has to do with subtleties about how
> > whitespace/formatting is preserved, especially when you delete a subtree
> > in the middle of the file. My OLS paper[1] has an explanation of those.
> 
> Understood. The problem I face is to save the content of a
> config-model tree into an augeas tree. config-model model has the
> notion of list but does not distinguish between a "seq-like" list and
> a "multiple node" like list. 
> 
> Is there a way to query Augeas at run-time what kind of list it wants ?

Are you trying to completely drive Config::Model off of metadata ? I
think you'll always need some knowledge about the way a specific file
format is mapped into the tree. How are you planning on generating UI if
it's based solely on metadata ?

In any event, there's no runtime support right now to introspect the
tree schema - it would be fairly easy to generate something like
Relax-NG that describes the tree structure from lens definitions. Would
that help you ?

David





More information about the augeas-devel mailing list