Subject: [i2rs] Errors in ietf-i2rs-rib module

From: Ladislav Lhotka <[email-masked]>
Date: Mon, 09 Nov 2015 14:32:02 +0100

Hi,

I checked the module ietf-i2rs-rib.yang with pyang and it generates a
pretty long list of errors. The problem seems to be in all cases that
the module defines the same data nodes in multiple cases of a choice.

For example, grouping "tunnel-encap" contains this (schematically):

choice tunnel-type {
  case ipv4 {
    uses ipv4-header;
  }
  case nvgre {
    choice nvgre-type {
      case ipv4 {
        uses ipv4-header;
      }
      ...
    }
  }
  ...
}

So the same data nodes defined by the "ipv4-header" grouping appear in
both "ipv4" and "nvgre/ipv4" cases, which is not possible in YANG.

One remedy could be to encapsulate the individual cases in specific
containers.

Lada

-------------------- Start of forwarded message --------------------
From: [email-masked]
To: <[email-masked]>
Date: Sun, 01 Nov 2015 22:39:20 -0800
Cc: [email-masked]
Subject: [i2rs] I-D Action: draft-ietf-i2rs-rib-data-model-03.txt

A New Internet-Draft is available from the on-line Internet-Drafts directories.
 This draft is a work item of the Interface to the Routing System Working Group of the IETF.

        Title           : A YANG Data Model for Routing Information Base (RIB)
        Authors         : Lixing Wang
                          Hariharan Ananthakrishnan
                          Mach(Guoyi) Chen
                          Amit Dass
                          Sriganesh Kini
                          Nitin Bahadur
	Filename        : draft-ietf-i2rs-rib-data-model-03.txt
	Pages           : 61
	Date            : 2015-11-01

Abstract:
   This document defines a YANG data model for Routing Information Base
   (RIB) that aligns with the I2RS RIB information model.

The IETF datatracker status page for this draft is:
https://datatracker.ietf.org/doc/draft-ietf-i2rs-rib-data-model/

There's also a htmlized version available at:
https://tools.ietf.org/html/draft-ietf-i2rs-rib-data-model-03

A diff from the previous version is available at:
https://www.ietf.org/rfcdiff?url2=draft-ietf-i2rs-rib-data-model-03

Please note that it may take a couple of minutes from the time of submission
until the htmlized version and diff are available at tools.ietf.org.

Internet-Drafts are also available by anonymous FTP at:
ftp://ftp.ietf.org/internet-drafts/

_______________________________________________
i2rs mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/i2rs
-------------------- End of forwarded message --------------------

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C

---

From: Mach Chen <[email-masked]>
Date: Tue, 10 Nov 2015 06:41:51 +0000

Hi Lada,

Thanks for checking the module! 

I used the pyang-1.4.1 in the past and found no error. I just changed to use pyang-1.6 and indeed found a lot of errors. I have addressed them that will be reflected in the next revision. 

Best regards,
Mach

> -----Original Message-----
> From: i2rs [mailto:[email-masked]] On Behalf Of Ladislav Lhotka
> Sent: Monday, November 09, 2015 9:32 PM
> To: [email-masked]
> Subject: [i2rs] Errors in ietf-i2rs-rib module
> 
> Hi,
> 
> I checked the module ietf-i2rs-rib.yang with pyang and it generates a pretty
> long list of errors. The problem seems to be in all cases that the module defines
> the same data nodes in multiple cases of a choice.
> 
> So the same data nodes defined by the "ipv4-header" grouping appear in both
> "ipv4" and "nvgre/ipv4" cases, which is not possible in YANG.
> 
> One remedy could be to encapsulate the individual cases in specific containers.
> 
> Lada
>