--- 1/draft-ietf-netmod-rfc6087bis-08.txt 2016-10-25 16:16:08.471452577 -0700 +++ 2/draft-ietf-netmod-rfc6087bis-09.txt 2016-10-25 16:16:08.571455077 -0700 @@ -1,45 +1,46 @@ Network Working Group A. Bierman Internet-Draft YumaWorks -Intended status: Standards Track September 1, 2016 -Expires: March 5, 2017 +Obsoletes: 6087 (if approved) October 25, 2016 +Intended status: Informational +Expires: April 28, 2017 Guidelines for Authors and Reviewers of YANG Data Model Documents - draft-ietf-netmod-rfc6087bis-08 + draft-ietf-netmod-rfc6087bis-09 Abstract This memo provides guidelines for authors and reviewers of Standards Track specifications containing YANG data model modules. Applicable portions may be used as a basis for reviews of other YANG data model documents. Recommendations and procedures are defined, which are intended to increase interoperability and usability of Network - Configuration Protocol (NETCONF) implementations that utilize YANG - data model modules. + Configuration Protocol (NETCONF) and RESTCONF protocol + implementations that utilize YANG data model modules. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on March 5, 2017. + This Internet-Draft will expire on April 28, 2017. Copyright Notice Copyright (c) 2016 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 (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -53,32 +54,33 @@ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1. Requirements Notation . . . . . . . . . . . . . . . . . . 6 2.2. NETCONF Terms . . . . . . . . . . . . . . . . . . . . . . 6 2.3. YANG Terms . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4. Terms . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3. YANG Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 8 4. General Documentation Guidelines . . . . . . . . . . . . . . . 9 4.1. Module Copyright . . . . . . . . . . . . . . . . . . . . . 9 - 4.1.1. Example Modules . . . . . . . . . . . . . . . . . . . 10 - 4.2. Terminology Section . . . . . . . . . . . . . . . . . . . 10 - 4.3. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 11 - 4.4. Narrative Sections . . . . . . . . . . . . . . . . . . . . 11 - 4.5. Definitions Section . . . . . . . . . . . . . . . . . . . 12 - 4.6. Security Considerations Section . . . . . . . . . . . . . 12 - 4.7. IANA Considerations Section . . . . . . . . . . . . . . . 13 - 4.7.1. Documents that Create a New Namespace . . . . . . . . 13 - 4.7.2. Documents that Extend an Existing Namespace . . . . . 13 - 4.8. Reference Sections . . . . . . . . . . . . . . . . . . . . 13 - 4.9. Validation Tools . . . . . . . . . . . . . . . . . . . . . 14 - 4.10. Module Extraction Tools . . . . . . . . . . . . . . . . . 14 + 4.2. Code Components . . . . . . . . . . . . . . . . . . . . . 9 + 4.2.1. Example Modules . . . . . . . . . . . . . . . . . . . 10 + 4.3. Terminology Section . . . . . . . . . . . . . . . . . . . 10 + 4.4. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 11 + 4.5. Narrative Sections . . . . . . . . . . . . . . . . . . . . 11 + 4.6. Definitions Section . . . . . . . . . . . . . . . . . . . 12 + 4.7. Security Considerations Section . . . . . . . . . . . . . 12 + 4.8. IANA Considerations Section . . . . . . . . . . . . . . . 13 + 4.8.1. Documents that Create a New Namespace . . . . . . . . 13 + 4.8.2. Documents that Extend an Existing Namespace . . . . . 13 + 4.9. Reference Sections . . . . . . . . . . . . . . . . . . . . 13 + 4.10. Validation Tools . . . . . . . . . . . . . . . . . . . . . 14 + 4.11. Module Extraction Tools . . . . . . . . . . . . . . . . . 14 5. YANG Usage Guidelines . . . . . . . . . . . . . . . . . . . . 15 5.1. Module Naming Conventions . . . . . . . . . . . . . . . . 15 5.2. Prefixes . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.3. Identifiers . . . . . . . . . . . . . . . . . . . . . . . 17 5.3.1. Identifier Naming Conventions . . . . . . . . . . . . 17 5.4. Defaults . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.5. Conditional Statements . . . . . . . . . . . . . . . . . . 18 5.6. XPath Usage . . . . . . . . . . . . . . . . . . . . . . . 19 5.6.1. XPath Evaluation Contexts . . . . . . . . . . . . . . 19 5.6.2. Function Library . . . . . . . . . . . . . . . . . . . 20 @@ -122,70 +124,75 @@ 5.26.3. anyxml vs. anydata . . . . . . . . . . . . . . . . . . 48 5.26.4. action vs. rpc . . . . . . . . . . . . . . . . . . . . 48 5.27. Updating YANG Modules (Published vs. Unpublished) . . . . 49 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 51 7. Security Considerations . . . . . . . . . . . . . . . . . . . 52 7.1. Security Considerations Section Template . . . . . . . . . 52 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 54 9. Changes Since RFC 6087 . . . . . . . . . . . . . . . . . . . . 55 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 57 10.1. Normative References . . . . . . . . . . . . . . . . . . . 57 - 10.2. Informative References . . . . . . . . . . . . . . . . . . 58 + 10.2. Informative References . . . . . . . . . . . . . . . . . . 57 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 59 - A.1. v07 to v08 . . . . . . . . . . . . . . . . . . . . . . . . 59 - A.2. v06 to v07 . . . . . . . . . . . . . . . . . . . . . . . . 59 - A.3. v05 to v06 . . . . . . . . . . . . . . . . . . . . . . . . 59 - A.4. v04 to v05 . . . . . . . . . . . . . . . . . . . . . . . . 60 - A.5. v03 ot v04 . . . . . . . . . . . . . . . . . . . . . . . . 60 - A.6. v02 to v03 . . . . . . . . . . . . . . . . . . . . . . . . 60 - A.7. v01 to v02 . . . . . . . . . . . . . . . . . . . . . . . . 61 - A.8. v00 to v01 . . . . . . . . . . . . . . . . . . . . . . . . 61 - Appendix B. Module Review Checklist . . . . . . . . . . . . . . . 62 - Appendix C. YANG Module Template . . . . . . . . . . . . . . . . 64 - Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 66 + A.1. v08 to v09 . . . . . . . . . . . . . . . . . . . . . . . . 59 + A.2. v07 to v08 . . . . . . . . . . . . . . . . . . . . . . . . 59 + A.3. v06 to v07 . . . . . . . . . . . . . . . . . . . . . . . . 59 + A.4. v05 to v06 . . . . . . . . . . . . . . . . . . . . . . . . 60 + A.5. v04 to v05 . . . . . . . . . . . . . . . . . . . . . . . . 60 + A.6. v03 ot v04 . . . . . . . . . . . . . . . . . . . . . . . . 60 + A.7. v02 to v03 . . . . . . . . . . . . . . . . . . . . . . . . 61 + A.8. v01 to v02 . . . . . . . . . . . . . . . . . . . . . . . . 61 + A.9. v00 to v01 . . . . . . . . . . . . . . . . . . . . . . . . 61 + Appendix B. Module Review Checklist . . . . . . . . . . . . . . . 63 + Appendix C. YANG Module Template . . . . . . . . . . . . . . . . 65 + Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 67 1. Introduction The standardization of network configuration interfaces for use with - the Network Configuration Protocol [RFC6241] requires a modular set - of data models, which can be reused and extended over time. + the Network Configuration Protocol [RFC6241] and RESTCONF + [I-D.ietf-netconf-restconf] requires a modular set of data models, + which can be reused and extended over time. This document defines a set of usage guidelines for Standards Track - documents containing [I-D.ietf-netmod-rfc6020bis] data models. YANG - is used to define the data structures, protocol operations, and - notification content used within a NETCONF server. A server that - supports a particular YANG module will support client NETCONF + documents containing [RFC7950] data models. YANG is used to define + the data structures, protocol operations, and notification content + used within a NETCONF and/or RESTCONF server. A server that supports + a particular YANG module will support client NETCONF and/or RESTCONF operation requests, as indicated by the specific content defined in the YANG module. This document is similar to the Structure of Management Information version 2 (SMIv2) usage guidelines specification [RFC4181] in intent and structure. However, since that document was written a decade after SMIv2 modules had been in use, it was published as a 'Best Current Practice' (BCP). This document is not a BCP, but rather an informational reference, intended to promote consistency in documents containing YANG modules. Many YANG constructs are defined as optional to use, such as the description statement. However, in order to maximize - interoperability of NETCONF implementations utilizing YANG data - models, it is desirable to define a set of usage guidelines that may - require a higher level of compliance than the minimum level defined - in the YANG specification. + interoperability of NETCONF and RESTCONF implementations utilizing + YANG data models, it is desirable to define a set of usage guidelines + that may require a higher level of compliance than the minimum level + defined in the YANG specification. In addition, YANG allows constructs such as infinite length identifiers and string values, or top-level mandatory nodes, that a compliant server is not required to support. Only constructs that all servers are required to support can be used in IETF YANG modules. This document defines usage guidelines related to the NETCONF - operations layer and NETCONF content layer, as defined in [RFC6241]. + operations layer and NETCONF content layer, as defined in [RFC6241], + and the RESTCONF methods and RESTCONF resources, as defined in + [I-D.ietf-netconf-restconf], + These guidelines are intended to be used by authors and reviewers to improve the readability and interoperability of published YANG data models. Note that this document is not a YANG tutorial and the reader is expected to know the YANG data modeling language before using this document. 2. Terminology @@ -208,22 +215,22 @@ o capabilities o client o operation o server 2.3. YANG Terms - The following terms are defined in [I-D.ietf-netmod-rfc6020bis] and - are not redefined here: + The following terms are defined in [RFC7950] and are not redefined + here: o data node o module o namespace o submodule o version @@ -239,21 +246,21 @@ 2.4. Terms The following terms are used throughout this document: o published: A stable release of a module or submodule. For example the "Request for Comments" described in section 2.1 of [RFC2026] is considered a stable publication. o unpublished: An unstable release of a module or submodule. For example the "Internet-Draft" described in section 2.2 of [RFC2026] - is considered an unstable publication that is a work-in-progess, + is considered an unstable publication that is a work-in-progress, subject to change at any time. o YANG fragment: A set of YANG statements that are not intended to represent a complete YANG module or submodule. These statements are not intended for actual use, except to provide an example of YANG statement usage. The invalid syntax "..." is sometimes used to indicate that additional YANG statements would be present in a real YANG module. 3. YANG Tree Diagrams @@ -276,22 +283,22 @@ o Ellipsis ("...") stands for contents of subtrees that are not shown. 4. General Documentation Guidelines YANG data model modules under review are likely to be contained in Internet-Drafts. All guidelines for Internet-Draft authors MUST be followed. The RFC Editor provides guidelines for authors of RFCs, which are first published as Internet-Drafts. These guidelines - should be followed and are defined in [RFC2223] and updated in - [RFC5741] and "RFC Document Style" [RFC-STYLE]. + should be followed and are defined in [RFC7322] and updated in + [RFC7841] and "RFC Document Style" [RFC-STYLE]. The following sections MUST be present in an Internet-Draft containing a module: o Narrative sections o Definitions section o Security Considerations section @@ -313,72 +320,73 @@ YANG fragments as well. 4.1. Module Copyright The module description statement MUST contain a reference to the latest approved IETF Trust Copyright statement, which is available online at: http://trustee.ietf.org/license-info/ +4.2. Code Components + Each YANG module or submodule contained within an Internet-Draft or RFC is considered to be a code component. The strings "" and "" MUST be used to identify each code component. The "" tag SHOULD be followed by a string identifying - the file name specified in Section 5.2 of - [I-D.ietf-netmod-rfc6020bis]. The following example is for the - '2010-01-18' revision of the 'ietf-foo' module: + the file name specified in Section 5.2 of [RFC7950]. The following + example is for the '2010-01-18' revision of the 'ietf-foo' module: file "ietf-foo@2016-03-20.yang" module ietf-foo { namespace "urn:ietf:params:xml:ns:yang:ietf-foo"; prefix "foo"; organization "..."; contact "..."; description "..."; revision 2016-03-20 { description "Latest revision"; reference "RFC XXXX"; } // ... more statements } -4.1.1. Example Modules +4.2.1. Example Modules The convention SHOULD be used for complete example modules, but not YANG fragments. This allows module extraction tools to ignore partial YANG modules that are not intended to be compiled. An example module SHOULD be named using the term "example", followed by a hyphen, followed by a descriptive name, e.g., "example-toaster". -4.2. Terminology Section +4.3. Terminology Section A terminology section MUST be present if any terms are defined in the document or if any terms are imported from other documents. If YANG tree diagrams are used, then a sub-section explaining the YANG tree diagram syntax MUST be present, containing the following text: A simplified graphical representation of the data model is used in this document. The meaning of the symbols in these diagrams is defined in [RFCXXXX]. -- RFC Editor: Replace XXXX with RFC number and remove note -4.3. Tree Diagrams +4.4. Tree Diagrams YANG tree diagrams provide a concise representation of a YANG module, and SHOULD be included to help readers understand YANG module structure. Tree diagrams MAY be split into sections to correspond to document structure. The following example shows a simple YANG tree diagram: +--rw top-level-config-container | +--rw config-list* [key-name] @@ -396,60 +404,60 @@ If the YANG module is comprised of groupings only, then the tree diagram SHOULD contain the groupings. The 'pyang' compiler can be used to produce a tree diagram with groupings using the '-f tree --tree-print-groupings" command line parameters. If the YANG module contains notifications, then the tree diagram SHOULD contain the notifications. If the YANG module contains RPC statements, then the tree diagram SHOULD contain the RPC statements. -4.4. Narrative Sections +4.5. Narrative Sections The narrative part MUST include an overview section that describes the scope and field of application of the module(s) defined by the specification and that specifies the relationship (if any) of these modules to other standards, particularly to standards containing other YANG modules. The narrative part SHOULD include one or more sections to briefly describe the structure of the modules defined in the specification. If the module(s) defined by the specification imports definitions - from other modules (except for those defined in the - [I-D.ietf-netmod-rfc6020bis] or [RFC6991] documents), or are always - implemented in conjunction with other modules, then those facts MUST - be noted in the overview section, as MUST be noted any special - interpretations of definitions in other modules. + from other modules (except for those defined in the [RFC7950] or + [RFC6991] documents), or are always implemented in conjunction with + other modules, then those facts MUST be noted in the overview + section, as MUST be noted any special interpretations of definitions + in other modules. -4.5. Definitions Section +4.6. Definitions Section This section contains the module(s) defined by the specification. These modules SHOULD be written using the YANG syntax defined in - [I-D.ietf-netmod-rfc6020bis]. YANG 1.0 [RFC6020] MAY be used if no - YANG 1.1 constructs or semantics are needed in the module. + [RFC7950]. YANG 1.0 [RFC6020] MAY be used if no YANG 1.1 constructs + or semantics are needed in the module. A YIN syntax version of the module MAY also be present in the document. There MAY also be other types of modules present in the document, such as SMIv2, which are not affected by these guidelines. Note that all YANG statements within a YANG module are considered normative, if the module itself is considered normative, and not an example module. The use of keywords defined in [RFC2119] apply to YANG description statements in normative modules exactly as they would in any other normative section. Example YANG modules MUST NOT contain any normative text, including any reserved words from [RFC2119]. See Section 5 for guidelines on YANG usage. -4.6. Security Considerations Section +4.7. Security Considerations Section Each specification that defines one or more modules MUST contain a section that discusses security considerations relevant to those modules. This section MUST be patterned after the latest approved template (available at http://trac.tools.ietf.org/area/ops/trac/wiki/ yang-security-guidelines). Section 7.1 contains the security considerations template dated 2013-05-08. Authors MUST check the WEB page at the URL listed above in case there is a more recent version @@ -464,112 +472,112 @@ o Readable data nodes that contain especially sensitive information or that raise significant privacy concerns MUST be explicitly listed by name and the reasons for the sensitivity/privacy concerns MUST be explained. o Operations (i.e., YANG 'rpc' statements) that are potentially harmful to system behavior or that raise significant privacy concerns MUST be explicitly listed by name and the reasons for the sensitivity/privacy concerns MUST be explained. -4.7. IANA Considerations Section +4.8. IANA Considerations Section In order to comply with IESG policy as set forth in http://www.ietf.org/id-info/checklist.html, every Internet-Draft that is submitted to the IESG for publication MUST contain an IANA Considerations section. The requirements for this section vary depending on what actions are required of the IANA. If there are no IANA considerations applicable to the document, then the IANA Considerations section stating that there are no actions is removed by the RFC Editor before publication. Refer to the guidelines in [RFC5226] for more details. -4.7.1. Documents that Create a New Namespace +4.8.1. Documents that Create a New Namespace If an Internet-Draft defines a new namespace that is to be administered by the IANA, then the document MUST include an IANA Considerations section that specifies how the namespace is to be administered. Specifically, if any YANG module namespace statement value contained in the document is not already registered with IANA, then a new YANG Namespace registry entry MUST be requested from the IANA. The - [I-D.ietf-netmod-rfc6020bis] specification includes the procedure for - this purpose in its IANA Considerations section. + [RFC7950] specification includes the procedure for this purpose in + its IANA Considerations section. -4.7.2. Documents that Extend an Existing Namespace +4.8.2. Documents that Extend an Existing Namespace It is possible to extend an existing namespace using a YANG submodule that belongs to an existing module already administered by IANA. In this case, the document containing the main module MUST be updated to use the latest revision of the submodule. -4.8. Reference Sections +4.9. Reference Sections For every import or include statement that appears in a module contained in the specification, which identifies a module in a separate document, a corresponding normative reference to that document MUST appear in the Normative References section. The reference MUST correspond to the specific module version actually used within the specification. For every normative reference statement that appears in a module contained in the specification, which identifies a separate document, a corresponding normative reference to that document SHOULD appear in the Normative References section. The reference SHOULD correspond to the specific document version actually used within the specification. If the reference statement identifies an informative reference, which identifies a separate document, a corresponding informative reference to that document MAY appear in the Informative References section. -4.9. Validation Tools +4.10. Validation Tools All modules need to be validated before submission in an Internet Draft. The 'pyang' YANG compiler is freely available from github: https://github.com/mbj4668/pyang If the 'pyang' compiler is used, then the "--ietf" command line option SHOULD be used to identify any IETF guideline issues. -4.10. Module Extraction Tools +4.11. Module Extraction Tools A version of 'rfcstrip' is available which will extract YANG modules from an Internet Draft or RFC. The 'rfcstrip' tool which supports YANG module extraction is freely available: http://www.yang-central.org/twiki/pub/Main/YangTools/rfcstrip This tool can be used to verify that the "" and "" tags are used correctly and that the normative YANG modules can be extracted correctly. 5. YANG Usage Guidelines In general, modules in IETF Standards Track specifications MUST comply with all syntactic and semantic requirements of YANG - [I-D.ietf-netmod-rfc6020bis]. The guidelines in this section are - intended to supplement the YANG specification, which is intended to - define a minimum set of conformance requirements. + [RFC7950]. The guidelines in this section are intended to supplement + the YANG specification, which is intended to define a minimum set of + conformance requirements. In order to promote interoperability and establish a set of practices based on previous experience, the following sections establish usage guidelines for specific YANG constructs. Only guidelines that clarify or restrict the minimum conformance requirements are included here. 5.1. Module Naming Conventions Normative modules contained in Standards Track documents MUST be named according to the guidelines in the IANA Considerations section - of [I-D.ietf-netmod-rfc6020bis]. + of [RFC7950]. A distinctive word or acronym (e.g., protocol name or working group acronym) SHOULD be used in the module name. If new definitions are being defined to extend one or more existing modules, then the same word or acronym should be reused, instead of creating a new one. All published module names MUST be unique. For a YANG module published in an RFC, this uniqueness is guaranteed by IANA. For unpublished modules, the authors need to check that no other work in progress is using the same module name. @@ -650,21 +658,21 @@ Prefix values SHOULD be short, but also likely to be unique. Prefix values SHOULD NOT conflict with known modules that have been previously published. 5.3. Identifiers Identifiers for all YANG identifiers in published modules MUST be between 1 and 64 characters in length. These include any construct specified as an 'identifier-arg-str' token in the ABNF in Section 13 - of [I-D.ietf-netmod-rfc6020bis]. + of [RFC7950]. 5.3.1. Identifier Naming Conventions Identifiers SHOULD follow a consistent naming pattern throughout the module. Only lower-case letters, numbers, and dashes SHOULD be used in identifier names. Upper-case characters and the underscore character MAY be used if the identifier represents a well-known value that uses these characters. Identifiers SHOULD include complete words and/or well-known acronyms @@ -708,23 +716,23 @@ 5.5. Conditional Statements A module may be conceptually partitioned in several ways, using the 'if-feature' and/or 'when' statements. Data model designers need to carefully consider all modularity aspects, including the use of YANG conditional statements. If a data definition is optional, depending on server support for a - NETCONF protocol capability, then a YANG 'feature' statement SHOULD - be defined to indicate that the NETCONF capability is supported - within the data model. + NETCONF or RESTCONF protocol capability, then a YANG 'feature' + statement SHOULD be defined to indicate that the NETCONF or RESTCONF + capability is supported within the data model. If any notification data, or any data definition, for a non- configuration data node is not mandatory, then the server may or may not be required to return an instance of this data node. If any conditional requirements exist for returning the data node in a notification payload or retrieval request, they MUST be documented somewhere. For example, a 'when' or 'if-feature' statement could apply to the data node, or the conditional requirements could be explained in a 'description' statement within the data node or one of its ancestors (if any). @@ -824,31 +832,31 @@ The 'local-name' function SHOULD NOT be used to reference local names outside of the YANG module defining the must or when expression containing the 'local-name' function. Example of a local-name function that should not be used: /*[local-name()='foo'] 5.6.3. Axes The 'attribute' and 'namespace' axes are not supported in YANG, and - MAY be empty in a NETCONF server implementation. + MAY be empty in a NETCONF or RESTCONF server implementation. The 'preceding', and 'following' axes SHOULD NOT be used. These - constructs rely on XML document order within a NETCONF server - configuration database, which may not be supported consistently or - produce reliable results across implementations. Predicate - expressions based on static node properties (e.g., element name or - value, 'ancestor' or 'descendant' axes) SHOULD be used instead. The - 'preceding' and 'following' axes MAY be used if document order is not - relevant to the outcome of the expression (e.g., check for global - uniqueness of a parameter value). + constructs rely on XML document order within a NETCONF or RESTCONF + server configuration database, which may not be supported + consistently or produce reliable results across implementations. + Predicate expressions based on static node properties (e.g., element + name or value, 'ancestor' or 'descendant' axes) SHOULD be used + instead. The 'preceding' and 'following' axes MAY be used if + document order is not relevant to the outcome of the expression + (e.g., check for global uniqueness of a parameter value). The 'preceding-sibling' and 'following-sibling' axes SHOULD NOT used, however they MAY be used if document order is not relevant to the outcome of the expression. A server is only required to maintain the relative XML document order of all instances of a particular user-ordered list or leaf-list. The 'preceding-sibling' and 'following-sibling' axes MAY be used if they are evaluated in a context where the context node is a user-ordered 'list' or 'leaf-list'. @@ -940,21 +948,21 @@ type string; } leaf foo2 { // CORRECT must "/f:foo1 = 'one' or /f:foo1 = 'three'"; type string; } In the next revision of the module, leaf "foo1" is extended with a - nem enum named "four": + new enum named "four": leaf foo1 { type enumeration { enum one; enum two; enum three; enum four; } } @@ -1073,21 +1081,21 @@ for Standards Track modules: urn:ietf:params:xml:ns:yang:ietf-netconf-partial-lock urn:ietf:params:xml:ns:yang:ietf-netconf-state urn:ietf:params:xml:ns:yang:ietf-netconf Note that a different URN prefix string SHOULD be used for non- Standards-Track modules. The string SHOULD be selected according to - the guidelines in [I-D.ietf-netmod-rfc6020bis]. + the guidelines in [RFC7950]. The following examples are for non-Standards-Track modules. The domain "example.com" SHOULD be used in all namespace URIs for example modules. http://example.com/ns/example-interfaces http://example.com/ns/example-system 5.10. Top-Level Data Definitions @@ -1947,33 +1955,38 @@ reports the actual temperature in order to determine if the cooling system is operating correctly. YANG has no mechanism other than the "description" statement to associate the desired temperature and the actual temperature. Careful consideration needs to be given to the location of operational data. It can either be located within the configuration subtree for which it applies, or it can be located outside the particular configuration subtree. Placing operational data within the configuration subtree is appropriate if the operational values - can only exist if the configuration exists. + can only exist if the configuration exists. Placing operational data + outside the configuration subtree is appropriate if the operational + values can exist without corresponding configuration (e.g., system + generated interfaces). The "interfaces" and "interfaces-state" subtrees defined in [RFC7223] are an example of a complex relationship between configuration and operational data. The operational values can include interface entries that have been discovered or initialized by the system. An interface may be in use that has not been configured at all. Therefore, the operational data for an interface cannot be located within the configuration for that same interface. Sometimes the configured value represents some sort of procedure to be followed, in which the system will select an actual value, based - on protocol negotiation. + on protocol negotiation. In this case it is RECOMMENDED to have a + separate config false value to represented the resulting state. For + instance: leaf duplex-admin-mode { type enumeration { enum auto; enum half; enum full; } } leaf duplex-oper-mode { @@ -2143,63 +2156,68 @@ list interface { ... action reset { } } } 5.27. Updating YANG Modules (Published vs. Unpublished) YANG modules can change over time. Typically, new data model definitions are needed to support new features. YANG update rules - defined in section 11 of [I-D.ietf-netmod-rfc6020bis] MUST be - followed for published modules. They MAY be followed for unpublished - modules. + defined in section 11 of [RFC7950] MUST be followed for published + modules. They MAY be followed for unpublished modules. The YANG update rules only apply to published module revisions. Each - organization will have their own way to identity published work which + organization will have their own way to identify published work which is considered to be stable, and unpublished work which is considered to be unstable. For example, in the IETF, the RFC document is used for published work, and the Internet-Draft is used for unpublished work. 6. IANA Considerations + -- RFC Ed: These registries need to be updated to reference this + RFC instead of RFC 6087 for the ietf-template module, and + remove this note. + This document registers one URI in the IETF XML registry [RFC3688]. - The following registration has been made: + The following registration has been made in [RFC6087] and updated by + this document. URI: urn:ietf:params:xml:ns:yang:ietf-template Registrant Contact: The NETMOD WG of the IETF. XML: N/A, the requested URI is an XML namespace. - Per this document, the following assignment has been made in the YANG - Module Names Registry for the YANG module template in Appendix C. + The following assignment has been made in [RFC6087] and updated by + this document in the YANG Module Names Registry, or the YANG module + template in Appendix C. +-----------+-------------------------------------------+ | Field | Value | +-----------+-------------------------------------------+ | Name | ietf-template | | Namespace | urn:ietf:params:xml:ns:yang:ietf-template | | Prefix | temp | | Reference | RFC XXXX | +-----------+-------------------------------------------+ YANG Registry Assignment 7. Security Considerations - This document defines documentation guidelines for NETCONF content - defined with the YANG data modeling language. The guidelines for how - to write a Security Considerations section for a YANG module are - defined in the online document + This document defines documentation guidelines for NETCONF or + RESTCONF content defined with the YANG data modeling language. The + guidelines for how to write a Security Considerations section for a + YANG module are defined in the online document http://trac.tools.ietf.org/area/ops/trac/wiki/ yang-security-guidelines This document does not introduce any new or increased security risks into the management system. The following section contains the security considerations template dated 2010-06-16. Be sure to check the webpage at the URL listed above in case there is a more recent version available. @@ -2320,146 +2338,169 @@ o Clarify usage of 'uint64' and 'int64' data types o Added text on YANG feature usage o Added Identifier Naming Conventions o Clarified use of mandatory nodes with conditional augmentations o Clarified namespace and domain conventions for example modules - o Added and convention + o Clarified conventions for identifying code components o Added YANG 1.1 guidelines o Added Data Model Constraints section + o Added mention of RESTCONF protocol + 10. References 10.1. Normative References - [I-D.ietf-netmod-rfc6020bis] - Bjorklund, M., "YANG - A Data Modeling Language for the - Network Configuration Protocol (NETCONF)", - draft-ietf-netmod-rfc6020bis-07 (work in progress), - September 2015. - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. - [RFC2223] Postel, J. and J. Reynolds, "Instructions to RFC Authors", - RFC 2223, October 1997. - [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004. [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005. [RFC5378] Bradner, S. and J. Contreras, "Rights Contributors Provide to the IETF Trust", BCP 78, RFC 5378, November 2008. - [RFC5741] Daigle, L., Kolkman, O., and IAB, "RFC Streams, Headers, - and Boilerplates", RFC 5741, December 2009. - [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010. - [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., - and A. Bierman, Ed., "Network Configuration Protocol - (NETCONF)", RFC 6241, June 2011. - [RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991, July 2013. + [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", + RFC 7950, DOI 10.17487/RFC7950, August 2016, + . + [W3C.REC-xpath-19991116] Clark, J. and S. DeRose, "XML Path Language (XPath) Version 1.0", World Wide Web Consortium Recommendation REC-xpath-19991116, November 1999, . 10.2. Informative References + [I-D.ietf-netconf-restconf] + Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF + Protocol", draft-ietf-netconf-restconf-17 (work in + progress), September 2016. + [RFC-STYLE] Braden, R., Ginoza, S., and A. Hagens, "RFC Document Style", September 2009, . [RFC2026] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, DOI 10.17487/RFC2026, October 1996, . [RFC4181] Heard, C., "Guidelines for Authors and Reviewers of MIB Documents", BCP 111, RFC 4181, September 2005. [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, May 2008. [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG Data Model Documents", RFC 6087, January 2011. + [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., + and A. Bierman, Ed., "Network Configuration Protocol + (NETCONF)", RFC 6241, June 2011. + + [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure + Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, + . + [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration Protocol (NETCONF) Access Control Model", RFC 6536, March 2012. [RFC7223] Bjorklund, M., "A YANG Data Model for Interface Management", RFC 7223, May 2014. + [RFC7322] Flanagan, H. and S. Ginoza, "RFC Style Guide", RFC 7322, + DOI 10.17487/RFC7322, September 2014, + . + + [RFC7841] Halpern, J., Ed., Daigle, L., Ed., and O. Kolkman, Ed., + "RFC Streams, Headers, and Boilerplates", RFC 7841, + DOI 10.17487/RFC7841, May 2016, + . + Appendix A. Change Log -- RFC Ed.: remove this section before publication. -A.1. v07 to v08 +A.1. v08 to v09 + + o fixed references + + o added mention of RESTCONF to abstract and intro + + o created separate section for code components + + o fixed document status + +A.2. v07 to v08 o changed CODE BEGINS guideline for example modules o updated tree diagram guidelines o clarified published and unpublished terms o added section on Empty and Boolean data types o clarified how to update the revision statement o updated operational state guidelines o added 'YANG fragment' to terminology section -A.2. v06 to v07 +A.3. v06 to v07 o update contact statement guideline o update example modules guidelines o add guidelines on top-level data nodes o add guideline on use of NP containers o added guidelines on union types o add guideline on deviations o added section on open systems considerations o added guideline about definitions reserved for future use -A.3. v05 to v06 +A.4. v05 to v06 o Changed example 'my-module' to 'example-module' o Added section Updating YANG Modules (Published vs. Unpublished) o Added Example Modules section o Added "" convention for full example modules + o Added section on using action vs. rpc o Changed term "operational state" to "operational data" o Added section on YANG Data Node Constraints o Added guidelines on using must vs. when statements o Made ietf-foo module validate for I-D submission @@ -2456,21 +2497,21 @@ o Added section on using action vs. rpc o Changed term "operational state" to "operational data" o Added section on YANG Data Node Constraints o Added guidelines on using must vs. when statements o Made ietf-foo module validate for I-D submission -A.4. v04 to v05 +A.5. v04 to v05 o Clarified that YANG 1.1 SHOULD be used but YANG 1.0 MAY be used if no YANG 1.1 features needed o Changed SHOULD follow YANG naming conventions to MUST follow (for standards track documents only) o Clarified module naming conventions for normative modules, example modules, and modules from other SDOs. @@ -2478,39 +2519,39 @@ o Added new section on guidelines for reusable groupings o Made header guidelines less IETF-specific o Added new section on guidelines for extension statements o Added guidelines for nested "choice" statement within a "case" statement -A.5. v03 ot v04 +A.6. v03 ot v04 o Added sections for deviation statements and performance considerations o Added YANG 1.1 section o Updated YANG reference from 1.0 to 1.1 -A.6. v02 to v03 +A.7. v02 to v03 o Updated draft based on github data tracker issues added by Benoit Clause (Issues 12 - 18) -A.7. v01 to v02 +A.8. v01 to v02 o Updated draft based on mailing list comments. -A.8. v00 to v01 +A.9. v00 to v01 All issues from the issue tracker have been addressed. https://github.com/netmod-wg/rfc6087bis/issues o Issue 1: Tree Diagrams: Added Section 3 so RFCs with YANG modules can use an Informative reference to this RFC for tree diagrams. Updated guidelines to reference this RFC when tree diagrams are used @@ -2582,21 +2623,21 @@ o IANA Considerations section -- this section must always be present. For each module within the document, ensure that the IANA Considerations section contains entries for the following IANA registries: XML Namespace Registry: Register the YANG module namespace. YANG Module Registry: Register the YANG module name, prefix, namespace, and RFC number, according to the rules specified - in [I-D.ietf-netmod-rfc6020bis]. + in [RFC7950]. o References -- verify that the references are properly divided between normative and informative references, that RFC 2119 is included as a normative reference if the terminology defined therein is used in the document, that all references required by the boilerplate are present, that all YANG modules containing imported items are cited as normative references, and that all citations point to the most current RFCs unless there is a valid reason to do otherwise (for example, it is OK to include an informative reference to a previous version of a specification to