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 "[email protected]"
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 "[email protected]"
module ietf-network {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:ietf-network";
prefix nd;
NEW:
<CODE BEGINS> file "[email protected]"
module ietf-network {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:ietf-network";
prefix nd;
OLD:
<CODE BEGINS>
file "[email protected]"
module ietf-network-topology {
NEW:
<CODE BEGINS> file "[email protected]"
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 "[email protected]"
module ietf-l2-topology {
NEW:
<CODE BEGINS> file "[email protected]"
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 "[email protected]"
module l3-unicast-igp-topology {
NEW:
<CODE BEGINS> file "[email protected]"
module l3-unicast-igp-topology {
OLD:
<CODE BEGINS>
file "[email protected]"
module ospf-topology {
NEW:
<CODE BEGINS> file "[email protected]"
module ospf-topology {
OLD:
<CODE BEGINS>
file "[email protected]"
module isis-topology {
NEW:
<CODE BEGINS> file "[email protected]"
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 "[email protected]"
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 "[email protected]"
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 "[email protected]"
module isis-topology {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:isis-topology";
prefix "isis";
NEW:
<CODE BEGINS> file "[email protected]"
module isis-topology {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:ietf-isis-topology";
prefix "isis";
OLD:
<CODE BEGINS>
file "[email protected]"
module ospf-topology {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:ospf-topology";
prefix "ospf";
NEW:
<CODE BEGINS> file "[email protected]"
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
_______________________________________________
i2rs mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/i2rs