idnits 2.17.1 draft-ietf-netmod-yang-usage-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: Once a module name is published, it MUST not be reused, even if the RFC containing the module is reclassified to 'Historic' status. -- The document date (October 26, 2009) is 5289 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '42' on line 425 == Missing Reference: 'TBD' is mentioned on line 787, but not defined ** Obsolete normative reference: RFC 4741 (Obsoleted by RFC 6241) == Outdated reference: A later version (-13) exists of draft-ietf-netmod-yang-08 == Outdated reference: A later version (-09) exists of draft-ietf-netmod-yang-types-04 Summary: 2 errors (**), 0 flaws (~~), 5 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force A. Bierman 3 Internet-Draft Netconf Central, Inc. 4 Intended status: Informational October 26, 2009 5 Expires: April 29, 2010 7 Guidelines for Authors and Reviewers of YANG Data Model Documents 8 draft-ietf-netmod-yang-usage-02 10 Status of this Memo 12 This Internet-Draft is submitted to IETF in full conformance with the 13 provisions of BCP 78 and BCP 79. 15 Internet-Drafts are working documents of the Internet Engineering 16 Task Force (IETF), its areas, and its working groups. Note that 17 other groups may also distribute working documents as Internet- 18 Drafts. 20 Internet-Drafts are draft documents valid for a maximum of six months 21 and may be updated, replaced, or obsoleted by other documents at any 22 time. It is inappropriate to use Internet-Drafts as reference 23 material or to cite them other than as "work in progress." 25 The list of current Internet-Drafts can be accessed at 26 http://www.ietf.org/ietf/1id-abstracts.txt. 28 The list of Internet-Draft Shadow Directories can be accessed at 29 http://www.ietf.org/shadow.html. 31 This Internet-Draft will expire on April 29, 2010. 33 Copyright Notice 35 Copyright (c) 2009 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents in effect on the date of 40 publication of this document (http://trustee.ietf.org/license-info). 41 Please review these documents carefully, as they describe your rights 42 and restrictions with respect to this document. 44 Abstract 46 This memo provides guidelines for authors and reviewers of standards 47 track specifications containing YANG data model modules. Applicable 48 portions may be used as a basis for reviews of other YANG data model 49 documents. Recommendations and procedures are defined, which are 50 intended to increase interoperability and usability of NETCONF 51 implementations which utilize YANG data model modules. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 56 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 57 2.1. Requirements Notation . . . . . . . . . . . . . . . . . . 5 58 2.2. NETCONF Terms . . . . . . . . . . . . . . . . . . . . . . 5 59 2.3. YANG Terms . . . . . . . . . . . . . . . . . . . . . . . . 5 60 2.4. Terms . . . . . . . . . . . . . . . . . . . . . . . . . . 6 61 3. General Documentation Guidelines . . . . . . . . . . . . . . . 7 62 3.1. YANG Data Model Boilerplate Section . . . . . . . . . . . 7 63 3.2. Narrative Sections . . . . . . . . . . . . . . . . . . . . 7 64 3.3. Definitions Section . . . . . . . . . . . . . . . . . . . 8 65 3.4. Security Considerations Section . . . . . . . . . . . . . 8 66 3.5. IANA Considerations Section . . . . . . . . . . . . . . . 8 67 3.5.1. Documents that Create a New Name Space . . . . . . . . 8 68 3.5.2. Documents that Extend an Existing Name Space . . . . . 9 69 3.6. Reference Sections . . . . . . . . . . . . . . . . . . . . 9 70 3.7. Copyright Notices . . . . . . . . . . . . . . . . . . . . 9 71 3.8. Intellectual Property Section . . . . . . . . . . . . . . 9 72 4. YANG Usage Guidelines . . . . . . . . . . . . . . . . . . . . 10 73 4.1. Module Naming Conventions . . . . . . . . . . . . . . . . 10 74 4.2. Identifiers . . . . . . . . . . . . . . . . . . . . . . . 10 75 4.3. Defaults . . . . . . . . . . . . . . . . . . . . . . . . . 10 76 4.4. Conditional Statements . . . . . . . . . . . . . . . . . . 11 77 4.5. Lifecycle Management . . . . . . . . . . . . . . . . . . . 12 78 4.6. Header Contents . . . . . . . . . . . . . . . . . . . . . 12 79 4.7. Temporary Namespace Assignments . . . . . . . . . . . . . 13 80 4.8. Top Level Database Objects . . . . . . . . . . . . . . . . 14 81 4.9. Data Types . . . . . . . . . . . . . . . . . . . . . . . . 15 82 4.10. Reusable Type Definitions . . . . . . . . . . . . . . . . 15 83 4.11. Object Definitions . . . . . . . . . . . . . . . . . . . . 16 84 4.12. RPC Definitions . . . . . . . . . . . . . . . . . . . . . 17 85 4.13. Notification Definitions . . . . . . . . . . . . . . . . . 17 86 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 87 6. Security Considerations . . . . . . . . . . . . . . . . . . . 19 88 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 20 89 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21 90 8.1. Normative References . . . . . . . . . . . . . . . . . . . 21 91 8.2. Informative References . . . . . . . . . . . . . . . . . . 21 92 Appendix A. Module Review Checklist . . . . . . . . . . . . . . . 22 93 Appendix B. YANG Module Template . . . . . . . . . . . . . . . . 24 94 Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 27 95 C.1. Changes from 00 to 01 . . . . . . . . . . . . . . . . . . 27 96 C.2. Changes from 01 to 02 . . . . . . . . . . . . . . . . . . 27 97 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 28 99 1. Introduction 101 The standardization of network configuration interfaces for use with 102 the NETCONF [RFC4741] protocol requires a modular set of data models, 103 which can be reused and extended over time. 105 This document defines a set of usage guidelines for standards track 106 documents containing YANG [I-D.ietf-netmod-yang] data models. It is 107 similar to the MIB usage guidelines specification [RFC4181] in intent 108 and structure. 110 Many YANG constructs are defined as optional to use, such as the 111 description clause. However, in order to maximize interoperability 112 of NETCONF implementations utilizing YANG data models, it is 113 desirable to define a set of usage guidelines which may require a 114 higher level of compliance than the minimum level defined in the YANG 115 specification. 117 The NETCONF stack can be conceptually partitioned into four layers. 119 Layer Example 120 +-------------+ +--------------------+ +-------------------+ 121 (4) | Content | | Configuration data | | Notification data | 122 +-------------+ +--------------------+ +-------------------+ 123 | | | 124 +-------------+ +-----------------+ +---------------+ 125 (3) | Operations | | | | | 126 +-------------+ +-----------------+ +---------------+ 127 | | | 128 +-------------+ +--------------------+ +----------------+ 129 (2) | Messages | | , | | | 130 +-------------+ +--------------------+ +----------------+ 131 | | | 132 +-------------+ +-----------------------------------------------+ 133 (1) | Secure | | SSH, TLS, BEEP/TLS, SOAP/BEEP, SOAP/HTTPS ... | 134 | Transports | | | 135 +-------------+ +-----------------------------------------------+ 137 Figure 1 139 This document defines usage guidelines related to the NETCONF 140 operations layer (3), and NETCONF content layer (4). 142 2. Terminology 144 2.1. Requirements Notation 146 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 147 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 148 document are to be interpreted as described in [RFC2119]. 150 RFC 2119 language is used here to express the views of the NETMOD 151 working group regarding YANG module content. Yang modules complying 152 with this document will treat the RFC 2119 terminology as if it were 153 describing best current practices. 155 2.2. NETCONF Terms 157 The following terms are defined in [RFC4741] and are not redefined 158 here: 160 o application 162 o capabilities 164 o client 166 o operation 168 o RPC 170 o server 172 2.3. YANG Terms 174 The following terms are defined in [I-D.ietf-netmod-yang] and are not 175 redefined here: 177 o data node 179 o module 181 o submodule 183 o namespace 185 o version 187 2.4. Terms 189 The following terms are used throughout this document: 191 o module: Generic term for a YANG data model module or submodule. 192 When describing properties which are specific to submodules, the 193 term 'YANG submodule', or simply 'submodule' is used instead. 195 o Published Document: A stable release of a module, usually 196 contained in an RFC. 198 o Unpublished Document: An unstable release of a module, usually 199 contained in an Internet Draft. 201 3. General Documentation Guidelines 203 YANG data model modules under review are likely to be contained in 204 Internet Drafts. All guidelines for Internet Draft authors MUST be 205 followed. These guidelines are available online at: 206 http://www.rfc-editor.org/rfc-editor/instructions2authors.txt 208 The following sections MUST be present in an Internet Draft 209 containing a module: 211 o YANG data model boilerplate section 213 o Narrative sections 215 o Definitions section 217 o Security Considerations section 219 o IANA Considerations section 221 o References section 223 3.1. YANG Data Model Boilerplate Section 225 This section MUST contain a verbatim copy of the latest approved 226 Internet-Standard Management Framework boilerplate, which is 227 available on-line, in section 4 of the Trust Legal Provisions (TLP) 228 document, at: http://trustee.ietf.org/license-info/ 230 Each YANG module contained within an Internet Draft or RPC MUST be 231 identified as a 'Code Component'. The strings '' and 232 '' SHOULD be used to identify each Code Component. 234 3.2. Narrative Sections 236 The narrative part MUST include an overview section that describes 237 the scope and field of application of the module(s) defined by the 238 specification and that specifies the relationship (if any) of these 239 modules to other standards, particularly to standards containing 240 other module modules. The narrative part SHOULD include one or more 241 sections to briefly describe the structure of the modules defined in 242 the specification. 244 If the module(s) defined by the specification import definitions from 245 other modules (except for those defined in the YANG 246 [I-D.ietf-netmod-yang] or YANG Types [I-D.ietf-netmod-yang-types] 247 documents) or are always implemented in conjunction with other 248 modules, then those facts MUST be noted in the overview section, as 249 MUST any special interpretations of objects in other modules. 251 3.3. Definitions Section 253 This section contains the module(s) defined by the specification. 254 These modules MUST be written in YANG [I-D.ietf-netmod-yang]. 256 See Section 4 for guidelines on YANG usage. 258 3.4. Security Considerations Section 260 Each specification that defines one or more modules MUST contain a 261 section that discusses security considerations relevant to those 262 modules. This section MUST be patterned after the latest approved 263 template (available at [ed: URL TBD]). 265 In particular, writable module objects that could be especially 266 disruptive if abused MUST be explicitly listed by name and the 267 associated security risks MUST be spelled out; similarly, readable 268 module objects that contain especially sensitive information or that 269 raise significant privacy concerns MUST be explicitly listed by name 270 and the reasons for the sensitivity/privacy concerns MUST be 271 explained. 273 3.5. IANA Considerations Section 275 In order to comply with IESG policy as set forth in 276 http://www.ietf.org/ID-Checklist.html, every Internet-Draft that is 277 submitted to the IESG for publication MUST contain an IANA 278 Considerations section. The requirements for this section vary 279 depending what actions are required of the IANA. 281 3.5.1. Documents that Create a New Name Space 283 If an Internet-Draft defines a new name space that is to be 284 administered by the IANA, then the document MUST include an IANA 285 Considerations section, that specifies how the name space is to be 286 administered. 288 Specifically, if any YANG module namespace statement value contained 289 in the document is not already registered with IANA, then a new YANG 290 Namespace registry entry must be requested from the IANA. The YANG 291 specification includes the procedure for this purpose in its IANA 292 Considerations section. 294 3.5.2. Documents that Extend an Existing Name Space 296 If an Internet-Draft defines any extensions to a YANG Namespace 297 already administered by the IANA, then the document MUST include an 298 IANA Considerations section, specifies how the name space extension 299 is to be administered. 301 Specifically, if any YANG submodule belongs-to value contained in the 302 document is associated with a module that contains a namespace 303 statement value equal to a YANG Namespace already administered by the 304 IANA, then the existing YANG Namespace must be updated to include the 305 new submodule. 307 3.6. Reference Sections 309 For every import or include statement which appears in a module 310 contained in the specification, which identifies a module in a 311 separate document, a corresponding normative reference to that 312 document MUST appear in the Normative References section. The 313 reference MUST correspond to the specific module version actually 314 used within the specification. 316 For every reference statement which appears in a module contained in 317 the specification, which identifies a separate document, a 318 corresponding normative reference to that document SHOULD appear in 319 the Normative References section. The reference SHOULD correspond to 320 the specific document version actually used within the specification. 322 3.7. Copyright Notices 324 The proper copyright notices MUST be present in the module 325 description statement. Refer to the IETF Trust Legal Provision for 326 the exact legal text that needs to be included. 328 3.8. Intellectual Property Section 330 The proper IPR statements MUST be present in the document, according 331 to the most current Internet Draft boilerplate. Refer to the IETF 332 Trust Legal Provision for the exact legal text that needs to be 333 included. 335 4. YANG Usage Guidelines 337 In general, modules in IETF standards-track specifications MUST 338 comply with all syntactic and semantic requirements of YANG. 339 [I-D.ietf-netmod-yang]. The guidelines in this section are intended 340 to supplement the YANG specification, which is intended to define a 341 minimum set of conformance requirements. 343 In order to promote interoperability and establish a set of practices 344 based on previous experience, the following sections establish usage 345 guidelines for specific YANG constructs. 347 Only guidelines which clarify or restrict the minimum conformance 348 requirements are included here. 350 4.1. Module Naming Conventions 352 Modules contained in standards track documents SHOULD be named with 353 the prefix 'ietf-'. Other types of modules MUST NOT use the 'ietf-' 354 prefix string. 356 A distinctive word or acronym (e.g., protocol name or working group 357 acronym) SHOULD be used in the module name. If new definitions are 358 being defined to extend one or more existing modules, then the same 359 word or acronym should be reused, instead of creating a new one. 361 All published module names MUST be unique. 363 Once a module name is published, it MUST not be reused, even if the 364 RFC containing the module is reclassified to 'Historic' status. 366 4.2. Identifiers 368 Identifiers for modules, submodules, typedefs, groupings, data 369 objects, rpcs, and notifications MUST be between 1 and 64 characters 370 in length. 372 4.3. Defaults 374 In general, it is suggested that sub-statements containing default 375 values SHOULD NOT be present. For example, 'status current;', 376 'config true;', 'mandatory false;', and 'max-elements unbounded;' are 377 common defaults which would make the module difficult to read if used 378 everywhere they are allowed. 380 Instead, it is suggested that common statements SHOULD only be used 381 when being set to a value other than the default value. 383 4.4. Conditional Statements 385 A module may be conceptually partitioned in several ways, using the 386 'if-feature' and/or 'when' statements. In addition, NETCONF 387 capabilities are designed to identify optional functionality. 389 Data model designers need to carefully consider all modularity 390 aspects, including the use of YANG conditional statements. 392 Objects SHOULD NOT directly reference NETCONF capabilities, in order 393 to specify optional behavior. Instead, a 'feature' statement SHOULD 394 be defined to represent the NETCONF capability, and the 'if-feature' 395 statement SHOULD be used within the object definition. 397 If the condition associated with the desired semantics is not 398 dependent on any particular instance value within the database, then 399 an 'if-feature' statement SHOULD be used instead of a 'when' 400 statement. 402 All 'must' and 'when' statements MUST contain valid XPath. If any 403 name tests are present, they MUST contain valid module prefixes and 404 data node names. References to non-existent nodes are considered 405 invalid in YANG, even though they are permitted in XPath. 407 The 'attribute' and 'namespace' axis SHOULD NOT be used because the 408 associated XML node types are not supported in YANG, and may not be 409 supported consistently across NETCONF server implementations. 411 The 'position' and 'last' functions SHOULD NOT be used. Also, the 412 'preceding', and 'following' axes SHOULD NOT be used. These 413 constructs rely on XML document order within a NETCONF server 414 configuration database, which may not be supported consistently or 415 produce reliable results across implementations. Predicate 416 expressions based on static node properties (e.g., name, value, 417 ancestors, descendants) SHOULD be used instead. 419 The 'preceding-sibling' and 'following-sibling' axes MAY be used, 420 with caution. A server is not required to maintain a persistent or 421 deterministic XML document order, which will affect use of these 422 axes. 424 Implicit 'position' function calls within predicates SHOULD NOT be 425 used. (e.g., //chapter[42]). 427 Data nodes which use the 'int64' and 'uint64' built-in type SHOULD 428 NOT be used within relational expressions. There are boundary 429 conditions in which the translation from the YANG 64-bit type to an 430 XPath number can cause incorrect results. 432 Data modelers need to be careful not to confuse the YANG value space 433 and the XPath value space. The data types are not the same in both, 434 and conversion between YANG and XPath data types SHOULD be considered 435 carefully. 437 Explicit XPath data type conversions MAY be used (e.g., 'string', 438 'boolean', or 'number' functions), instead of implicit XPath data 439 type conversions. 441 4.5. Lifecycle Management 443 The status statement SHOULD NOT be present if its value is 'current'. 444 It MUST be present if its value is 'deprecated' or 'obsolete'. 446 The module or submodule name MUST NOT be changed, once the document 447 containing the module or submodule is published. 449 The module namespace URI value SHOULD NOT be changed, once the 450 document containing the module is published. 452 The revision-date sub-statement (within the imports statement) SHOULD 453 be present. It MUST be present (in all published modules) if any 454 groupings are used from the external module. 456 The revision-date sub-statement (within the include statement) MAY be 457 present. It SHOULD be present (in all published modules) if any 458 groupings are used from the external sub-module. 460 4.6. Header Contents 462 For published modules, the namespace MUST be a globally unique URI, 463 as defined in [RFC3986]. This value is usually assigned by the IANA. 465 The organization statement MUST be present. If the module is 466 contained in a documented intended for standards-track status, then 467 the organization SHOULD be the IETF working group chartered to write 468 the document. 470 The contact statement MUST be present. If the module is contained in 471 a documented intended for standards-track status, then the working 472 group WEB and mailing information MUST be present, and the document 473 author contact information SHOULD be present. In addition, the Area 474 Director and other contact information MAY be present. 476 The description statement MUST be present. If the module is 477 contained in an unpublished document, then the file name of this 478 document SHOULD be identified in the description statement. This 479 text MUST be removed when the document is published. 481 Modules are often extracted from their original documents and it is 482 useful for developers and operators to know how to find the original 483 source document in a consistent manner. 485 The reference statement MUST be present. It MUST identify the 486 published document which contains the module. 488 If the module relies on information contained in other documents, 489 which are not the same documents implied by the import statements 490 present in the module, then these documents MUST be identified in the 491 reference statement. 493 A revision statement MUST be present for each published version of 494 the module. 496 Each new revision MUST include a revision date which is higher than 497 any other revision date in the module. 499 It is acceptable to reuse the same revision statement within 500 unpublished versions (i.e., Internet Drafts), but the revision date 501 MUST be updated to a higher value each time the Internet Draft is re- 502 published. 504 4.7. Temporary Namespace Assignments 506 It is desirable to include only valid YANG modules in documents, 507 whether they are published yet or not. 509 o allows the module to compile correctly instead of generating 510 disruptive fatal errors. 512 o allows early implementors to use the modules without picking a 513 random value for this field. 515 o allows early interoperability testing since independent 516 implementations will use the same namespace value. 518 Until a URI is assigned by the IANA, a temporary namespace URI MUST 519 be provided for the namespace statement in a YANG module. A value 520 SHOULD be selected which is not likely to collide with other YANG 521 namespaces. 523 An unpublished module namespace statement value SHOULD include the 524 field 'DRAFT-nn', where 'nn' is replaced by the current Internet 525 Draft number. 527 If the YANG module has been previously published, then the RPC being 528 updated needs to be identified. In this case, an unpublished module 529 namespace statement value SHOULD include the field 530 'DRAFT-XXXXBIS-nn', where 'XXXX' is replaced by the RFC number being 531 updated, and 'nn' is replaced by the current Internet Draft number. 533 A temporary namespace statement value SHOULD have the following form: 534 :: 536 The suggested URN prefix string that SHOULD be used is shown below. 537 This value will be defined by the IANA. urn:ietf:params:xml:ns:yang: 539 The following example URNs would be valid temporary namespace 540 statement values: 542 urn:ietf:params:xml:ns:yang:ietf-netconf-partial-lock:DRAFT-09 544 urn:ietf:params:xml:ns:yang:ietf-netconf-state:DRAFT-07 546 urn:ietf:params:xml:ns:yang:ietf-netconf:DRAFT-4741BIS-01 548 4.8. Top Level Database Objects 550 There SHOULD only be one top-level data node defined in each YANG 551 module. However, there MAY be more than one if needed. 553 The top-level data organization SHOULD be considered carefully, in 554 advance. Data model designers need to consider how the functionality 555 for a given protocol or protocol family will grow over time. 557 The names and data organization SHOULD reflect persistent 558 information, such as the name of a protocol. The name of the working 559 group SHOULD NOT be used because this may change over time. 561 A mandatory database object is defined as a node that a client must 562 provide for the database to be valid. The server will not provide a 563 value under any conditions. 565 Top-level database objects MUST NOT be mandatory. 567 If a mandatory node appears at the top-level, it will immediately 568 cause the database to be invalid. This can occur when the server 569 boots or when a module is loaded dynamically at runtime. 571 Top level objects are declared in YANG as mandatory with the 572 mandatory statement or the min-elements statement. All nested non- 573 presence containers are transparent, so a mandatory node nested 574 within one or more non-presence containers causes the top-level 575 container to be considered mandatory. 577 4.9. Data Types 579 Selection of an appropriate data type (i.e., built-in type, existing 580 derived type, or new derived type) is very subjective and therefore 581 few requirements can be specified on that subject. 583 Data model designers SHOULD use the most appropriate built-in data 584 type for the particular application. 586 If extensibility of enumerated values is required, then the 587 identityref data type SHOULD be used instead of an enumeration or 588 other built-in type. 590 For string data types, if a machine-readable pattern can be defined 591 for the desired semantics, then one or more pattern statements SHOULD 592 be present. 594 For string data types, if the length of the string is not required to 595 be unbounded in all implementations, then a length statement SHOULD 596 be present. 598 For numeric data types, if the values allowed by the intended 599 semantics are different than those allowed by the unbounded intrinsic 600 data type (e.g., int32), then a range statement SHOULD be present. 602 The signed numeric data types (i.e., 'int8', 'int16', 'int32', and 603 'int64') SHOULD NOT be used unless negative values are allowed for 604 the desired semantics. 606 For enumeration or bits data types, the semantics for each enum or 607 bit SHOULD be documented. A separate description statement (within 608 each enum or bit statement) SHOULD be present. 610 4.10. Reusable Type Definitions 612 If an appropriate derived type exists in any standard module, such as 613 [I-D.ietf-netmod-yang-types], then it SHOULD be used instead of 614 defining a new derived type. 616 If an appropriate units identifier can be associated with the desired 617 semantics, then a units statement SHOULD be present. 619 If an appropriate default value can be associated with the desired 620 semantics, then a default statement SHOULD be present. 622 If a significant number of derived types are defined, and it is 623 anticipated that these data types will be reused by multiple modules, 624 then these derived types SHOULD be contained in a separate module or 625 submodule, to allow easier reuse without unnecessary coupling. 627 The description statement MUST be present. 629 If the type definition semantics are defined in an external document, 630 then the reference statement SHOULD be present. 632 4.11. Object Definitions 634 The description statement MUST be present in the following body 635 statements: 637 o extension 639 o feature 641 o identity 643 o typedef 645 o grouping 647 o augment 649 o rpc 651 o notification 653 The description statement MUST be present in the following data 654 definition constructs: 656 o container 658 o leaf 660 o leaf-list 662 o list 664 o choice 666 o anyxml 668 If the object semantics are defined in an external document, then a 669 reference statement SHOULD be present. 671 The 'anyxml' construct MUST NOT be used within configuration data. 673 If there are referential integrity constraints associated with the 674 desired semantics that can be represented with XPath, then one or 675 more must statements SHOULD be present. 677 For list and leaf-list objects, if the number of possible instances 678 is not required to be unbounded for all implementations, then the 679 max-elements statement SHOULD be present. 681 If any must or when statements are used within the object definition, 682 then the object description statement SHOULD describe the purpose of 683 each one. 685 4.12. RPC Definitions 687 The description statement MUST be present. 689 If the RPC method semantics are defined in an external document, then 690 a reference statement SHOULD be present. 692 If the RPC method impacts system behavior in some way, it SHOULD be 693 mentioned in the description statement. 695 If the RPC method is potentially harmful to system behavior in some 696 way, it MUST be mentioned in the Security Considerations section of 697 the document. 699 4.13. Notification Definitions 701 The description statement MUST be present. 703 If the notification semantics are defined in an external document, 704 then a reference statement SHOULD be present. 706 5. IANA Considerations 708 There are no actions requested of IANA at this time. 710 6. Security Considerations 712 This document defines documentation guidelines for NETCONF content 713 defined with the YANG data modeling language. It does not introduce 714 any new or increased security risks into the management system. 716 7. Acknowledgments 718 The structure and contents of this document are adapted from 719 Guidelines for MIB Documents [RFC4181], by C. M. Heard. 721 8. References 723 8.1. Normative References 725 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 726 Requirement Levels", BCP 14, RFC 2119, March 1997. 728 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 729 Resource Identifier (URI): Generic Syntax", STD 66, 730 RFC 3986, January 2005. 732 [RFC4741] Enns, R., "NETCONF Configuration Protocol", RFC 4741, 733 December 2006. 735 [I-D.ietf-netmod-yang] 736 Bjorklund, M., "YANG - A data modeling language for 737 NETCONF", draft-ietf-netmod-yang-08 (work in progress), 738 October 2009. 740 [I-D.ietf-netmod-yang-types] 741 Schoenwaelder, J., "Common YANG Data Types", 742 draft-ietf-netmod-yang-types-04 (work in progress), 743 October 2009. 745 8.2. Informative References 747 [RFC4181] Heard, C., "Guidelines for Authors and Reviewers of MIB 748 Documents", BCP 111, RFC 4181, September 2005. 750 Appendix A. Module Review Checklist 752 This section is adapted from RFC 4181. 754 The purpose of a YANG module review is to review the YANG module both 755 for technical correctness and for adherence to IETF documentation 756 requirements. The following checklist may be helpful when reviewing 757 a draft document: 759 1. I-D Boilerplate -- verify that the draft contains the required 760 Internet-Draft boilerplate (see 761 http://www.ietf.org/ietf/1id-guidelines.txt), including the 762 appropriate statement to permit publication as an RFC, and that 763 I-D boilerplate does not contain references or section numbers. 765 2. Abstract -- verify that the abstract does not contain 766 references, that it does not have a section number, and that its 767 content follows the guidelines in 768 http://www.ietf.org/ietf/1id-guidelines.txt. 770 3. YANG Module Boilerplate -- verify that the draft contains the 771 latest approved SNMP Network Management Framework boilerplate 772 from the OPS area web site 773 (http://www.ops.ietf.org/mib-boilerplate.html). [ed: real URL 774 TBD] 776 4. Security Considerations Section -- verify that the draft uses 777 the latest approved template from the OPS area web site 778 (http://www.ops.ietf.org/mib-security.html) and that the 779 guidelines therein have been followed. 781 5. IANA Considerations Section -- this section must always be 782 present. If the draft requires no action from the IANA, ensure 783 that this is explicitly noted. If the draft requires URI values 784 to be assigned, ensure that the IANA Considerations section 785 contains the information specified in [TBD] of these guidelines. 786 If the draft contains the initial version of an IANA-maintained 787 module, verify that the [TBD] invocation contains maintenance 788 instructions that comply with the requirements in RFC 2434. In 789 the latter case, the IANA Considerations section that will 790 appear in the RFC MUST contain a pointer to the actual IANA- 791 maintained module. 793 6. References -- verify that the references are properly divided 794 between normative and informative references, that RFC 2119 is 795 included as a normative reference if the terminology defined 796 therein is used in the document, that all references required by 797 the boilerplate are present, that all YANG modules containing 798 imported items are cited as normative references, and that all 799 citations point to the most current RFCs unless there is a valid 800 reason to do otherwise (for example, it is OK to include an 801 informative reference to a previous version of a specification 802 to help explain a feature included for backward compatibility). 804 7. Copyright Notices -- verify that the draft contains an 805 abbreviated copyright notice in the description statement of 806 each YANG module or sub-module, and that it contains the full 807 copyright notice and disclaimer specified in Sections 5.4 and 808 5.5 of RFC 3978 at the end of the document. Make sure that the 809 correct year is used in all copyright dates. 811 8. IPR Notice -- if the draft does not contains a verbatim copy of 812 the IPR notice specified in Section 5 of RFC 3979, recommend 813 that the IPR notice be included. 815 9. Other Issues -- check for any issues mentioned in 816 http://www.ietf.org/ID-Checklist.html that are not covered 817 elsewhere. 819 10. Technical Content -- review the actual technical content for 820 compliance with the guidelines in this document. The use of a 821 YANG module compiler is recommended when checking for syntax 822 errors; see [YANG tool URL TBD] for more information. Checking 823 for correct syntax, however, is only part of the job. It is 824 just as important to actually read the YANG module document from 825 the point of view of a potential implementor. It is 826 particularly important to check that description statements are 827 sufficiently clear and unambiguous to allow interoperable 828 implementations to be created. 830 Appendix B. YANG Module Template 832 834 module ietf-template { 836 // replace this string with a unique namespace URN value 837 namespace 838 "urn:ietf:params:xml:ns:yang:ietf-template:DRAFT-02"; 840 // replace this string, and try to pick a unique prefix 841 prefix "temp"; 843 // import statements here: e.g., 844 // import ietf-yang-types { prefix yang; } 845 // import ietf-inet-types { prefix inet; } 847 // identify the IETF working group if applicable 848 organization 849 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 851 // update this contact statement with your info 852 contact 853 "WG Web: 854 WG List: 856 WG Chair: your-WG-chair 857 859 Editor: your-name 860 "; 862 // replace the first sentence in this description statement. 863 // replace the copyright notice with the most recent 864 // version, if it has been updated since the publication 865 // of this document 866 description 867 "This module defines a template for other YANG modules. 869 Copyright (c) 2009 IETF Trust and the persons identified as 870 the document authors. All rights reserved. 872 Redistribution and use in source and binary forms, with or 873 without modification, are permitted provided that the 874 following conditions are met: 876 - Redistributions of source code must retain the above 877 copyright notice, this list of conditions and the 878 following disclaimer. 880 - Redistributions in binary form must reproduce the above 881 copyright notice, this list of conditions and the 882 following disclaimer in the documentation and/or other 883 materials provided with the distribution. 885 - Neither the name of Internet Society, IETF or IETF 886 Trust, nor the names of specific contributors, may be 887 used to endorse or promote products derived from this 888 software without specific prior written permission. 890 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 891 CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED 892 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 893 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 894 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 895 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 896 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 897 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 898 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 899 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 900 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 901 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 902 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 903 POSSIBILITY OF SUCH DAMAGE. 905 This version of this YANG module is part of RFC XXXX; see 906 the RFC itself for full legal notices."; 908 // RFC Ed.: replace XXXX with actual RFC number and remove this note 910 reference "RFC XXXX"; 912 // RFC Ed.: remove this note 913 // Note: extracted from draft-ietf-netmod-yang-usage-02.txt 915 // replace YYYY-MM-DD with a real date (year-month-day) 916 // here is an example revision date: 2009-08-12 917 revision YYYY-MM-DD { 918 description 919 "Initial version"; 921 } 923 // extension statements 925 // feature statements 927 // identity statements 929 // typedef statements 931 // grouping statements 933 // data definition statements 935 // augment statements 937 // rpc statements 939 // notification statements 941 // DO NOT put deviation statements in a published module 943 } 945 947 Figure 2 949 Appendix C. Change Log 951 C.1. Changes from 00 to 01 953 o Added transport 'TLS' to figure 1. 955 o Added note about RFC 2119 terminology. 957 o Corrected URL for instructions to authors. 959 o Updated namespace procedures section. 961 o Updated guidelines on module contact, reference, and organization 962 statements. 964 o Added note on use of preceding-sibling and following-sibling axes 965 in XPath expressions. 967 o Added section on temporary namespace statement values. 969 o Added section on top level database objects. 971 o Added ietf-template.yang appendix. 973 C.2. Changes from 01 to 02 975 o Updated figure 1 per mailing list comments. 977 o Updated suggested organization to include the working group name. 979 o Updated ietf-template.yang to use new organization statement 980 value. 982 o Updated Code Component requirements as per new TLP. 984 o Updated ietf-template.yang to use new Code Component begin and end 985 markers. 987 o Updated references to the TLP in a couple sections. 989 o Change manager/agent terminology to client/server. 991 Author's Address 993 Andy Bierman 994 Netconf Central, Inc. 995 Simi Valley, CA 996 USA 998 Email: andy@netconfcentral.com