Subject: Re: [netmod] YANG tree diagram uses

From: Benoit Claise <[email-masked]>
Date: Sun, 4 Feb 2018 10:24:03 +0100

Martin, Michal,

Do we need any clarification in the draft?

Regards, B.
> Michal Vaško <[email-masked]> wrote:
>> Hi,
>>
>> we have encountered some problem while implementing a feature from
>> draft-ietf-netmod-yang-tree-diagrams-05, specifically not resolving
>> groupings and printing uses names instead (Section 2.2).
>>
>> We have 2 example models, A and B. A defines a container and a
>> grouping. B defines an augment that adds uses into the container from
>> A and resolves to the grouping from model A.
>>
>> grouping A:g;
>> A:c {
>>    B:uses A:g;
>> }
>>
>> Now, if printing model A with the augment not resolving uses we
>> currently print
>>
>> +--rw c
>>     +---u B:A:g;
> pyang prints this as well, but it is more "by accident".   It looks
> quite odd.
>
> It wouldn't be correct to write
>
>      +---u B:g;
>
> since 'g' isn't defined in B.
>     
> OTOH,
>
>      +---u A:g;
>
> is correct in the sense that "A:g" is the "name of the grouping", and
> that is what the current document says should be printed.  Granted,
> this doesn't show the whole picture, but maybe this is good enough.
>
> It might be wise to not print a grouping like this in order to avoid
> confusion.
>
>
> /martin
>
>
>> since the uses is foreign. We could not decide what the "correct"
>> output should be and it is likely left to various interpretations but
>> we were wondering what some of you think. Should it perhaps be only
>> "B:g" since the grouping becomes local? But what if the grouping would
>> be from a third model, are 2 prefixes okay? Thanks for your opinions.
>>
>> Regards,
>> Michal
>>
>> _______________________________________________
>> netmod mailing list
>> [email-masked]
>> https://www.ietf.org/mailman/listinfo/netmod
>>
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod
> .
>

---

From: Michal Vaško <[email-masked]>
Date: Mon, 05 Feb 2018 14:42:25 +0100

Hi Benoit,
the way I understand it is that the draft tries to mention only the core Tree Diagram characteristics and formatting leaving the details implementation-specific. I was simply asking for another opinion on how to handle an implementation detail, I think the draft fulfils the mentioned purpose just fine.

Regards,
Michal