[i2rs] YANG data models in I2RS: extraction and compilation feedback

Benoit Claise <bclaise@cisco.com> Mon, 30 November 2015 13:31 UTC

Return-Path: <bclaise@cisco.com>
X-Original-To: i2rs@ietfa.amsl.com
Delivered-To: i2rs@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D391B1ACD02; Mon, 30 Nov 2015 05:31:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.51
X-Spam-Level:
X-Spam-Status: No, score=-14.51 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id reNf5g5Utuxf; Mon, 30 Nov 2015 05:31:53 -0800 (PST)
Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9267E1ACCF9; Mon, 30 Nov 2015 05:31:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=17041; q=dns/txt; s=iport; t=1448890312; x=1450099912; h=to:cc:from:subject:message-id:date:mime-version; bh=vFcJhXo8/pb/tTIFwI72hH9mpHayvf36OIpXUqEvMq8=; b=QgBjbkattW1qi+PvJ9WGsBF12JeRxXl/svFf2n5MEoLwyKwzDW0Zqu0G 5u1TMgw6ett60QwCidGnc9K8BWCJD93HdLHbwtmhWmLyGemrlwXr1PGA2 b5GB0G3RUXi56ywgFAmEyD2yb6sHbyThFq32JwzwPr92/9YJNSA9wo8p7 c=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CqBABBTlxW/xbLJq1ehA5vvBSEDiOFbIF8AQEBAQEBgQALhDcnVQE8FgsCCwMCAQIBSw0GAgEBFogUDak5kCwBAQEBAQUBAQEBAQEBARuGVIoGgm2BRAWNIoVNg2iFKogOgVtJhnyPT4NyY4IRHYFXPTQBhXABAQE
X-IronPort-AV: E=Sophos;i="5.20,364,1444694400"; d="scan'208,217";a="608621987"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Nov 2015 13:31:49 +0000
Received: from [10.60.67.93] (ams-bclaise-89112.cisco.com [10.60.67.93]) by aer-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id tAUDVnGI020691; Mon, 30 Nov 2015 13:31:49 GMT
To: "i2rs@ietf.org" <i2rs@ietf.org>
From: Benoit Claise <bclaise@cisco.com>
Message-ID: <565C4FC4.6050607@cisco.com>
Date: Mon, 30 Nov 2015 14:31:48 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="------------020706050602060508080606"
Archived-At: <http://mailarchive.ietf.org/arch/msg/i2rs/NQqshRsb4AJlC65hvAZZKYftrWQ>
Cc: "yang-coord@ietf.org" <yang-coord@ietf.org>, Martin Bjorklund <mbj@tail-f.com>
Subject: [i2rs] YANG data models in I2RS: extraction and compilation feedback
X-BeenThere: i2rs@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Interface to The Internet Routing System \(IRS\)" <i2rs.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/i2rs>, <mailto:i2rs-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/i2rs/>
List-Post: <mailto:i2rs@ietf.org>
List-Help: <mailto:i2rs-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/i2rs>, <mailto:i2rs-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2015 13:31:59 -0000

Dear all,

I looked at the YANG models in the I2RS WG documents, from a compilation 
point of view (NOT a YANG design point of view):
http://datatracker.ietf.org/doc/draft-ietf-i2rs-yang-network-topo/
http://datatracker.ietf.org/doc/draft-ietf-i2rs-yang-l2-network-topology/
http://datatracker.ietf.org/doc/draft-ietf-i2rs-yang-l3-topology/
http://datatracker.ietf.org/doc/draft-ietf-i2rs-rib-data-model/

See the compilation results, updated daily, at 
http://www.claise.be/IETFYANGPageCompilation.html

_draft-ietf-i2rs-yang-network-topo-01_
As mentioned in 
https://tools.ietf.org/html/draft-ietf-netmod-rfc6087bis-05, the correct 
way to use <CODE BEGINS> <CODE ENDS> is

    The "<CODE BEGINS>" tag SHOULD be followed by a string identifying
    the file name specified in Section 5.2 of
    [I-D.ietf-netmod-rfc6020bis 
<https://tools.ietf.org/html/draft-ietf-netmod-rfc6087bis-05#ref-I-D.ietf-netmod-rfc6020bis>].  The following example is for the
    '2010-01-18' revision of the 'ietf-foo' module:

      <CODE BEGINS> file "ietf-foo@2010-01-18.yang"
        module ietf-foo {
          // ...
          revision 2010-01-18 {
            description "Latest revision";
            reference "RFC XXXX";
          }
          // ...
        }
      <CODE ENDS>

In your draft, here is what you should change:
OLD:

    <CODE BEGINS>
    file "ietf-network@2015-06-08.yang"
    module ietf-network {
      yang-version 1;
      namespace "urn:ietf:params:xml:ns:yang:ietf-network";
      prefix nd;

NEW:

    <CODE BEGINS> file "ietf-network@2015-06-08.yang"
    module ietf-network {
      yang-version 1;
      namespace "urn:ietf:params:xml:ns:yang:ietf-network";
      prefix nd;


OLD:

  <CODE BEGINS>
  file "ietf-network-topology@2015-06-08.yang"
  module ietf-network-topology {


NEW:

  <CODE BEGINS> file "ietf-network-topology@2015-06-08.yang"
  module ietf-network-topology {



However, we were able to extract those two models, and they compile 
correctly <http://www.claise.be/IETFYANGPageCompilation.html>.


_draft-ietf-i2rs-yang-l2-network-topology-01.txt_

Same remark:
OLD:

    <CODE BEGINS>
    file "ietf-l2-topology@2015-06-23.yang"
    module ietf-l2-topology {

NEW:

    <CODE BEGINS> file "ietf-l2-topology@2015-06-23.yang"
    module ietf-l2-topology {


However, we were able to extract this model, and as of this morning, it 
compiled with some warnings 
<http://www.claise.be/IETFYANGPageCompilation.html>:
     ietf-l2-topology.yang:490 (at ietf-l2-topology.yang:349): warning: 
explicit config statement is ignored

Good news.
Martin Bjorklund troubleshooted this one, and found a bug in pyang, 
which is already fixed! Thanks Martin
So get the latest pyang version at https://github.com/mbj4668/pyang


_draft-ietf-i2rs-yang-l3-topology-00_

Same remark.

OLD:

    <CODE BEGINS>
    file "l3-unicast-igp-topology@2015-06-08.yang"
    module l3-unicast-igp-topology {


NEW:

    <CODE BEGINS> file "l3-unicast-igp-topology@2015-06-08.yang"
    module l3-unicast-igp-topology {


OLD:

    <CODE BEGINS>
    file "ospf-topology@2015-06-08.yang"
    module ospf-topology {


NEW:

    <CODE BEGINS> file "ospf-topology@2015-06-08.yang"
    module ospf-topology {



OLD:

    <CODE BEGINS>
    file "isis-topology@2015-06-08.yang"
    module isis-topology {


NEW:

    <CODE BEGINS> file "isis-topology@2015-06-08.yang"
    module isis-topology {


However, we were able to extract these models, and, as of this morning, 
they compiled with the following warnings 
<http://www.claise.be/IETFYANGPageCompilation.html>:

    l3-unicast-igp-topology.yang:1: warning: RFC 6087: 4.1: no module
    name prefix used, suggest ietf-l3-unicast-igp-topology
    isis-topology.yang:1: warning: RFC 6087: 4.1: no module name prefix
    used, suggest ietf-isis-topology
    ospf-topology.yang:1: warning: RFC 6087: 4.1: no module name prefix
    used, suggest ietf-ospf-topology

The error messages were not optimal: indeed, they complain about the 
module name, and not the prefix YANG keyword.
Martin improved this error message already:
isis-topology.yang:1: warning: RFC 6087: 4.1: the module name should 
start with one of the strings "ietf-" or "iana-"

This relates to https://tools.ietf.org/html/draft-ietf-netmod-rfc6087bis-05

    It is suggested that a stable prefix be selected representing the
    entire organization.  All normative YANG modules published by the
    IETF MUST begin with the prefix "ietf-".  Another standards
    organization, such as the IEEE, might use the prefix "ieee-" for all
    YANG modules.

However, this was not a MUST in RFC6087 (as opposed to RFC6087bis). When 
RFC6087bis will be published, pyang will be adapted accordingly (error 
as opposed to warning). In the mean time, you can already fix the YANG 
modules like this: it will get rid of the warnings and future errors.

OLD:

    <CODE BEGINS>
    file "l3-unicast-igp-topology@2015-06-08.yang"
    module l3-unicast-igp-topology {
      yang-version 1;
      namespace "urn:ietf:params:xml:ns:yang:l3-unicast-igp-topology";
      prefix "l3t";

NEW:

    <CODE BEGINS> file "ietf-l3-unicast-igp-topology@2015-06-08.yang"
    module l3-unicast-igp-topology {
      yang-version 1;
      namespace "urn:ietf:params:xml:ns:yang:ietf-l3-unicast-igp-topology";
      prefix "l3t";



OLD:

    <CODE BEGINS>
    file "isis-topology@2015-06-08.yang"
    module isis-topology {
      yang-version 1;
      namespace "urn:ietf:params:xml:ns:yang:isis-topology";
      prefix "isis";


NEW:

    <CODE BEGINS> file "ietf-isis-topology@2015-06-08.yang"
    module isis-topology {
      yang-version 1;
      namespace "urn:ietf:params:xml:ns:yang:ietf-isis-topology";
      prefix "isis";


OLD:

    <CODE BEGINS>
    file "ospf-topology@2015-06-08.yang"
    module ospf-topology {
      yang-version 1;
      namespace "urn:ietf:params:xml:ns:yang:ospf-topology";
      prefix "ospf";


NEW:

    <CODE BEGINS> file "ietf-ospf-topology@2015-06-08.yang"
    module ospf-topology {
      yang-version 1;
      namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-topology";
      prefix "ospf";


_draft-ietf-i2rs-rib-data-model-04.txt_
This one extracts and compiles without any issues. Thanks.

Regards, Benoit