Subject: Re: [yang-doctors] RFC 6087: 4.9: top-level node <bla> must not be mandatory

From: Jan Lindblad <[email-masked]>
Date: Mon, 13 Jun 2016 09:57:48 +0200

Benoit,

It's the min-elements 1 in list rib that makes the top level node mandatory. Either this min-elements should be removed and description note added about what that means, e.g. routing disabled or so. Or the container routing should be a presence container, again with a description declaring what its presence/absence means, e.g. routing disabled or so.

/jan

> On 11 juni 2016, at 09:17, Benoit Claise <[email-masked]> wrote:
> 
> Dear all,
> 
> I updated pyang, and http://www.claise.be/IETFYANGPageCompilation.html <http://www.claise.be/IETFYANGPageCompilation.html> now shows 9 new failing YANG modules with this error message such as:
> [email-masked]:171 <mailto:[email-masked]:171>: error: RFC 6087: 4.9: top-level node routing must not be mandatory
> I want to proactively warn the authors, but would like to understand the issue first.
> 
> pyang -f tree [email-masked] <mailto:[email-masked]>
> module: ietf-network-device
>    +--rw ietf-yang-library
>    +--rw interfaces
>    +--rw hardware
>    +--rw qos
>    +--rw system-management
>    |  +--rw system-management-global
>    |  +--rw system-management-protocol* [type]
>    |     +--rw type    identityref
>    +--rw network-services
>    |  +--rw network-service* [type]
>    |     +--rw type    identityref
>    +--rw oam-protocols
>    |  +--rw oam-protocol* [type]
>    |     +--rw type    identityref
>    +--rw routing
>    |  +--rw control-plane-protocol* [type]
>    |  |  +--rw type      identityref
>    |  |  +--rw policy
>    |  +--rw rib* [name]
>    |     +--rw name           string
>    |     +--rw description?   string
>    |     +--rw policy
>    +--rw mpls
>    |  +--rw global
>    |  +--rw lsps* [type]
>    |     +--rw type    identityref
>    +--rw ieee-dot1Q
>    +--rw ietf-acl
>    +--rw ietf-key-chain
>    +--rw logical-network-element
>    +--rw network-instance
> 
>   container routing {
>     description
>       "The YANG Data Model for Routing Management revised to be
>        Network Instance / VRF independent. ";
>     // Note that there is no routing or network instance
>     list control-plane-protocol {
>         key "type";
>         description
>             "List of control plane protocols configured for
>              a network instance.";
>         leaf type {
>             type identityref {
>                 base control-plane-protocol-type;
>             }
>             description
>                 "The control plane protocol type, e.g., BGP,
>                  OSPF IS-IS, etc";
>         }
>         container policy {
>             description
>                 "Protocol specific policy,
>                 reusing [RTG-POLICY]";
>         }
>     }
>     list rib {
>         key "name";
>         min-elements "1";
>         description
>             "Each entry represents a RIB identified by the
>            'name' key. All routes in a RIB must belong to the
>             same address family.
>             For each routing instance, an implementation should
>             provide one system-controlled default RIB for each
>             supported address family.";
>         leaf name {
>             type string;
>             description
>                 "The name of the RIB.";
>         }
>         reference "draft-ietf-netmod-routing-cfg";
>         leaf description {
>             type string;
>             description
>                 "Description of the RIB";
>         }
>         // Note that there is no list of interfaces within
>         container policy {
>             description "Policy specific to RIB";
>         }
>     }
>   }
> 
> What should be corrected in this case?
> 
> Regards, Benoit
> _______________________________________________
> yang-doctors mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/yang-doctors