Subject: [lisp] YANG data models in LISP: extraction and compilation feedback

From: Benoit Claise <[email-masked]>
Date: Fri, 11 Dec 2015 14:02:56 +0100

Dear all,

I looked at the YANG model in the LISP WG document, from a compilation 
point of view (NOT a YANG design point of view):
https://tools.ietf.org/html/draft-ietf-lisp-yang-00

First of, we can't extract your YANG models from the draft.

Here are the extraction error messages:
xym.py draft-ietf-lisp-yang-00.txt
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 138 - Yang module 'ietf-lisp' 
with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 1193 - Yang module 'lisp-itr' 
with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 1630 - Yang module 'lisp-etr' 
with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 2363 - Yang module 
'lisp-map-server' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 2638 - Yang module 
'lisp-map-resolver' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 3291 - Yang module 
'lisp-pitr' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 3548 - Yang module 
'lisp-petr' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 3651 - Yang module 
'lisp-address-types' with no <CODE BEGINS> and not starting with 'example-'

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"[email-masked]"
        module ietf-foo {
          // ...
          revision 2010-01-18 {
            description "Latest revision";
            reference "RFC XXXX";
          }
          // ...
        }
      <CODE ENDS>

Note that the example YANG models should use the "example-" prefix, and 
no <CODE BEGINS> <CODE ENDS>

Now, if I extract those modules anyway, you have some compilation errors:
pyang --ietf *.yang
lisp-address-types.yang:1: warning: RFC 6087: 4.1: the module name 
should start with one of the strings "ietf-" or "iana-"
lisp-etr.yang:1: warning: RFC 6087: 4.1: the module name should start 
with one of the strings "ietf-" or "iana-"
lisp-itr.yang:1: warning: RFC 6087: 4.1: the module name should start 
with one of the strings "ietf-" or "iana-"
lisp-map-resolver.yang:1: warning: RFC 6087: 4.1: the module name should 
start with one of the strings "ietf-" or "iana-"
lisp-map-server.yang:1: warning: RFC 6087: 4.1: the module name should 
start with one of the strings "ietf-" or "iana-"
lisp-petr.yang:1: warning: RFC 6087: 4.1: the module name should start 
with one of the strings "ietf-" or "iana-"
lisp-pitr.yang:1: warning: RFC 6087: 4.1: the module name should start 
with one of the strings "ietf-" or "iana-"

Once you correct the extraction issues, the YANG models, along with some 
remaining compilation errors, will appear at 
http://www.claise.be/IETFYANGPageCompilation.html

Finally, note that www.yangvalidator.com is your friend._
_
Regards, Benoit

---

From: "Vina Ermagan (vermagan)" <[email-masked]>
Date: Fri, 18 Dec 2015 05:27:06 +0000

Hi Beniot,

Thanks for the notification. The errors below should be fixed in the new revision draft-ietf-lisp-yang-01 published today. I also tested the new version with yangvalidator, and all seems to be fine.

Thank you,
Vina

From: "Benoit Claise (bclaise)" <[email-masked]<mailto:[email-masked]>>
Date: Friday, December 11, 2015 5:02 AM
To: "[email-masked]<mailto:[email-masked]>" <[email-masked]<mailto:[email-masked]>>
Cc: "[email-masked]<mailto:[email-masked]>" <[email-masked]<mailto:[email-masked]>>, "[email-masked]<mailto:[email-masked]>" <[email-masked]<mailto:[email-masked]>>
Subject: [lisp] YANG data models in LISP: extraction and compilation feedback

Dear all,

I looked at the YANG model in the LISP WG document, from a compilation point of view (NOT a YANG design point of view):
    https://tools.ietf.org/html/draft-ietf-lisp-yang-00<http://datatracker.ietf.org/doc/draft-ietf-i2rs-yang-network-topo/>

Here are the extraction error messages:
xym.py draft-ietf-lisp-yang-00.txt
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 138 - Yang module 'ietf-lisp' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 1193 - Yang module 'lisp-itr' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 1630 - Yang module 'lisp-etr' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 2363 - Yang module 'lisp-map-server' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 2638 - Yang module 'lisp-map-resolver' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 3291 - Yang module 'lisp-pitr' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 3548 - Yang module 'lisp-petr' with no <CODE BEGINS> and not starting with 'example-'
ERROR: 'draft-ietf-lisp-yang-00.txt', Line 3651 - Yang module 'lisp-address-types' with no <CODE BEGINS> and not starting with 'example-'

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 "[email-masked]"<mailto:[email-masked]>
       module ietf-foo {
         // ...
         revision 2010-01-18 {
           description "Latest revision";
           reference "RFC XXXX";
         }
         // ...
       }
     <CODE ENDS>

Note that the example YANG models should use the "example-" prefix, and no <CODE BEGINS> <CODE ENDS>

Now, if I extract those modules anyway, you have some compilation errors:
pyang --ietf *.yang
lisp-address-types.yang:1: warning: RFC 6087: 4.1: the module name should start with one of the strings "ietf-" or "iana-"
lisp-etr.yang:1: warning: RFC 6087: 4.1: the module name should start with one of the strings "ietf-" or "iana-"
lisp-itr.yang:1: warning: RFC 6087: 4.1: the module name should start with one of the strings "ietf-" or "iana-"
lisp-map-resolver.yang:1: warning: RFC 6087: 4.1: the module name should start with one of the strings "ietf-" or "iana-"
lisp-map-server.yang:1: warning: RFC 6087: 4.1: the module name should start with one of the strings "ietf-" or "iana-"
lisp-petr.yang:1: warning: RFC 6087: 4.1: the module name should start with one of the strings "ietf-" or "iana-"
lisp-pitr.yang:1: warning: RFC 6087: 4.1: the module name should start with one of the strings "ietf-" or "iana-"

Once you correct the extraction issues, the YANG models, along with some remaining compilation errors, will appear at <http://www.claise.be/IETFYANGPageCompilation.html> http://www.claise.be/IETFYANGPageCompilation.html

Finally, note that www.yangvalidator.com<http://www.yangvalidator.com> is your friend.

Regards, Benoit

---

From: Benoit Claise <[email-masked]>
Date: Fri, 18 Dec 2015 10:24:46 +0100

Thanks Vina,

Well done.

Regards, Benoit.
> Hi Beniot,
>
> Thanks for the notification. The errors below should be fixed in the 
> new revision draft-ietf-lisp-yang-01 published today. I also tested 
> the new version with yangvalidator, and all seems to be fine.
>
> Thank you,
> Vina
>
> To: "[email-masked] <mailto:[email-masked]>" <[email-masked] 
> <mailto:[email-masked]>>
> Cc: "[email-masked] 
> <mailto:[email-masked]>" <[email-masked] 
> <mailto:[email-masked]>>, "[email-masked] 
> <mailto:[email-masked]>" <[email-masked] 
> <mailto:[email-masked]>>
>     I looked at the YANG model in the LISP WG document, from a
>     compilation point of view (NOT a YANG design point of view):
>     ERROR: 'draft-ietf-lisp-yang-00.txt', Line 138 - Yang module
>     'ietf-lisp' with no <CODE BEGINS> and not starting with 'example-'
>     ERROR: 'draft-ietf-lisp-yang-00.txt', Line 1193 - Yang module
>     'lisp-itr' with no <CODE BEGINS> and not starting with 'example-'
>     ERROR: 'draft-ietf-lisp-yang-00.txt', Line 1630 - Yang module
>     'lisp-etr' with no <CODE BEGINS> and not starting with 'example-'
>     https://tools.ietf.org/html/draft-ietf-netmod-rfc6087bis-05, the
>     correct way to use <CODE BEGINS> <CODE ENDS> is
>
>     lisp-etr.yang:1: warning: RFC 6087: 4.1: the module name should
>     lisp-itr.yang:1: warning: RFC 6087: 4.1: the module name should
>     lisp-map-resolver.yang:1: warning: RFC 6087: 4.1: the module name
>     lisp-map-server.yang:1: warning: RFC 6087: 4.1: the module name
>     lisp-petr.yang:1: warning: RFC 6087: 4.1: the module name should
>     lisp-pitr.yang:1: warning: RFC 6087: 4.1: the module name should
>     Once you correct the extraction issues, the YANG models, along
>     with some remaining compilation errors, will appear at
> .