Guidelines for Authors and Reviewers of YANG Data Model Documents
draft-ietf-netmod-rfc6087bis-04
The information below is for an old version of the document.
Document | Type |
This is an older version of an Internet-Draft that was ultimately published as RFC 8407.
|
|
---|---|---|---|
Author | Andy Bierman | ||
Last updated | 2015-10-14 (Latest revision 2015-07-06) | ||
Replaces | draft-bierman-netmod-rfc6087bis | ||
RFC stream | Internet Engineering Task Force (IETF) | ||
Formats | |||
Reviews | |||
Additional resources | Mailing list discussion | ||
Stream | WG state | WG Document | |
Document shepherd | Kent Watsen | ||
IESG | IESG state | Became RFC 8407 (Best Current Practice) | |
Consensus boilerplate | Unknown | ||
Telechat date | (None) | ||
Responsible AD | (None) | ||
Send notices to | (None) |
draft-ietf-netmod-rfc6087bis-04
Internet-Draft Guidelines for YANG Documents July 2015 5.13. Data Definitions The description statement MUST be present in the following YANG statements: o anyxml o augment o choice o container o extension o feature o grouping o identity o leaf o leaf-list o list o notification o rpc o typedef If the data definition semantics are defined in an external document, (other than another YANG module indicated by an import statement), then a reference statement MUST be present. The 'anyxml' construct may be useful to represent an HTML banner containing markup elements, such as '<b>' and '</b>', and MAY be used in such cases. However, this construct SHOULD NOT be used if other YANG data node types can be used instead to represent the desired syntax and semantics. It has been found that the 'anyxml' statement is not implemented consistently across all servers. It is possible that mixed mode XML will not be supported, or configuration anyxml nodes will not supported. Bierman Expires January 7, 2016 [Page 28] Internet-Draft Guidelines for YANG Documents July 2015 If there are referential integrity constraints associated with the desired semantics that can be represented with XPath, then one or more 'must' statements SHOULD be present. For list and leaf-list data definitions, if the number of possible instances is required to be bounded for all implementations, then the max-elements statements SHOULD be present. If any 'must' or 'when' statements are used within the data definition, then the data definition description statement SHOULD describe the purpose of each one. 5.14. Operation Definitions If the operation semantics are defined in an external document (other than another YANG module indicated by an import statement), then a reference statement MUST be present. If the operation impacts system behavior in some way, it SHOULD be mentioned in the description statement. If the operation is potentially harmful to system behavior in some way, it MUST be mentioned in the Security Considerations section of the document. 5.15. Notification Definitions The description statement MUST be present. If the notification semantics are defined in an external document (other than another YANG module indicated by an import statement), then a reference statement MUST be present. If the notification refers to a specific resource instance, then this instance SHOULD be identified in the notification data. This is usually done by including 'leafref' leaf nodes with the key leaf values for the resource instance. For example: notification interface-up { description "Sent when an interface is activated."; leaf name { type leafref { path "/if:interfaces/if:interface/if:name"; } } } Note that there are no formal YANG statements to identify any data Bierman Expires January 7, 2016 [Page 29] Internet-Draft Guidelines for YANG Documents July 2015 node resources associated with a notification. The description statement for the notification SHOULD specify if and how the notification identifies any data node resources associated with the specific event. 5.16. Feature Definitions The YANG "feature" statement is used to define a label for a set of optional functionality within a module. The "if-feature" statement is used in the YANG statements associated with a feature. The set of YANG features available in a module should be considered carefully. The description-stmt within a feature-stmt MUST specify any interactions with other features. If there is a large set of objects associated with a YANG feature, then consider moving those objects to a separate module, instead of using a YANG feature. Note that the set of features within a module is easily discovered by the reader, but the set of related modules within the entire YANG library is not as easy to identity. Module names with a common prefix can help readers identity the set of related modules, but this assumes the reader will have discovered and installed all the relevant modules. Another consideration for deciding whether to create a new module or add a YANG feature is the stability of the module in question. It may be desirable to have a stable base module that is not changed frequently. If new functionality is placed in a separate module, then the base module does not need to be republished. If it is designed as a YANG feature then the module will need to be republished. If one feature requires implementation of another feature, then an "if-feature" statement SHOULD be used in the dependent "feature" statement. For example, feature2 requires implementation of feature1: feature feature1 { description "Some protocol feature"; } feature feature2 { if-feature "feature1"; description "Another protocol feature"; } Bierman Expires January 7, 2016 [Page 30] Internet-Draft Guidelines for YANG Documents July 2015 5.17. Augment Statements The YANG "augment" statement is used to define a set of data definition statements that will be added as child nodes of a target data node. The module namespace for these data nodes will be the augmenting module, not the augmented module. A top-level "augment" statement SHOULD NOT be used if the target data node is in the same module or submodule as the evaluated "augment" statement. The data definition statements SHOULD be added inline instead. 5.17.1. Conditional Augment Statements The "augment" statement is often used together with the "when" statement and/or "if-feature" statement to make the augmentation conditional on some portion of the data model. The following example from [RFC7223] shows how a conditional container called "ethernet" is added to the "interface" list only for entries of the type "ethernetCsmacd". augment "/if:interfaces/if:interface" { when "if:type = 'ianaift:ethernetCsmacd'"; container ethernet { leaf duplex { ... } } } 5.17.2. Conditionally Mandatory Data Definition Statements YANG has very specific rules about how configuration data can be updated in new releases of a module. These rules allow an "old client" to continue interoperating with a "new server". If data nodes are added to an existing entry, the old client MUST NOT be required to provide any mandatory parameters that were not in the original module definition. It is possible to add conditional augment statements such that the old client would not know about the new condition, and would not specify the new condition. The conditional augment statement can contain mandatory objects only if the condition is false unless explicitly requested by the client. Bierman Expires January 7, 2016 [Page 31] Internet-Draft Guidelines for YANG Documents July 2015 Only a conditional augment statement that uses the "when" statement form of condition can be used in this manner. The YANG features enabled on the server cannot be controlled by the client in any way, so it is not safe to add mandatory augmenting data nodes based on the "if-feature" statement. The XPath "when" statement condition MUST NOT reference data outside of target data node because the client does not have any control over this external data. In the following dummy example, it is OK to augment the "interface" entry with "mandatory-leaf" because the augmentation depends on support for "some-new-iftype". The old client does not know about this type so it would never select this type, and therefore not be adding a mandatory data node. module my-module { ... identity some-new-iftype { base iana:iana-interface-type; } augment "/if:interfaces/if:interface" { when "if:type = 'mymod:some-new-iftype'"; leaf mandatory-leaf { mandatory true; ... } } } Note that this practice is safe only for creating data resources. It is not safe for replacing or modifying resources if the client does not know about the new condition. The YANG data model MUST be packaged in a way that requires the client to be aware of the mandatory data nodes if it is aware of the condition for this data. In the example above, the "some-new-iftype" identity is defined in the same module as the "mandatory-leaf" data definition statement. This practice is not safe for identities defined in a common module such as "iana-if-type" because the client is not required to know about "my-module" just because it knows about the "iana-if-type" module. Bierman Expires January 7, 2016 [Page 32] Internet-Draft Guidelines for YANG Documents July 2015 5.18. Deviation Statements The YANG "deviation" statement cannot appear in IETF YANG modules, but it can be useful for documenting server capabilities. Deviation statements are not reusable and typically not shared across all platforms. There are several reasons that deviations might be needed in an implementation, e.g., an object cannot be supported on all platforms, or feature delivery is done in multiple development phases. It is suggested that deviation statements be defined in separate modules from regular YANG definitions. This allows the deviations to be platform-specific and/or temporary. The "max-elements" statement is intended to describe an architectural limit to the number of list entries. It is not intended to describe platform limitations. It is better to use a "deviation" statement for the platforms that have a hard resource limit. Example documenting platform resource limits: Wrong: (max-elements in the list itself) container backups { list backup { ... max-elements 10; ... } } Correct: (max-elements in a deviation) deviation /bk:backups/bk:backup { deviate add { max-elements 10; } } 5.19. Data Correlation Data can be correlated in various ways, using common data types, common data naming, and common data organization. There are several ways to extend the functionality of a module, based on the degree of coupling between the old and new functionality: Bierman Expires January 7, 2016 [Page 33] Internet-Draft Guidelines for YANG Documents July 2015 o inline: update the module with new protocol-accessible objects. The naming and data organization of the original objects is used. The new objects are in the original module namespace. o augment: create a new module with new protocol-accessible objects that augment the original data structure. The naming and data organization of the original objects is used. The new objects are in the new module namespace. o mirror: create new objects in a new module or the original module, except use new a naming scheme and data location. The naming can be coupled in different ways. Tight coupling is achieved with a "leafref" data type, with the "require-instance" sub-statement set to "true". This method SHOULD be used. If the new data instances are not limited to the values in use in the original data structure, then the "require-instance" sub-statement MUST be set to "false". Loose coupling is achieved by using key leafs with the same data type as the original data structure. This has the same semantics as setting the "require-instance" sub- statement to "false". It is sometimes useful to separate configuration and operational state, so that they do not not even share the exact same naming characteristics. The correlation between configuration the operational state data that is affected by changes in configuration is a complex problem. There may not be a simple 1:1 relationship between a configuration data node and an operational data node. Further work is needed in YANG to clarify this relationship. Protocol work may also be needed to allow a client to retrieve this type of information from a server. At this time the best practice is to clearly document any relationship to other data structures in the "description" statement. 5.20. Operational State In YANG, any data that has a "config" statement value of "false" could be considered operational state. The relationship between configuration (i.e., "config" statement has a value of "true") and operational state can be complex. One challenge for client developers is determining if the configured value is being used, which requires the developer to know which operational state parameters are associated with the particular configuration object (or group of objects). The simplest interaction between configuration and operational state is "none". For example, the arbitrary administrative name or Bierman Expires January 7, 2016 [Page 34] Internet-Draft Guidelines for YANG Documents July 2015 sequence number assigned to an access control rule. The configured value is always the value that is being used by the system. However, some configuration parameters interact with routing and other signalling protocols, such that the operational value in use by the system may not be the same as the configured value. Other parameters specify the desired state, but environmental and other factors can cause the actual state to be different. For example a "temperature" configuration setting only represents the desired temperature. An operational state parameter is needed that 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 state 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 operation state within the configuration subtree is appropriate if the operational values can only exist if the configuration exists. The "interfaces" and "interfaces-state" subtrees defined in [RFC7223] are an example of a complex relationship between configuration and operational state. 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 state 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. Bierman Expires January 7, 2016 [Page 35] Internet-Draft Guidelines for YANG Documents July 2015 leaf duplex-admin-mode { type enumeration { enum auto; enum half; enum full; } } leaf duplex-oper-mode { config false; type enumeration { enum half; enum full; } } For example a "duplex" mode configuration may be "auto" to auto- negotiate the actual value to be used. The operational parameter will never contain the value "auto". It will always contain the result of the auto-negotiation, such as "half" or "full". This is just one way in which the configuration data model is not exactly the same as the operational data model. Another is if the detailed properties of the data are different for configured vs. learned entries. If all the data model properties are aligned between configuration and operational data, then it can be useful to define the configuration parameters within a grouping, and then replicate that grouping within the operational state portion of the data model. grouping parms { // do not use config-stmt in any of the nodes // placed in this grouping } container foo { uses parms; // these are all config=true by default state { config false; // only exists if foo config exists uses parms; } } Note that this mechanism can also be used if the configuration and operational state data are in separate sub-trees: Bierman Expires January 7, 2016 [Page 36] Internet-Draft Guidelines for YANG Documents July 2015 container bar { // bar config can exist without bar-state config true; uses parms; } container bar-state { // bar-state can exist without bar config false; uses parms; } The need to replicate objects or define different operational state objects depends on the data model. It is not possible to define one approach that will be optimal for all data models. Designers SHOULD describe the relationship in detail between configuration objects and any associated operational state objects. The "description" statements for both the configuration and the operational state SHOULD be used for this purpose. 5.21. Performance Considerations It is generally likely that certain YANG statements require more runtime resources than other statements. Although there are no performance requirements for YANG validation, the following information MAY be considered when designing YANG data models: o Lists are generally more expensive than containers o "when-stmt" evaluation is generally more expensive than "if-feature" or "choice" statements o "must" statement is generally more expensive than "min-entries", "max-entries", "mandatory", or "unique" statements o "identityref" leafs are generally more expensive than "enumeration" leafs o "leafref" and "instance-identifier" types with "requite-instance" set to true are generally more expensive than if "require-instance" is set to false 5.22. YANG 1.1 Guidelines TODO: need more input on YANG 1.1 guidelines 5.22.1. Importing Multiple Revisions Standard modules SHOULD NOT import multiple revisions of the same module into a module. This MAY be done if the authors can Bierman Expires January 7, 2016 [Page 37] Internet-Draft Guidelines for YANG Documents July 2015 demonstrate that the "avoided" definitions from most recent of the multiple revisions are somehow broken or harmful to interoperability. 5.22.2. Using Feature Logic The YANG 1.1 feature logic is much more expressive than YANG 1.0. A "description" statement SHOULD describe the "if-feature" logic in text, to help readers understand the module. YANG features SHOULD be used instead of the "when" statement, if possible. This reduces server implementation complexity and might reduce runtime resource requirements as well. 5.22.3. anyxml vs. anydata The "anyxml" statement MUST NOT be used to represent a conceptual subtree of YANG data nodes. The "anydata" statment MUST be used for this purpose. Bierman Expires January 7, 2016 [Page 38] Internet-Draft Guidelines for YANG Documents July 2015 6. IANA Considerations This document registers one URI in the IETF XML registry [RFC3688]. The following registration has been made: 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. +-----------+-------------------------------------------+ | Field | Value | +-----------+-------------------------------------------+ | Name | ietf-template | | Namespace | urn:ietf:params:xml:ns:yang:ietf-template | | Prefix | temp | | Reference | RFC XXXX | +-----------+-------------------------------------------+ YANG Registry Assignment Bierman Expires January 7, 2016 [Page 39] Internet-Draft Guidelines for YANG Documents July 2015 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 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. Each specification that defines one or more YANG 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://www.ops.ietf.org/netconf/yang-security-considerations.txt). In particular, writable data nodes that could be especially disruptive if abused MUST be explicitly listed by name and the associated security risks MUST be spelled out. Similarly, 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. Further, if new RPC operations have been defined, then the security considerations of each new RPC operation MUST be explained. 7.1. Security Considerations Section Template X. Security Considerations The YANG module defined in this memo is designed to be accessed via the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the secure transport layer and the mandatory-to-implement secure transport is SSH [RFC6242]. -- if you have any writable data nodes (those are all the -- "config true" nodes, and remember, that is the default) -- describe their specific sensitivity or vulnerability. Bierman Expires January 7, 2016 [Page 40] Internet-Draft Guidelines for YANG Documents July 2015 There are a number of data nodes defined in this YANG module which are writable/creatable/deletable (i.e., config true, which is the default). These data nodes may be considered sensitive or vulnerable in some network environments. Write operations (e.g., edit-config) to these data nodes without proper protection can have a negative effect on network operations. These are the subtrees and data nodes and their sensitivity/vulnerability: <list subtrees and data nodes and state why they are sensitive> -- for all YANG modules you must evaluate whether any readable data -- nodes (those are all the "config false" nodes, but also all other -- nodes, because they can also be read via operations like get or -- get-config) are sensitive or vulnerable (for instance, if they -- might reveal customer information or violate personal privacy -- laws such as those of the European Union if exposed to -- unauthorized parties) Some of the readable data nodes in this YANG module may be considered sensitive or vulnerable in some network environments. It is thus important to control read access (e.g., via get, get-config, or notification) to these data nodes. These are the subtrees and data nodes and their sensitivity/vulnerability: <list subtrees and data nodes and state why they are sensitive> -- if your YANG module has defined any rpc operations -- describe their specific sensitivity or vulnerability. Some of the RPC operations in this YANG module may be considered sensitive or vulnerable in some network environments. It is thus important to control access to these operations. These are the operations and their sensitivity/vulnerability: <list RPC operations and state why they are sensitive> Bierman Expires January 7, 2016 [Page 41] Internet-Draft Guidelines for YANG Documents July 2015 8. Acknowledgments The structure and contents of this document are adapted from [RFC4181], guidelines for MIB Documents, by C. M. Heard. The working group thanks Martin Bjorklund, Juergen Schoenwaelder, Ladislav Lhotka, and Jernej Tuljak for their extensive reviews and contributions to this document. Bierman Expires January 7, 2016 [Page 42] Internet-Draft Guidelines for YANG Documents July 2015 9. Changes Since RFC 6087 The following changes have been made to the guidelines published in [RFC6087]: o Updated NETCONF reference from RFC 4741 to RFC 6241 o Updated NETCONF over SSH citation from RFC 4742 to RFC 6242 o Updated YANG Types reference from RFC 6021 to RFC 6991 o Updated obsolete URLs for IETF resources o Changed top-level data node guideline o Clarified XPath usage for a literal value representing a YANG identity o Clarified XPath usage for a when-stmt o Clarified XPath usage for 'proceeding-sibling' and 'following-sibling' axes o Added terminology guidelines o Added YANG tree diagram definition and guideline o Updated XPath guidelines for type conversions and function library usage. o Updated data types section o Updated notifications section o Clarified conditional key leaf nodes 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 Bierman Expires January 7, 2016 [Page 43] Internet-Draft Guidelines for YANG Documents July 2015 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-06 (work in progress), July 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. [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. [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, <http://www.w3.org/TR/1999/REC-xpath-19991116>. 10.2. Informative References [RFC-STYLE] Braden, R., Ginoza, S., and A. Hagens, "RFC Document Style", September 2009, <http://www.rfc-editor.org/rfc-style-guide/rfc-style>. Bierman Expires January 7, 2016 [Page 44] Internet-Draft Guidelines for YANG Documents July 2015 [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. [RFC7223] Bjorklund, M., "A YANG Data Model for Interface Management", RFC 7223, May 2014. Bierman Expires January 7, 2016 [Page 45] Internet-Draft Guidelines for YANG Documents July 2015 Appendix A. Change Log -- RFC Ed.: remove this section before publication. A.1. 03 ot 04 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.2. 02 to 03 o Updated draft based on github data tracker issues added by Benoit Clause (Issues 12 - 18) A.3. 01 to 02 o Updated draft based on mailing list comments. A.4. 00 to 01 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 o Issue 2: XPath function restrictions: Added paragraphs in XPath usage section for 'id', 'namespace-uri', 'name', and 'lang' functions o Issue 3: XPath function document order issues: Added paragraph in XPath usage section about node-set ordering for 'local-name', 'namespace-uri', 'name', 'string' and 'number' functions. Also any function that implicitly converts a node-set to a string. o Issue 4: XPath preceding-sibling and following-sibling: Checked and text in XPath usage section already has proposed text from Lada. o Issue 5: XPath 'when-stmt' reference to descendant nodes: Added exception and example in XPath Usage section for augmented nodes. Bierman Expires January 7, 2016 [Page 46] Internet-Draft Guidelines for YANG Documents July 2015 o Issue 6: XPath numeric conversions: Changed 'numeric expressions' to 'numeric and boolean expressions' o Issue 7: XPath module containment: Added sub-section on XPath wildcards o Issue 8: status-stmt usage: Added text to Lifecycle Management section about transitioning from active to deprecated and then to obsolete. o Issue 9: resource identification in notifications: Add text to Notifications section about identifying resources and using the leafref data type. o Issue 10: single quoted strings: Added text to Data Types section about using a single-quoted string for patterns. Bierman Expires January 7, 2016 [Page 47] Internet-Draft Guidelines for YANG Documents July 2015 Appendix B. Module Review Checklist This section is adapted from RFC 4181. The purpose of a YANG module review is to review the YANG module both for technical correctness and for adherence to IETF documentation requirements. The following checklist may be helpful when reviewing an Internet-Draft: o I-D Boilerplate -- verify that the draft contains the required Internet-Draft boilerplate (see http://www.ietf.org/id-info/guidelines.html), including the appropriate statement to permit publication as an RFC, and that I-D boilerplate does not contain references or section numbers. o Abstract -- verify that the abstract does not contain references, that it does not have a section number, and that its content follows the guidelines in http://www.ietf.org/id-info/guidelines.html. o Copyright Notice -- verify that the draft has the appropriate text regarding the rights that document contributers provide to the IETF Trust [RFC5378]. Verify that it contains the full IETF Trust copyright notice at the beginning of the document. The IETF Trust Legal Provisions (TLP) can be found at: http://trustee.ietf.org/license-info/ o Security Considerations section -- verify that the draft uses the latest approved template from the OPS area website (http:// trac.tools.ietf.org/area/ops/trac/wiki/yang-security-guidelines) and that the guidelines therein have been followed. 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]. Bierman Expires January 7, 2016 [Page 48] Internet-Draft Guidelines for YANG Documents July 2015 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 help explain a feature included for backward compatibility). Be sure citations for all imported modules are present somewhere in the document text (outside the YANG module). o License -- verify that the draft contains the Simplified BSD License in each YANG module or submodule. Some guidelines related to this requirement are described in Section 4.1. Make sure that the correct year is used in all copyright dates. Use the approved text from the latest Trust Legal Provisions (TLP) document, which can be found at: http://trustee.ietf.org/license-info/ o Other Issues -- check for any issues mentioned in http://www.ietf.org/id-info/checklist.html that are not covered elsewhere. o Technical Content -- review the actual technical content for compliance with the guidelines in this document. The use of a YANG module compiler is recommended when checking for syntax errors. A list of freely available tools and other information can be found at: http://trac.tools.ietf.org/wg/netconf/trac/wiki Checking for correct syntax, however, is only part of the job. It is just as important to actually read the YANG module document from the point of view of a potential implementor. It is particularly important to check that description statements are sufficiently clear and unambiguous to allow interoperable implementations to be created. Bierman Expires January 7, 2016 [Page 49] Internet-Draft Guidelines for YANG Documents July 2015 Appendix C. YANG Module Template <CODE BEGINS> file "ietf-template@2010-05-18.yang" module ietf-template { // replace this string with a unique namespace URN value namespace "urn:ietf:params:xml:ns:yang:ietf-template"; // replace this string, and try to pick a unique prefix prefix "temp"; // import statements here: e.g., // import ietf-yang-types { prefix yang; } // import ietf-inet-types { prefix inet; } // identify the IETF working group if applicable organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; // update this contact statement with your info contact "WG Web: <http://tools.ietf.org/wg/your-wg-name/> WG List: <mailto:your-wg-name@ietf.org> WG Chair: your-WG-chair <mailto:your-WG-chair@example.com> Editor: your-name <mailto:your-email@example.com>"; // replace the first sentence in this description statement. // replace the copyright notice with the most recent // version, if it has been updated since the publication // of this document description "This module defines a template for other YANG modules. Copyright (c) <insert year> IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License Bierman Expires January 7, 2016 [Page 50] Internet-Draft Guidelines for YANG Documents July 2015 set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and remove // this note reference "RFC XXXX"; // RFC Ed.: remove this note // Note: extracted from RFC XXXX // replace '2010-05-18' with the module publication date // The format is (year-month-day) revision "2010-05-18" { description "Initial version"; } // extension statements // feature statements // identity statements // typedef statements // grouping statements // data definition statements // augment statements // rpc statements // notification statements // DO NOT put deviation statements in a published module } <CODE ENDS> Bierman Expires January 7, 2016 [Page 51] Internet-Draft Guidelines for YANG Documents July 2015 Author's Address Andy Bierman YumaWorks Email: andy@yumaworks.com Bierman Expires January 7, 2016 [Page 52]