[augeas-devel] Re: [config-model-users] Semantic problem in augeas sshd lens ?
Dominique Dumont
dominique.dumont at hp.com
Thu Aug 28 10:20:20 UTC 2008
David Lutterkort <dlutter at redhat.com> writes:
>> 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 ?
I've indeed thought about generating a UI from Augeas lenses but too
many informations are missing from Augeas lenses to provide a usable
GUI.
On the other hand, the current way of reading and writing through
Augeas is completely generic. The structure of Config::Model model is
used to generate Augeas "set" command. But, from what I've understood
of lenses, a Config::Model list can be represented in Augeas as a
"seq-like" list or a "multiple node" like list. Theses 2 lists have
different syntaxes in Augeas set command: "foo/0/" and "foo[0]".
So I need to resolve this ambiguity when writing Config::Model lists
into Augeas.
> 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 ?
I'd rather have a small call to Augeas to get some more informations
out of some Augeas nodes.
Aynway, I need to dig more the lenses doc to better understand the
differences between the "seq-like" list and the "multiple node" like
list and their intented purpose.
All the best
--
Dominique Dumont
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner
More information about the augeas-devel
mailing list