Guidelines for Authors and Reviewers of Documents Containing YANG Data Models
RFC 8407

Document Type RFC - Best Current Practice (October 2018; No errata)
Obsoletes RFC 6087
Also known as BCP 216
Last updated 2018-10-17
Replaces draft-bierman-netmod-rfc6087bis
Stream IETF
Formats plain text pdf html bibtex
Yang Validation 0 errors, 0 warnings.
Reviews
Additional URLs
- Yang catalog entry for ietf-foo@2016-03-20.yang
- Yang catalog entry for ietf-template@2016-03-20.yang
- Yang impact analysis for draft-ietf-netmod-rfc6087bis
- Mailing list discussion
Stream WG state Submitted to IESG for Publication (wg milestone: Jul 2017 - Submit draft-ietf-ne... )
Document shepherd Kent Watsen
Shepherd write-up Show (last changed 2018-01-20)
IESG IESG state RFC 8407 (Best Current Practice)
Consensus Boilerplate Yes
Telechat date
Responsible AD Warren Kumari
Send notices to (None)
IANA IANA review state Version Changed - Review Needed
IANA action state RFC-Ed-Ack
Internet Engineering Task Force (IETF)                        A. Bierman
Request for Comments: 8407                                     YumaWorks
BCP: 216                                                    October 2018
Obsoletes: 6087
Category: Best Current Practice
ISSN: 2070-1721

           Guidelines for Authors and Reviewers of Documents
                      Containing YANG Data Models

Abstract

   This memo provides guidelines for authors and reviewers of
   specifications containing YANG modules.  Recommendations and
   procedures are defined, which are intended to increase
   interoperability and usability of Network Configuration Protocol
   (NETCONF) and RESTCONF protocol implementations that utilize YANG
   modules.  This document obsoletes RFC 6087.

Status of This Memo

   This memo documents an Internet Best Current Practice.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   BCPs is available in Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   https://www.rfc-editor.org/info/rfc8407.

Copyright Notice

   Copyright (c) 2018 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Bierman                   Best Current Practice                 [Page 1]
RFC 8407              Guidelines for YANG Documents         October 2018

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   4
     1.1.  Changes since RFC 6087  . . . . . . . . . . . . . . . . .   5
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   6
     2.1.  NETCONF Terms . . . . . . . . . . . . . . . . . . . . . .   7
     2.2.  YANG Terms  . . . . . . . . . . . . . . . . . . . . . . .   7
     2.3.  NMDA Terms  . . . . . . . . . . . . . . . . . . . . . . .   7
     2.4.  Requirements Notation . . . . . . . . . . . . . . . . . .   8
   3.  General Documentation Guidelines  . . . . . . . . . . . . . .   8
     3.1.  Module Copyright  . . . . . . . . . . . . . . . . . . . .   9
     3.2.  Code Components . . . . . . . . . . . . . . . . . . . . .   9
       3.2.1.  Example Modules . . . . . . . . . . . . . . . . . . .   9
     3.3.  Terminology Section . . . . . . . . . . . . . . . . . . .  10
     3.4.  Tree Diagrams . . . . . . . . . . . . . . . . . . . . . .  10
     3.5.  Narrative Sections  . . . . . . . . . . . . . . . . . . .  10
     3.6.  Definitions Section . . . . . . . . . . . . . . . . . . .  11
     3.7.  Security Considerations Section . . . . . . . . . . . . .  11
       3.7.1.  Security Considerations Section Template  . . . . . .  12
     3.8.  IANA Considerations Section . . . . . . . . . . . . . . .  13
       3.8.1.  Documents That Create a New Namespace . . . . . . . .  14
       3.8.2.  Documents That Extend an Existing Namespace . . . . .  14
     3.9.  References Sections . . . . . . . . . . . . . . . . . . .  14
     3.10. Validation Tools  . . . . . . . . . . . . . . . . . . . .  14
     3.11. Module Extraction Tools . . . . . . . . . . . . . . . . .  15
     3.12. Module Usage Examples . . . . . . . . . . . . . . . . . .  15
   4.  YANG Usage Guidelines . . . . . . . . . . . . . . . . . . . .  15
     4.1.  Module Naming Conventions . . . . . . . . . . . . . . . .  16
     4.2.  Prefixes  . . . . . . . . . . . . . . . . . . . . . . . .  17
     4.3.  Identifiers . . . . . . . . . . . . . . . . . . . . . . .  18
       4.3.1.  Identifier Naming Conventions . . . . . . . . . . . .  18
     4.4.  Defaults  . . . . . . . . . . . . . . . . . . . . . . . .  19
     4.5.  Conditional Statements  . . . . . . . . . . . . . . . . .  19
     4.6.  XPath Usage . . . . . . . . . . . . . . . . . . . . . . .  20
       4.6.1.  XPath Evaluation Contexts . . . . . . . . . . . . . .  20
       4.6.2.  Function Library  . . . . . . . . . . . . . . . . . .  21
       4.6.3.  Axes  . . . . . . . . . . . . . . . . . . . . . . . .  22
       4.6.4.  Types . . . . . . . . . . . . . . . . . . . . . . . .  23
       4.6.5.  Wildcards . . . . . . . . . . . . . . . . . . . . . .  24
       4.6.6.  Boolean Expressions . . . . . . . . . . . . . . . . .  24
Show full document text