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 ?
Thanks for your help
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel