Thank you for very much for the reply.
Jan Lindblad <[email protected]> wrote:
> I had a look at your test example. The example is invalid, but pyang
> fails to detect the error and overwrites some internal structures, with
> the result below. The root cause of the problem is this:
...
> Each one of the two uses statement brings in a "container voucher"
> (with partly different content) at this point in the schema. That is an
> attempt at a duplicate definition of voucher, which is an error.
okay, so it partly works, which is an error, and I'll see if I can make that
into a test case for pyang.
BUT:
The goal is exactly to be able to combine two extensions to RFC8366 into a
new module that has both extensions. Is there another way to do this?
Puting them into two containers does not accomplish the goal, because now you
have two expires-on, ...
> Pyang
> misses this, and overwrites one voucher object with the next, losing
> some of the content.
> By placing the two uses statements into separate containers, pyang is
> able to successfully make a tree:
...
> Normally in YANG, it wouldn't be hard to to let modules "B" and "C"
> augment module "A" independently. But here you are working with
> groupings in such a way that both "B" and "C" build up a complete
> grouping with everything in "A". When "D" tries to use both "B" and
> "C", there is inevitably unwanted duplication.
> If instead, "B" and "C"
> just defined their little contributions, "D" could import groupings
> from "A", "B" and "C" and compose them as desired.
The reason I am asking this question now, and proposing this example now, is
so that if there is a better way to build "B" and "C" then we need to know
about that *now*
I see that you have proposed a different way, which I will attempt to work
through. Fortunately, we still have time to fix some things.
_______________________________________________
Anima mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/anima