Subject: Re: [babel] Éric Vyncke's Discuss on draft-ietf-babel-yang-model-10: (with DISCUSS and COMMENT)

From: Martin Vigoureux <[email-masked]>
Date: Wed, 2 Jun 2021 22:04:01 +0200

Martin, Mahesh,

so what is the conclusion on that?

Thank you
-m

Le 2021-05-19 à 17:18, Mahesh Jethanandani a écrit :
> Hi Martin,
> 
>> On May 18, 2021, at 11:40 PM, Martin Björklund <[email-masked] 
>> <mailto:[email-masked]>> wrote:
>>
>> Hi,
>>
>>>>
>>>> The YANG module does not compile correctly with PYANG, it should be
>>>> easy to fix
>>>> though :-) See:
>>>> https://yangcatalog.org/results/[email-masked]
>>>> Or is it a PYANG error ?
>>>
>>> This is a tooling error (even though I have gone ahead and changed it
>>> in the model). The ABNF grammar says the following for identity-stmt
>>> in RFC 7950.
>>>
>>>   identity-stmt       = identity-keyword sep identifier-arg-str optsep
>>>                         (";" /
>>>                          "{" stmtsep
>>>                              ;; these stmts can appear in any order
>>>                              *if-feature-stmt
>>>                              *base-stmt
>>>                              [status-stmt]
>>>                              [description-stmt]
>>>                              [reference-stmt]
>>>                          "}") stmtsep
>>>
>>> According to it, the ‘if-feature’ and ‘base-stmt’ can appear in any
>>> order. But for some reason pyang version 2.4.0 insists on a particular
>>> order. I will bring this up with tooling folks.
>>
>> This is not a tooling error.  The error message is:
>>
>> [email-masked] <mailto:[email-masked]>:148: 
>> error: keyword "if-feature" not in
>>    canonical order (see RFC 6020, Section 12)
>>
>> [side note: the RFC ref in this error message should be updated to RFC
>> 7950 Section 14]
>>
>> The referenced section says:
>>
>>   The ABNF grammar [RFC5234] [RFC7405] defines the canonical order.
>>
>> When we publish YANG models in RFCs we use the canonical order in
>> order to have a consistent format.  pyang checks this when the flag
>> --ietf is used.
> 
> I am trying to understand, and this is more for my education, what rule 
> within the grammar is determining the canonical order?
> 
> Also, should pyang report this as an error, or maybe a warning might be 
> better? After all, this is being done for consistency reasons.
> 
>>
>>
>> /martin
>>
>>
>>
>>>
>>>>
>>>>
>>>>
>>> ----------------------------------------------------------------------
>>>> COMMENT:
>>>>
>>> ----------------------------------------------------------------------
>>>>
>>>> == COMMENTS ==
>>>>
>>>> The related links on should be updated. E.g., the YANG catalog entry
>>>> should be:
>>>> https://www.yangcatalog.org/yang-search/module_details.php?module=ietf-babel@2021-05-12
>>>>
>>>> -- Section 2.2 --
>>>> I usually use the expanded tree view rather the YANG module itself to
>>>> get a
>>>> global view. Is there any reason why the full tree view is not
>>>> included?
>>>
>>> Added this to the Appendix.
>>>
>>>>
>>>> -- Section 5 --
>>>> Is there any reason why the doc shepherd is not acknowledged ?
>>>>
>>>> == NITS ==
>>>>
>>>> -- Section 2.3 --
>>>> s/MAC based security/MAC-based security/ ?
>>>
>>> Fixed.
>>>
>>> Thanks.
>>>
>>> Mahesh Jethanandani
>>> [email-masked] <mailto:[email-masked]>
> 
> Mahesh Jethanandani
> [email-masked] <mailto:[email-masked]>
> 
> 
> 
> 
>

---

From: Mahesh Jethanandani <[email-masked]>
Date: Wed, 2 Jun 2021 13:20:50 -0700

Hi Martin V,

I have modified the model to comply with the strict checking that Martin B suggests.

Thanks.

> On Jun 2, 2021, at 1:04 PM, Martin Vigoureux <[email-masked]> wrote:
> 
> Martin, Mahesh,
> 
>>> On May 18, 2021, at 11:40 PM, Martin Björklund <[email-masked] <mailto:[email-masked]>> wrote:
>>> 
>>> Hi,
>>> 
>>>>> 
>>> [email-masked] <mailto:[email-masked]>:148: error: keyword "if-feature" not in
>> I am trying to understand, and this is more for my education, what rule within the grammar is determining the canonical order?
>> Also, should pyang report this as an error, or maybe a warning might be better? After all, this is being done for consistency reasons.
>>> 
>>> 
>>> /martin
>>> 
>>> 
>>> 
>>>> 
>>>>> 
>>>>> 
>>>>> 

Mahesh Jethanandani
[email-masked]