On Wed, 2008-09-10 at 21:29 +0200, Dominique Dumont wrote:
> David Lutterkort <[EMAIL PROTECTED]> writes:
> 
> > The intent is that you can ignore the index for AcceptEnv, so that you
> > can say
> >
> >         get /files/etc/ssh/sshd_config/AcceptEnv/3 => "LC_ADDRESS"
> >         
> > But that seems to be broken currently [1] .. similarly, you should
> > be able to say
> >
> >         set /files/etc/ssh/sshd_config/AcceptEnv/42 "FOO"
> >         
> > and have the node '42' be added as a child of
> > /files/etc/ssh/sshd_config/AcceptEnv[1], but that is also broken
> > [2].
> >
> > Does that address the needs of Config::Model ?
> 
> Almost ! :-)
> 
> The problem is that for a list, 2 syntax must be used with Augeas API:
> - Foo[1] for regular list of lenses
> - Foo/1 for lenses containing 'seq'
> 
> For Config::Model to decide which notation to use, the specification
> of the lenses must be known: Use "Foo[1]" for standard lens, and use
> "Foo/1" for lenses containing a seq lens.
> 
> That's why I thought about masking the 1st index ("[1]") and use the
> 2nd index ("/2") with the square brackets syntax (I.e. "[2]")
> 
> This would completely hide from the API user the implementation detail
> relative to "seq" usage in the lens specification.
> 
> Is this possible ?

No, I can't think of a way to do that that wouldn't be a terrible
hack(tm). I am still confused about how Config::Model stores information
about what the user is allowed to enter: don't you need to specify at
some point that 'X11Forwarding' can only be listed once, but 'AcceptEnv'
multiple times ? And couldn't you add to that specification some
metadata that helps you decide where to put that data in the Augeas
tree ?

David


_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to