Subject: Re: [yang-doctors] IEEE YANG module validation and YANG doctor review

From: Benoit Claise <[email-masked]>
Date: Wed, 15 Feb 2017 10:22:17 +0100

Thanks Mark,

[copying the YANG doctors as it might be of general interest]

I basically investigated the first YANG module at 
http://www.claise.be/IEEEStandardYANGPageCompilation.html
 From the page first line, you can see where those YANG modules come 
from: https://github.com/YangModels/yang/tree/master/standard/ieee
Note that I also compile 
http://www.claise.be/IEEEExperimentalYANGPageCompilation.html

All info at http://www.claise.be/2016/07/ietf-yang-modules-statistiques/

    IEEE (updated daily)

      * All_YANG data modules for PAR-related projects_
        <http://www.claise.be/IEEEStandardYANGPageCompilation.html>,
        with compilation errors
      * All _YANG data modules for non PAR-related projects_
        <http://www.claise.be/IEEEExperimentalYANGPageCompilation.html>,
        with compilation errors

And at http://www.claise.be/YANGPageMain.html

  * IEEEStandard YANG MODELS
  * Number of YANG data models from IEEEStandard that passed
    compilation: 2/8
  * Number of YANG data models from IEEEStandard that passed compilation
    with warnings: 0/8
  * Number of YANG data models from IEEEStandard that failed
    compilation: 6/8

  * Generated on 15/02/2017 by Benoit Claise

  * IEEEExperimental YANG MODELS
  * Number of YANG data models from IEEEExperimental that passed
    compilation: 1/5
  * Number of YANG data models from IEEEExperimental that passed
    compilation with warnings: 0/5
  * Number of YANG data models from IEEEExperimental that failed
    compilation: 4/5

  * Generated on 15/02/2017 by Benoit Claise

regarding the specific modules mentioned below:
     ieee802-types.yang => PASSED
     ieee802-dot1q-types.yang => PASSED
     ieee802-dot1q-bridge.yang => FAILED
     ieee802-dot1q-tpmr.yang => FAILED
     ieee802-dot1q-vlan-bridge.yang => FAILED
     ieee802-dot1q-pb.yang => FAILED
     Ieee802-dot1x.yang => FAILED

I understand that you ask the YANG doctors to review the following YANG 
modules
These ones are part of the P802.1Qcp project:

+--> standard

|    +--> 802.1

|    |     +--> draft

|    |          +--> ieee-dot1q-bridge.yang

|    |          +--> ieee-dot1q-pb.yang

|    |          +--> ieee-dot1q-tpmr.yang

|    |          +--> ieee-dot1q-types.yang

|    |          +--> ieee-dot1q-vlan-bridge.yang

   This is the P802.1Xck project:

+--> standard

|    +--> 802.1

|    |     +--> draft

|    |          +--> ieee-dot1x.yang

It makes sense to resolve the validation errors before Jürgen starts his 
YANG doctor review.
The best way is to post the new YANG modules in github. From there, I'll 
run my scripts.

Regards, Benoit
> Hi Benoit and all,
> Thanks for this. I would like to  provide a bit of clarity on the YANG 
> modules that are a part of the current IEEE 802.1 YANG active projects 
> (i.e., 802.1Qcp and 802.1Xck).
> _General IEEE 802 Types_
> *i**eee802-types.yang* - Generic IEEE 802 type definitions
> _IEEE 802.1 Types_
> *i**eee802-dot1q-types.yang* - IEEE 802.1 type specific definitions
> _IEEE 802.1Qcp____(Bridges and Bridged Networks – Amendment: YANG Data 
> Model)_
> *i**eee802-dot1q-bridge.yang* - Main IEEE 802.1Q bridging YANG modules 
> which is augmented by specific bridge models. The general structure is 
> shown below.
>
> *i**eee802-dot1q-tpmr.yang* - Two Port MAC Relay Bridge YANG module
> *i**eee802-dot1q-vlan-bridge.yang* - Customer VLAN Bridge YANG module
> *i**eee802-dot1q-pb.yang* - Provider Bridge YANG module
> _IEEE __802.1Xck __(Port-Based Network Access Control __- __Amendment 
> 2: YANG Data Model)_
> *Ieee802-dot1x.yang* - IEEE 802.1X (Port-based network access control) 
> YANG module
> The *ieee80**2-dot1ax.yang* module is _not_ currently in scope. That 
> being said however, yes, I do need to make the changes to this module 
> over time. It is still very draft, and not ready for “prime time” yet.
> Regards,
> Marc.
> *From:* Benoit Claise [mailto:[email-masked]]
> *Sent:* Tuesday, February 14, 2017 6:43 AM
> *To:* Juergen Schoenwaelder <[email-masked]>; 
> Janos Farkas <[email-masked]>
> *Cc:* Dan Romascanu <[email-masked]>; Mehmet <[email-masked]>; 
> Holness, Marc <[email-masked]>; Martin Bjorklund <[email-masked]>; 
> Andy Bierman <[email-masked]>; [email-masked]; Benoit Claise 
> <[email-masked]>; John Messenger <[email-masked]>
> *Subject:* IEEE YANG module validation and YANG doctor review (was: 
> Re: [802.1 - 12074] Working Group ballot of P802.1Qcp/D1.0 - Bridges 
> and Bridged Networks — Amendment: YANG Data Model
> Dear all,
>
> _http://www.claise.be/IEEEStandardYANGPageCompilation.html_ is now fixed.
>
> I looked at the first YANG module: ieee802-dot1ax.yang, which fails 
> validation for 3 validators out of 4. Pyang is the exception, but 
> pyang doesn't have a xpath validation for now.
>
> For example, in yangdump-pro, it shows:
> *** Generated by yangdump-pro 16.10-4
> *** Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.
> *** Copyright (c) 2012-2017, YumaWorks, Inc., All Rights Reserved.
>
> Warning: no child node 'ietf-interfaces:type' found for parent 
> 'yuma-ncx:root'
> XPath: /if:type = 'ianaif:ieee8023adLag' or
> /if:type = 'ianaif:ethernetCsmacd' or
> /if:type = 'ianaif:bridge'
> ieee802-dot1ax.yang:87.11: warning(1032): no child node available
>
> Warning: no child node 'ietf-interfaces:type' found for parent 
> 'yuma-ncx:root'
> XPath: /if:type = 'ianaif:ieee8023adLag' or
> /if:type = 'ianaif:ethernetCsmacd' or
> /if:type = 'ianaif:bridge'
> ieee802-dot1ax.yang:87.47: warning(1032): no child node available
>
> Warning: no child node 'ietf-interfaces:type' found for parent 
> 'yuma-ncx:root'
> XPath: /if:type = 'ianaif:ieee8023adLag' or
> /if:type = 'ianaif:ethernetCsmacd' or
> /if:type = 'ianaif:bridge'
> ieee802-dot1ax.yang:87.84: warning(1032): no child node available
>
> Warning: no child node 'ietf-interfaces:type' found for parent 
> 'yuma-ncx:root'
> XPath: /if:type = 'ianaif:ieee8023adLag' or
> /if:type = 'ianaif:ethernetCsmacd' or
> /if:type = 'ianaif:bridge'
> ieee802-dot1ax.yang:187.11: warning(1032): no child node available
>
> Warning: no child node 'ietf-interfaces:type' found for parent 
> 'yuma-ncx:root'
> XPath: /if:type = 'ianaif:ieee8023adLag' or
> /if:type = 'ianaif:ethernetCsmacd' or
> /if:type = 'ianaif:bridge'
> ieee802-dot1ax.yang:187.47: warning(1032): no child node available
>
> Warning: no child node 'ietf-interfaces:type' found for parent 
> 'yuma-ncx:root'
> XPath: /if:type = 'ianaif:ieee8023adLag' or
> /if:type = 'ianaif:ethernetCsmacd' or
> /if:type = 'ianaif:bridge'
> ieee802-dot1ax.yang:187.84: warning(1032): no child node available
>
> Warning: no child node 'ietf-interfaces:type' found for parent 
> 'yuma-ncx:root'
> XPath: /if:type = 'ianaif:ethernetCsmacd' or
> /if:type = 'ianaif:bridge'
> ieee802-dot1ax.yang:529.11: warning(1032): no child node available
>
> Warning: no child node 'ietf-interfaces:type' found for parent 
> 'yuma-ncx:root'
> XPath: /if:type = 'ianaif:ethernetCsmacd' or
> /if:type = 'ianaif:bridge'
> ieee802-dot1ax.yang:529.48: warning(1032): no child node available
>
> Warning: no child node 'ietf-interfaces:type' found for parent 
> 'yuma-ncx:root'
> XPath: /if:type = 'ianaif:ethernetCsmacd' or
> /if:type = 'ianaif:bridge'
> ieee802-dot1ax.yang:757.11: warning(1032): no child node available
>
> Warning: no child node 'ietf-interfaces:type' found for parent 
> 'yuma-ncx:root'
> XPath: /if:type = 'ianaif:ethernetCsmacd' or
> /if:type = 'ianaif:bridge'
> ieee802-dot1ax.yang:757.48: warning(1032): no child node available
>
> Warning: Module 'iana-if-type' not used
> ieee802-dot1ax.yang:9.3: warning(1015): import not used
>
> ***
> *** 0 Errors, 11 Warnings
> The issue is (mutltiple times the same issue btw).
> OLD:
>   augment "/if:interfaces/if:interface" {
>     when "/if:type = 'ianaif:ieee8023adLag' or
>           /if:type = 'ianaif:ethernetCsmacd' or
>           /if:type = 'ianaif:bridge'" {
>       description
>         "Applies to Ethernet interfaces or Bridge Ports.";
>       }
>
> NEW:
>   augment "/if:interfaces/if:interface" {
>     when "/if:interfaces/if:interface/if:type = 'ianaif:ieee8023adLag' or
>           /if:interfaces/if:interface/if:type = 'ianaif:ethernetCsmacd' or
>           /if:interfaces/if:interface/if:type = 'ianaif:bridge'" {
>       description
>         "Applies to Ethernet interfaces or Bridge Ports.";
>       }
>
> I'll surely stand corrected by the YANG doctors if this is not the issue.
>
> Attached is a working copy of the YANG model, which passes yangdumpro 
> and confdc.
> There is a warning with yanglint (Radek is copied).
>
> yanglint -V -p /home/bclaise/yang/modules/ ieee802-dot1ax.yang
> warn: Schema node "ietf-interfaces:interfaces-state" not found 
> (/ietf-interfaces:interfaces-state).
> warn: Resolving when condition 
> "/ietf-interfaces:interfaces-state/ietf-interfaces:interface/ietf-interfaces:type 
> = 'iana-if-type:ethernetCsmacd' or
> /ietf-interfaces:interfaces-state/ietf-interfaces:interface/ietf-interfaces:type 
> = 'iana-if-type:bridge'" failed. 
> (/ieee802-dot1ax:/ietf-interfaces:interfaces/ietf-interfaces:interface)
>
> As Jürgenmentioned, I propose that IEEE fixes the errors/warnings seen 
> at _http://www.claise.be/IEEEStandardYANGPageCompilation.html_ before 
> we proceed with the YANG doctor review.
> A very quick look through the rest of the errors tends to show the 
> same error type.
>
> Regards, Benoit
> On 2/14/2017 11:29 AM, Benoit Claise wrote:
> On 2/14/2017 11:20 AM, Juergen Schoenwaelder wrote:
> On Tue, Feb 14, 2017 at 09:54:31AM +0000, Janos Farkas wrote:
> ps:
> This is the P802.1Xck project:
>       +--> standard
>       |    +--> 802.1
>       |    |     +--> draft
>       |    |          +--> ieee-dot1x.yang
>
>
> The P802.1Xck WG ballot closes tomorrow.
> So what does that ballot closing event tell me? Where exactly do I
> find the YANG modules that have been used in the .pdf file? By when do
> you need a review? Did Benoit run his tools on the correct documents
> or not?
> Janos,
>
> _http://www.claise.be/IEEEStandardYANGPageCompilation.html_
> Note that I made some changes this morning and screwed up a few things.
> That leads to some compilation issues.
> Let me solve this first.
>
> Regards, B.
>
> Regards, Benoit
> If so, perhaps it makes sense to fix the compilation issues
> before I do my review, no?
>
> /js
>
> .

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Wed, 15 Feb 2017 18:11:17 +0100

On Wed, Feb 15, 2017 at 04:33:36PM +0000, Holness, Marc wrote:
> 
> Thanks Benoit.
> 
> It seems all the warnings are the same. Based upon the guidance provided in the thread below, it seems I should change all occurrences of the form ...
> 
> ... to something like what is shown below.
> 
> Is this correct?

No, this is not correct. See Martin's answer. The correct fix is to
replace /if:type with if:type in the when expression:
 
augment "/if:interfaces/if:interface" {
    when "if:type = 'ianaif:ieee8023adLag' or
                 if:type = 'ianaif:ethernetCsmacd' or
                 if:type = 'ianaif:bridge'" {
      description
        "Applies to Ethernet interfaces or Bridge Ports.";
      }

> BTW ... The examples shown in RFC6020, section 7.15.3 "Usage Example" and RFC 7950, section 7.17.3 "Usage Example" seems to be misleading. Am I misinterpreting things?
> 
> import interface-module {
>   prefix "if";
> }
> 
> augment "/if:interfaces/if:ifEntry" {
>   when "if:ifType='ds0'";
>     leaf ds0ChannelNumber {
>       type ChannelNumber;
>     }
> }
> 

These examples are fine. The problem is that you were not following
them closely enough. ;-)

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: "Holness, Marc" <[email-masked]>
Date: Wed, 15 Feb 2017 17:15:57 +0000

Ahhh ... I see. Sorry about that. 

Thanks! I'm making the changes now.

Marc.

-----Original Message-----
From: Juergen Schoenwaelder [mailto:[email-masked]] 
Sent: Wednesday, February 15, 2017 12:11 PM
To: Holness, Marc <[email-masked]>
Cc: Benoit Claise <[email-masked]>; Janos Farkas <[email-masked]>; Dan Romascanu <[email-masked]>; Mehmet <[email-masked]>; Martin Bjorklund <[email-masked]>; Andy Bierman <[email-masked]>; [email-masked]; John Messenger <[email-masked]>; YANG Doctors <[email-masked]>
Subject: Re: IEEE YANG module validation and YANG doctor review

>         "Applies to Ethernet interfaces or Bridge Ports.";

No, this is not correct. See Martin's answer. The correct fix is to replace /if:type with if:type in the when expression:

> augment "/if:interfaces/if:ifEntry" {

These examples are fine. The problem is that you were not following them closely enough. ;-)

/js

---

From: "Holness, Marc" <[email-masked]>
Date: Wed, 15 Feb 2017 16:33:36 +0000

Thanks Benoit.

Is this correct?

Regards,

Marc.

From: Benoit Claise [mailto:[email-masked]]
Sent: Wednesday, February 15, 2017 4:22 AM
To: Holness, Marc <[email-masked]>; Juergen Schoenwaelder <[email-masked]>; Janos Farkas <[email-masked]>
Cc: Dan Romascanu <[email-masked]>; Mehmet <[email-masked]>; Martin Bjorklund <[email-masked]>; Andy Bierman <[email-masked]>; [email-masked]; John Messenger <[email-masked]>; YANG Doctors <[email-masked]>
Subject: Re: IEEE YANG module validation and YANG doctor review

Thanks Mark,

I basically investigated the first YANG module at http://www.claise.be/IEEEStandardYANGPageCompilation.html
>From the page first line, you can see where those YANG modules come from: https://github.com/YangModels/yang/tree/master/standard/ieee
Note that I also compile http://www.claise.be/IEEEExperimentalYANGPageCompilation.html

  *   All YANG data modules for PAR-related projects<http://www.claise.be/IEEEStandardYANGPageCompilation.html>, with compilation errors
  *   All YANG data modules for non PAR-related projects<http://www.claise.be/IEEEExperimentalYANGPageCompilation.html>, with compilation errors

  *   IEEEStandard YANG MODELS
  *   Number of YANG data models from IEEEStandard that passed compilation: 2/8
  *   Number of YANG data models from IEEEStandard that passed compilation with warnings: 0/8
  *   Number of YANG data models from IEEEStandard that failed compilation: 6/8

  *   IEEEExperimental YANG MODELS
  *   Number of YANG data models from IEEEExperimental that passed compilation: 1/5
  *   Number of YANG data models from IEEEExperimental that passed compilation with warnings: 0/5
  *   Number of YANG data models from IEEEExperimental that failed compilation: 4/5

I understand that you ask the YANG doctors to review the following YANG modules

It makes sense to resolve the validation errors before Jürgen starts his YANG doctor review.
The best way is to post the new YANG modules in github. From there, I'll run my scripts.

Regards, Benoit

Hi Benoit and all,

Thanks for this. I would like to  provide a bit of clarity on the YANG modules that are a part of the current IEEE 802.1 YANG active projects (i.e., 802.1Qcp and 802.1Xck).

General IEEE 802 Types

ieee802-types.yang  - Generic IEEE 802 type definitions

IEEE 802.1 Types

ieee802-dot1q-types.yang - IEEE 802.1 type specific definitions

IEEE 802.1Qcp (Bridges and Bridged Networks - Amendment: YANG Data Model)

ieee802-dot1q-bridge.yang - Main IEEE 802.1Q bridging YANG modules which is augmented by specific bridge models. The general structure is shown below.

ieee802-dot1q-tpmr.yang - Two Port MAC Relay Bridge YANG module
ieee802-dot1q-vlan-bridge.yang - Customer VLAN Bridge YANG module
ieee802-dot1q-pb.yang  - Provider Bridge YANG module

IEEE 802.1Xck (Port-Based Network Access Control - Amendment 2: YANG Data Model)

Ieee802-dot1x.yang - IEEE 802.1X (Port-based network access control) YANG module

The ieee802-dot1ax.yang module is not currently in scope. That being said however, yes, I do need to make the changes to this module over time. It is still very draft, and not ready for "prime time" yet.

Regards,

Marc.

From: Benoit Claise [mailto:[email-masked]]
Sent: Tuesday, February 14, 2017 6:43 AM
To: Juergen Schoenwaelder <[email-masked]><mailto:[email-masked]>; Janos Farkas <[email-masked]><mailto:[email-masked]>
Cc: Dan Romascanu <[email-masked]><mailto:[email-masked]>; Mehmet <[email-masked]><mailto:[email-masked]>; Holness, Marc <[email-masked]><mailto:[email-masked]>; Martin Bjorklund <[email-masked]><mailto:[email-masked]>; Andy Bierman <[email-masked]><mailto:[email-masked]>; [email-masked]<mailto:[email-masked]>; Benoit Claise <[email-masked]><mailto:[email-masked]>; John Messenger <[email-masked]><mailto:[email-masked]>
Subject: IEEE YANG module validation and YANG doctor review (was: Re: [802.1 - 12074] Working Group ballot of P802.1Qcp/D1.0 - Bridges and Bridged Networks - Amendment: YANG Data Model

Dear all,

http://www.claise.be/IEEEStandardYANGPageCompilation.html  is now fixed.

I looked at the first YANG module: ieee802-dot1ax.yang, which fails validation for 3 validators out of 4. Pyang is the exception, but pyang doesn't have a xpath validation for now.

Warning: no child node 'ietf-interfaces:type' found for parent 'yuma-ncx:root'

Warning: no child node 'ietf-interfaces:type' found for parent 'yuma-ncx:root'

Warning: no child node 'ietf-interfaces:type' found for parent 'yuma-ncx:root'

Warning: no child node 'ietf-interfaces:type' found for parent 'yuma-ncx:root'

Warning: no child node 'ietf-interfaces:type' found for parent 'yuma-ncx:root'

Warning: no child node 'ietf-interfaces:type' found for parent 'yuma-ncx:root'

Warning: no child node 'ietf-interfaces:type' found for parent 'yuma-ncx:root'
XPath: /if:type = 'ianaif:ethernetCsmacd' or
/if:type = 'ianaif:bridge'
ieee802-dot1ax.yang:529.11: warning(1032): no child node available

Warning: no child node 'ietf-interfaces:type' found for parent 'yuma-ncx:root'
XPath: /if:type = 'ianaif:ethernetCsmacd' or
/if:type = 'ianaif:bridge'
ieee802-dot1ax.yang:529.48: warning(1032): no child node available

Warning: no child node 'ietf-interfaces:type' found for parent 'yuma-ncx:root'
XPath: /if:type = 'ianaif:ethernetCsmacd' or
/if:type = 'ianaif:bridge'
ieee802-dot1ax.yang:757.11: warning(1032): no child node available

Warning: no child node 'ietf-interfaces:type' found for parent 'yuma-ncx:root'
XPath: /if:type = 'ianaif:ethernetCsmacd' or
/if:type = 'ianaif:bridge'
ieee802-dot1ax.yang:757.48: warning(1032): no child node available

***

NEW:

Attached is a working copy of the YANG model, which passes yangdumpro and confdc.
There is a warning with yanglint (Radek is copied).

yanglint -V -p /home/bclaise/yang/modules/ ieee802-dot1ax.yang
warn: Schema node "ietf-interfaces:interfaces-state" not found (/ietf-interfaces:interfaces-state).
warn: Resolving when condition "/ietf-interfaces:interfaces-state/ietf-interfaces:interface/ietf-interfaces:type = 'iana-if-type:ethernetCsmacd' or
/ietf-interfaces:interfaces-state/ietf-interfaces:interface/ietf-interfaces:type = 'iana-if-type:bridge'" failed. (/ieee802-dot1ax:/ietf-interfaces:interfaces/ietf-interfaces:interface)

As Jürgenmentioned, I propose that IEEE fixes the errors/warnings seen at http://www.claise.be/IEEEStandardYANGPageCompilation.html before we proceed with the YANG doctor review.
A very quick look through the rest of the errors tends to show the same error type.

Regards, Benoit

Regards, B.

Regards, Benoit

/js

.