idnits 2.17.1 draft-ietf-netmod-yang-usage-01.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 (August 12, 2009) is 5368 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '42' on line 421 == Missing Reference: 'TBD' is mentioned on line 784, but not defined ** Obsolete normative reference: RFC 4741 (Obsoleted by RFC 6241) == Outdated reference: A later version (-13) exists of draft-ietf-netmod-yang-07 == Outdated reference: A later version (-09) exists of draft-ietf-netmod-yang-types-03 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 4 Intended status: Informational August 12, 2009 5 Expires: February 13, 2010 7 Guidelines for Authors and Reviewers of YANG Data Model Documents 8 draft-ietf-netmod-yang-usage-01 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 February 13, 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 . . . . . 8 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 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 28 98 1. Introduction 100 The standardization of network configuration interfaces for use with 101 the NETCONF [RFC4741] protocol requires a modular set of data models, 102 which can be reused and extended over time. 104 This document defines a set of usage guidelines for standards track 105 documents containing YANG [I-D.ietf-netmod-yang] data models. It is 106 similar to the MIB usage guidelines specification [RFC4181] in intent 107 and structure. 109 Many YANG constructs are defined as optional to use, such as the 110 description clause. However, in order to maximize interoperability 111 of NETCONF implementations utilizing YANG data models, it is 112 desirable to define a set of usage guidelines which may require a 113 higher level of compliance than the minimum level defined in the YANG 114 specification. 116 The NETCONF stack can be conceptually partitioned into four layers. 118 Layer Example 119 +-------------+ +--------------------+ +-------------------+ 120 (4) | Content | | Configuration data | | Notification data | 121 +-------------+ +--------------------+ +-------------------+ 122 | | | 123 +-------------+ +-----------------+ +---------------+ 124 (3) | Operations | | | | | 125 +-------------+ +-----------------+ +---------------+ 126 | | | 127 +-------------+ +--------------------+ +----------------+ 128 (2) | RPC | | , | | | 129 +-------------+ +--------------------+ +----------------+ 130 | | | 131 +-------------+ +--------------------------------+ 132 (1) | Transport | | BEEP, SSH, SSL, TLS, console | 133 | Protocol | | | 134 +-------------+ +--------------------------------+ 136 Figure 1 138 This document defines usage guidelines related to the NETCONF 139 operations layer (3), and NETCONF content layer (4). 141 2. Terminology 143 2.1. Requirements Notation 145 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 146 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 147 document are to be interpreted as described in [RFC2119]. 149 RFC 2119 language is used here to express the views of the NETMOD 150 working group regarding YANG module content. Yang modules complying 151 with this document will treat the RFC 2119 terminology as if it were 152 describing best current practices. 154 2.2. NETCONF Terms 156 The following terms are defined in [RFC4741] and are not redefined 157 here: 159 o agent 161 o application 163 o capabilities 165 o manager 167 o operation 169 o RPC 171 2.3. YANG Terms 173 The following terms are defined in [I-D.ietf-netmod-yang] and are not 174 redefined here: 176 o data node 178 o module 180 o submodule 182 o namespace 184 o version 186 2.4. Terms 188 The following terms are used throughout this document: 190 o module: Generic term for a YANG data model module or submodule. 191 When describing properties which are specific to submodules, the 192 term 'YANG submodule', or simply 'submodule' is used instead. 194 o Published Document: A stable release of a module, usually 195 contained in an RFC. 197 o Unpublished Document: An unstable release of a module, usually 198 contained in an Internet Draft. 200 3. General Documentation Guidelines 202 YANG data model modules under review are likely to be contained in 203 Internet Drafts. All guidelines for Internet Draft authors MUST be 204 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 at [ed: URL TBD]. 229 3.2. Narrative Sections 231 The narrative part MUST include an overview section that describes 232 the scope and field of application of the module(s) defined by the 233 specification and that specifies the relationship (if any) of these 234 modules to other standards, particularly to standards containing 235 other module modules. The narrative part SHOULD include one or more 236 sections to briefly describe the structure of the modules defined in 237 the specification. 239 If the module(s) defined by the specification import definitions from 240 other modules (except for those defined in the YANG 241 [I-D.ietf-netmod-yang] or YANG Types [I-D.ietf-netmod-yang-types] 242 documents) or are always implemented in conjunction with other 243 modules, then those facts MUST be noted in the overview section, as 244 MUST any special interpretations of objects in other modules. 246 3.3. Definitions Section 248 This section contains the module(s) defined by the specification. 249 These modules MUST be written in YANG [I-D.ietf-netmod-yang]. 251 See Section 4 for guidelines on YANG usage. 253 3.4. Security Considerations Section 255 Each specification that defines one or more modules MUST contain a 256 section that discusses security considerations relevant to those 257 modules. This section MUST be patterned after the latest approved 258 template (available at [ed: URL TBD]). 260 In particular, writable module objects that could be especially 261 disruptive if abused MUST be explicitly listed by name and the 262 associated security risks MUST be spelled out; similarly, readable 263 module objects that contain especially sensitive information or that 264 raise significant privacy concerns MUST be explicitly listed by name 265 and the reasons for the sensitivity/privacy concerns MUST be 266 explained. 268 3.5. IANA Considerations Section 270 In order to comply with IESG policy as set forth in 271 http://www.ietf.org/ID-Checklist.html, every Internet-Draft that is 272 submitted to the IESG for publication MUST contain an IANA 273 Considerations section. The requirements for this section vary 274 depending what actions are required of the IANA. 276 3.5.1. Documents that Create a New Name Space 278 If an Internet-Draft defines a new name space that is to be 279 administered by the IANA, then the document MUST include an IANA 280 Considerations section, that specifies how the name space is to be 281 administered. 283 Specifically, if any YANG module namespace statement value contained 284 in the document is not already registered with IANA, then a new YANG 285 Namespace registry entry must be requested from the IANA. The YANG 286 specification includes the procedure for this purpose in its IANA 287 Considerations section. 289 3.5.2. Documents that Extend an Existing Name Space 291 If an Internet-Draft defines any extensions to a YANG Namespace 292 already administered by the IANA, then the document MUST include an 293 IANA Considerations section, specifies how the name space extension 294 is to be administered. 296 Specifically, if any YANG submodule belongs-to value contained in the 297 document is associated with a module that contains a namespace 298 statement value equal to a YANG Namespace already administered by the 299 IANA, then the existing YANG Namespace must be updated to include the 300 new submodule. 302 3.6. Reference Sections 304 [ed: 2223bis text TBD] 306 For every import or include statement which appears in a module 307 contained in the specification, which identifies a module in a 308 separate document, a corresponding normative reference to that 309 document MUST appear in the Normative References section. The 310 reference MUST correspond to the specific module version actually 311 used within the specification. 313 For every reference statement which appears in a module contained in 314 the specification, which identifies a separate document, a 315 corresponding normative reference to that document SHOULD appear in 316 the Normative References section. The reference SHOULD correspond to 317 the specific document version actually used within the specification. 319 3.7. Copyright Notices 321 The proper copyright notices MUST be present in the module 322 description statement. [ed.: See RFC 4181, 3.7. Exact text for 323 insertion is TBD.] 325 3.8. Intellectual Property Section 327 The proper IPR statements MUST be present in the document, according 328 to the most current Internet Draft boilerplate. [ed.: actual IETF IPR 329 text reference TBD] 331 4. YANG Usage Guidelines 333 In general, modules in IETF standards-track specifications MUST 334 comply with all syntactic and semantic requirements of YANG. 335 [I-D.ietf-netmod-yang]. The guidelines in this section are intended 336 to supplement the YANG specification, which is intended to define a 337 minimum set of conformance requirements. 339 In order to promote interoperability and establish a set of practices 340 based on previous experience, the following sections establish usage 341 guidelines for specific YANG constructs. 343 Only guidelines which clarify or restrict the minimum conformance 344 requirements are included here. 346 4.1. Module Naming Conventions 348 Modules contained in standards track documents SHOULD be named with 349 the prefix 'ietf-'. Other types of modules MUST NOT use the 'ietf-' 350 prefix string. 352 A distinctive word or acronym (e.g., protocol name or working group 353 acronym) SHOULD be used in the module name. If new definitions are 354 being defined to extend one or more existing modules, then the same 355 word or acronym should be reused, instead of creating a new one. 357 All published module names MUST be unique. 359 Once a module name is published, it MUST not be reused, even if the 360 RFC containing the module is reclassified to 'Historic' status. 362 4.2. Identifiers 364 Identifiers for modules, submodules, typedefs, groupings, data 365 objects, rpcs, and notifications MUST be between 1 and 64 characters 366 in length. 368 4.3. Defaults 370 In general, it is suggested that sub-statements containing default 371 values SHOULD NOT be present. For example, 'status current;', 372 'config true;', 'mandatory false;', and 'max-elements unbounded;' are 373 common defaults which would make the module difficult to read if used 374 everywhere they are allowed. 376 Instead, it is suggested that common statements SHOULD only be used 377 when being set to a value other than the default value. 379 4.4. Conditional Statements 381 A module may be conceptually partitioned in several ways, using the 382 'if-feature' and/or 'when' statements. In addition, NETCONF 383 capabilities are designed to identify optional functionality. 385 Data model designers need to carefully consider all modularity 386 aspects, including the use of YANG conditional statements. 388 Objects SHOULD NOT directly reference NETCONF capabilities, in order 389 to specify optional behavior. Instead, a 'feature' statement SHOULD 390 be defined to represent the NETCONF capability, and the 'if-feature' 391 statement SHOULD be used within the object definition. 393 If the condition associated with the desired semantics is not 394 dependent on any particular instance value within the database, then 395 an 'if-feature' statement SHOULD be used instead of a 'when' 396 statement. 398 All 'must' and 'when' statements MUST contain valid XPath. If any 399 name tests are present, they MUST contain valid module prefixes and 400 data node names. References to non-existent nodes are considered 401 invalid in YANG, even though they are permitted in XPath. 403 The 'attribute' and 'namespace' axis SHOULD NOT be used because the 404 associated XML node types are not supported in YANG, and may not be 405 supported consistently across NETCONF agent implementations. 407 The 'position' and 'last' functions SHOULD NOT be used. Also, the 408 'preceding', and 'following' axes SHOULD NOT be used. These 409 constructs rely on XML document order within a NETCONF agent 410 configuration database, which may not be supported consistently or 411 produce reliable results across implementations. Predicate 412 expressions based on static node properties (e.g., name, value, 413 ancestors, descendants) SHOULD be used instead. 415 The 'preceding-sibling' and 'following-sibling' axes MAY be used, 416 with caution. An agent is not required to maintain a persistent or 417 deterministic XML document order, which will affect use of these 418 axes. 420 Implicit 'position' function calls within predicates SHOULD NOT be 421 used. (e.g., //chapter[42]). 423 Data nodes which use the 'int64' and 'uint64' built-in type SHOULD 424 NOT be used within relational expressions. There are boundary 425 conditions in which the translation from the YANG 64-bit type to an 426 XPath number can cause incorrect results. 428 Data modelers need to be careful not to confuse the YANG value space 429 and the XPath value space. The data types are not the same in both, 430 and conversion between YANG and XPath data types SHOULD be considered 431 carefully. 433 Explicit XPath data type conversions MAY be used (e.g., 'string', 434 'boolean', or 'number' functions), instead of implicit XPath data 435 type conversions. 437 4.5. Lifecycle Management 439 The status statement SHOULD NOT be present if its value is 'current'. 440 It MUST be present if its value is 'deprecated' or 'obsolete'. 442 The module or submodule name MUST NOT be changed, once the document 443 containing the module or submodule is published. 445 The module namespace URI value SHOULD NOT be changed, once the 446 document containing the module is published. 448 The revision-date sub-statement (within the imports statement) SHOULD 449 be present. It MUST be present (in all published modules) if any 450 groupings are used from the external module. 452 The revision-date sub-statement (within the include statement) MAY be 453 present. It SHOULD be present (in all published modules) if any 454 groupings are used from the external sub-module. 456 4.6. Header Contents 458 For published modules, the namespace MUST be a globally unique URI, 459 as defined in [RFC3986]. This value is usually assigned by the IANA. 461 The organization statement MUST be present. If the module is 462 contained in a documented intended for standards-track status, then 463 the organization SHOULD be the IETF. 465 The contact statement MUST be present. If the module is contained in 466 a documented intended for standards-track status, then the working 467 group WEB and mailing information MUST be present, and the document 468 author contact information SHOULD be present. In addition, the Area 469 Director and other contact information MAY be present. 471 The description statement MUST be present. If the module is 472 contained in an unpublished document, then the file name of this 473 document SHOULD be identified in the description statement. This 474 text MUST be removed when the document is published. 476 Modules are often extracted from their original documents and it is 477 useful for developers and operators to know how to find the original 478 source document in a consistent manner. 480 The reference statement MUST be present. It MUST identify the 481 published document which contains the module. 483 If the module relies on information contained in other documents, 484 which are not the same documents implied by the import statements 485 present in the module, then these documents MUST be identified in the 486 reference statement. 488 A revision statement MUST be present for each published version of 489 the module. 491 Each new revision MUST include a revision date which is higher than 492 any other revision date in the module. 494 It is acceptable to reuse the same revision statement within 495 unpublished versions (i.e., Internet Drafts), but the revision date 496 MUST be updated to a higher value each time the Internet Draft is re- 497 published. 499 4.7. Temporary Namespace Assignments 501 It is desirable to include only valid YANG modules in documents, 502 whether they are published yet or not. 504 o allows the module to compile correctly instead of generating 505 disruptive fatal errors. 507 o allows early implementors to use the modules without picking a 508 random value for this field. 510 o allows early interoperability testing since independent 511 implementations will use the same namespace value. 513 Until a URI is assigned by the IANA, a temporary namespace URI MUST 514 be provided for the namespace statement in a YANG module. A value 515 SHOULD be selected which is not likely to collide with other YANG 516 namespaces. 518 An unpublished module namespace statement value SHOULD include the 519 field 'DRAFT-nn', where 'nn' is replaced by the current Internet 520 Draft number. 522 If the YANG module has been previously published, then the RPC being 523 updated needs to be identified. In this case, an unpublished module 524 namespace statement value SHOULD include the field 525 'DRAFT-XXXXBIS-nn', where 'XXXX' is replaced by the RFC number being 526 updated, and 'nn' is replaced by the current Internet Draft number. 528 A temporary namespace statement value SHOULD have the following form: 529 :: 531 The suggested URN prefix string that SHOULD be used is shown below. 532 This value will be defined by the IANA. urn:ietf:params:xml:ns:yang: 534 The following example URNs would be valid temporary namespace 535 statement values: 537 urn:ietf:params:xml:ns:yang:ietf-netconf-partial-lock:DRAFT-09 539 urn:ietf:params:xml:ns:yang:ietf-netconf-state:DRAFT-07 541 urn:ietf:params:xml:ns:yang:ietf-netconf:DRAFT-4741BIS-01 543 4.8. Top Level Database Objects 545 There SHOULD only be one top-level data node defined in each YANG 546 module. However, there MAY be more than one if needed. 548 The top-level data organization SHOULD be considered carefully, in 549 advance. Data model designers need to consider how the functionality 550 for a given protocol or protocol family will grow over time. 552 The names and data organization SHOULD reflect persistent 553 information, such as the name of a protocol. The name of the working 554 group SHOULD NOT be used because this may change over time. 556 A mandatory database object is defined as a node that a manager must 557 provide for the database to be valid. The agent will not provide a 558 value under any conditions. 560 Top-level database objects MUST NOT be mandatory. 562 If a mandatory node appears at the top-level, it will immediately 563 cause the database to be invalid. This can occur when the agent 564 boots or when a module is loaded dynamically at runtime. 566 Top level objects are declared in YANG as mandatory with the 567 mandatory statement or the min-elements statement. All nested non- 568 presence containers are transparent, so a mandatory node nested 569 within one or more non-presence containers causes the top-level 570 container to be considered mandatory. 572 4.9. Data Types 574 Selection of an appropriate data type (i.e., built-in type, existing 575 derived type, or new derived type) is very subjective and therefore 576 few requirements can be specified on that subject. 578 Data model designers SHOULD use the most appropriate built-in data 579 type for the particular application. 581 If extensibility of enumerated values is required, then the 582 identityref data type SHOULD be used instead of an enumeration or 583 other built-in type. 585 For string data types, if a machine-readable pattern can be defined 586 for the desired semantics, then one or more pattern statements SHOULD 587 be present. 589 For string data types, if the length of the string is not required to 590 be unbounded in all implementations, then a length statement SHOULD 591 be present. [ed: should the 'resource-denied' error be mentioned 592 here?] 594 For numeric data types, if the values allowed by the intended 595 semantics are different than those allowed by the unbounded intrinsic 596 data type (e.g., int32), then a range statement SHOULD be present. 598 The signed numeric data types (i.e., 'int8', 'int16', 'int32', and 599 'int64') SHOULD NOT be used unless negative values are allowed for 600 the desired semantics. 602 For enumeration or bits data types, the semantics for each enum or 603 bit SHOULD be documented. A separate description statement (within 604 each enum or bit statement) SHOULD be present. 606 4.10. Reusable Type Definitions 608 If an appropriate derived type exists in any standard module, such as 609 [I-D.ietf-netmod-yang-types], then it SHOULD be used instead of 610 defining a new derived type. 612 If an appropriate units identifier can be associated with the desired 613 semantics, then a units statement SHOULD be present. 615 If an appropriate default value can be associated with the desired 616 semantics, then a default statement SHOULD be present. 618 If a significant number of derived types are defined, and it is 619 anticipated that these data types will be reused by multiple modules, 620 then these derived types SHOULD be contained in a separate module or 621 submodule, to allow easier reuse without unnecessary coupling. 623 The description statement MUST be present. 625 If the type definition semantics are defined in an external document, 626 then the reference statement SHOULD be present. 628 4.11. Object Definitions 630 The description statement MUST be present in the following body 631 statements: 633 o extension 635 o feature 637 o identity 639 o typedef 641 o grouping 643 o augment 645 o rpc 647 o notification 649 The description statement MUST be present in the following data 650 definition constructs: 652 o container 654 o leaf 656 o leaf-list 658 o list 660 o choice 662 o anyxml 664 If the object semantics are defined in an external document, then a 665 reference statement SHOULD be present. 667 The 'anyxml' construct MUST NOT be used within configuration data. 669 If there are referential integrity constraints associated with the 670 desired semantics that can be represented with XPath, then one or 671 more must statements SHOULD be present. 673 For list and leaf-list objects, if the number of possible instances 674 is not required to be unbounded for all implementations, then the 675 max-elements statement SHOULD be present. 677 If any must or when statements are used within the object definition, 678 then the object description statement SHOULD describe the purpose of 679 each one. 681 4.12. RPC Definitions 683 The description statement MUST be present. 685 If the RPC method semantics are defined in an external document, then 686 a reference statement SHOULD be present. 688 If the RPC method impacts system behavior in some way, it SHOULD be 689 mentioned in the description statement. 691 If the RPC method is potentially harmful to system behavior in some 692 way, it MUST be mentioned in the Security Considerations section of 693 the document. 695 4.13. Notification Definitions 697 The description statement MUST be present. 699 If the notification semantics are defined in an external document, 700 then a reference statement SHOULD be present. 702 5. IANA Considerations 704 There are no actions requested of IANA at this time. 706 6. Security Considerations 708 This document defines documentation guidelines for NETCONF content 709 defined with the YANG data modeling language. It does not introduce 710 any new or increased security risks into the management system. [ed: 711 RFC 4181 style security section TBD] 713 7. Acknowledgments 715 The structure and contents of this document are adapted from 716 Guidelines for MIB Documents [RFC4181], by C. M. Heard. 718 8. References 720 8.1. Normative References 722 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 723 Requirement Levels", BCP 14, RFC 2119, March 1997. 725 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 726 Resource Identifier (URI): Generic Syntax", STD 66, 727 RFC 3986, January 2005. 729 [RFC4741] Enns, R., "NETCONF Configuration Protocol", RFC 4741, 730 December 2006. 732 [I-D.ietf-netmod-yang] 733 Bjorklund, M., "YANG - A data modeling language for 734 NETCONF", draft-ietf-netmod-yang-07 (work in progress), 735 July 2009. 737 [I-D.ietf-netmod-yang-types] 738 Schoenwaelder, J., "Common YANG Data Types", 739 draft-ietf-netmod-yang-types-03 (work in progress), 740 May 2009. 742 8.2. Informative References 744 [RFC4181] Heard, C., "Guidelines for Authors and Reviewers of MIB 745 Documents", BCP 111, RFC 4181, September 2005. 747 Appendix A. Module Review Checklist 749 This section is adapted from RFC 4181. 751 The purpose of a YANG module review is to review the YANG module both 752 for technical correctness and for adherence to IETF documentation 753 requirements. The following checklist may be helpful when reviewing 754 a draft document: 756 1. I-D Boilerplate -- verify that the draft contains the required 757 Internet-Draft boilerplate (see 758 http://www.ietf.org/ietf/1id-guidelines.txt), including the 759 appropriate statement to permit publication as an RFC, and that 760 I-D boilerplate does not contain references or section numbers. 762 2. Abstract -- verify that the abstract does not contain 763 references, that it does not have a section number, and that its 764 content follows the guidelines in 765 http://www.ietf.org/ietf/1id-guidelines.txt. 767 3. YANG Module Boilerplate -- verify that the draft contains the 768 latest approved SNMP Network Management Framework boilerplate 769 from the OPS area web site 770 (http://www.ops.ietf.org/mib-boilerplate.html). [ed: real URL 771 TBD] 773 4. Security Considerations Section -- verify that the draft uses 774 the latest approved template from the OPS area web site 775 (http://www.ops.ietf.org/mib-security.html) and that the 776 guidelines therein have been followed. 778 5. IANA Considerations Section -- this section must always be 779 present. If the draft requires no action from the IANA, ensure 780 that this is explicitly noted. If the draft requires URI values 781 to be assigned, ensure that the IANA Considerations section 782 contains the information specified in [TBD] of these guidelines. 783 If the draft contains the initial version of an IANA-maintained 784 module, verify that the [TBD] invocation contains maintenance 785 instructions that comply with the requirements in RFC 2434. In 786 the latter case, the IANA Considerations section that will 787 appear in the RFC MUST contain a pointer to the actual IANA- 788 maintained module. 790 6. References -- verify that the references are properly divided 791 between normative and informative references, that RFC 2119 is 792 included as a normative reference if the terminology defined 793 therein is used in the document, that all references required by 794 the boilerplate are present, that all YANG modules containing 795 imported items are cited as normative references, and that all 796 citations point to the most current RFCs unless there is a valid 797 reason to do otherwise (for example, it is OK to include an 798 informative reference to a previous version of a specification 799 to help explain a feature included for backward compatibility). 801 7. Copyright Notices -- verify that the draft contains an 802 abbreviated copyright notice in the description statement of 803 each YANG module or sub-module, and that it contains the full 804 copyright notice and disclaimer specified in Sections 5.4 and 805 5.5 of RFC 3978 at the end of the document. Make sure that the 806 correct year is used in all copyright dates. 808 8. IPR Notice -- if the draft does not contains a verbatim copy of 809 the IPR notice specified in Section 5 of RFC 3979, recommend 810 that the IPR notice be included. 812 9. Other Issues -- check for any issues mentioned in 813 http://www.ietf.org/ID-Checklist.html that are not covered 814 elsewhere. 816 10. Technical Content -- review the actual technical content for 817 compliance with the guidelines in this document. The use of a 818 YANG module compiler is recommended when checking for syntax 819 errors; see [YANG tool URL TBD] for more information. Checking 820 for correct syntax, however, is only part of the job. It is 821 just as important to actually read the YANG module document from 822 the point of view of a potential implementor. It is 823 particularly important to check that description statements are 824 sufficiently clear and unambiguous to allow interoperable 825 implementations to be created. 827 Appendix B. YANG Module Template 829 == begin "ietf-template.yang" 831 module ietf-template { 833 // replace this string with a unique namespace URN value 834 namespace 835 "urn:ietf:params:xml:ns:yang:ietf-template:DRAFT-01"; 837 // replace this string, and try to pick a unique prefix 838 prefix "temp"; 840 // import statements here: e.g., 841 // import ietf-yang-types { prefix yang; } 842 // import ietf-inet-types { prefix inet; } 844 organization 845 "Internet Engineering Task Force"; 847 // update this contact statement with your info 848 contact 849 "WG Web: 850 WG List: 852 WG Chair: your-WG-chair 853 855 Editor: your-name 856 "; 858 // replace the first sentence in this description statement. 859 // replace the copyright notice with the most recent 860 // version, if it has been updated since the publication 861 // of this document 862 description 863 "This module defines a template for other YANG modules. 865 Copyright (c) 2009 IETF Trust and the persons identified as 866 the document authors. All rights reserved. 868 Redistribution and use in source and binary forms, with or 869 without modification, are permitted provided that the 870 following conditions are met: 872 - Redistributions of source code must retain the above 873 copyright notice, this list of conditions and the 874 following disclaimer. 876 - Redistributions in binary form must reproduce the above 877 copyright notice, this list of conditions and the 878 following disclaimer in the documentation and/or other 879 materials provided with the distribution. 881 - Neither the name of Internet Society, IETF or IETF 882 Trust, nor the names of specific contributors, may be 883 used to endorse or promote products derived from this 884 software without specific prior written permission. 886 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 887 CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED 888 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 889 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 890 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 891 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 892 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 893 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 894 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 895 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 896 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 897 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 898 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 899 POSSIBILITY OF SUCH DAMAGE. 901 This version of this YANG module is part of RFC XXXX; see 902 the RFC itself for full legal notices."; 904 // RFC Ed.: replace XXXX with actual RFC number and remove this note 906 reference "RFC XXXX"; 908 // RFC Ed.: remove this note 909 // Note: extracted from draft-ietf-netmod-yang-usage-01.txt 911 // replace YYYY-MM-DD with a real date (year-month-day) 912 // here is an example revision date: 2009-08-12 913 revision YYYY-MM-DD { 914 description 915 "Initial version"; 916 } 918 // extension statements 920 // feature statements 922 // identity statements 924 // typedef statements 926 // grouping statements 928 // data definition statements 930 // augment statements 932 // rpc statements 934 // notification statements 936 // DO NOT put deviation statements in a published module 938 } 940 == end "ietf-template.yang" 942 Figure 2 944 Appendix C. Change Log 946 C.1. Changes from 00 to 01 948 o Added transport 'TLS' to figure 1. 950 o Added note about RFC 2119 terminology. 952 o Corrected URL for instructions to authors. 954 o Updated namespace procedures section. 956 o Updated guidelines on module contact, reference, and organization 957 statements. 959 o Added note on use of preceding-sibling and following-sibling axes 960 in XPath expressions. 962 o Added section on temporary namespace statement values. 964 o Added section on top level database objects. 966 o Added ietf-template.yang appendix. 968 Author's Address 970 Andy Bierman 971 Netconf Central 972 Simi Valley, CA 973 USA 975 Email: andy@netconfcentral.com