idnits 2.17.1 draft-ietf-netmod-yang-usage-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Sep 2009 rather than the newer Notice from 28 Dec 2009. (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 (January 15, 2010) is 5216 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '42' on line 430 == Missing Reference: 'TBD' is mentioned on line 790, but not defined ** Obsolete normative reference: RFC 4741 (Obsoleted by RFC 6241) == Outdated reference: A later version (-13) exists of draft-ietf-netmod-yang-10 == Outdated reference: A later version (-09) exists of draft-ietf-netmod-yang-types-05 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 InterWorking Labs 4 Intended status: Informational January 15, 2010 5 Expires: July 19, 2010 7 Guidelines for Authors and Reviewers of YANG Data Model Documents 8 draft-ietf-netmod-yang-usage-03 10 Abstract 12 This memo provides guidelines for authors and reviewers of standards 13 track specifications containing YANG data model modules. Applicable 14 portions may be used as a basis for reviews of other YANG data model 15 documents. Recommendations and procedures are defined, which are 16 intended to increase interoperability and usability of NETCONF 17 implementations which utilize YANG data model modules. 19 Status of this Memo 21 This Internet-Draft is submitted to IETF in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF), its areas, and its working groups. Note that 26 other groups may also distribute working documents as Internet- 27 Drafts. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 The list of current Internet-Drafts can be accessed at 35 http://www.ietf.org/ietf/1id-abstracts.txt. 37 The list of Internet-Draft Shadow Directories can be accessed at 38 http://www.ietf.org/shadow.html. 40 This Internet-Draft will expire on July 19, 2010. 42 Copyright Notice 44 Copyright (c) 2010 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 61 2.1. Requirements Notation . . . . . . . . . . . . . . . . . . 5 62 2.2. NETCONF Terms . . . . . . . . . . . . . . . . . . . . . . 5 63 2.3. YANG Terms . . . . . . . . . . . . . . . . . . . . . . . . 5 64 2.4. Terms . . . . . . . . . . . . . . . . . . . . . . . . . . 6 65 3. General Documentation Guidelines . . . . . . . . . . . . . . . 7 66 3.1. YANG Data Model Boilerplate Section . . . . . . . . . . . 7 67 3.2. Narrative Sections . . . . . . . . . . . . . . . . . . . . 7 68 3.3. Definitions Section . . . . . . . . . . . . . . . . . . . 8 69 3.4. Security Considerations Section . . . . . . . . . . . . . 8 70 3.5. IANA Considerations Section . . . . . . . . . . . . . . . 8 71 3.5.1. Documents that Create a New Name Space . . . . . . . . 8 72 3.5.2. Documents that Extend an Existing Name Space . . . . . 9 73 3.6. Reference Sections . . . . . . . . . . . . . . . . . . . . 9 74 3.7. Copyright Notices . . . . . . . . . . . . . . . . . . . . 9 75 3.8. Intellectual Property Section . . . . . . . . . . . . . . 9 76 4. YANG Usage Guidelines . . . . . . . . . . . . . . . . . . . . 10 77 4.1. Module Naming Conventions . . . . . . . . . . . . . . . . 10 78 4.2. Identifiers . . . . . . . . . . . . . . . . . . . . . . . 10 79 4.3. Defaults . . . . . . . . . . . . . . . . . . . . . . . . . 10 80 4.4. Conditional Statements . . . . . . . . . . . . . . . . . . 11 81 4.5. Lifecycle Management . . . . . . . . . . . . . . . . . . . 12 82 4.6. Header Contents . . . . . . . . . . . . . . . . . . . . . 12 83 4.7. Temporary Namespace Assignments . . . . . . . . . . . . . 13 84 4.8. Top Level Database Objects . . . . . . . . . . . . . . . . 14 85 4.9. Data Types . . . . . . . . . . . . . . . . . . . . . . . . 15 86 4.10. Reusable Type Definitions . . . . . . . . . . . . . . . . 15 87 4.11. Object Definitions . . . . . . . . . . . . . . . . . . . . 16 88 4.12. RPC Definitions . . . . . . . . . . . . . . . . . . . . . 17 89 4.13. Notification Definitions . . . . . . . . . . . . . . . . . 17 90 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 91 6. Security Considerations . . . . . . . . . . . . . . . . . . . 19 92 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 20 93 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21 94 8.1. Normative References . . . . . . . . . . . . . . . . . . . 21 95 8.2. Informative References . . . . . . . . . . . . . . . . . . 21 96 Appendix A. Module Review Checklist . . . . . . . . . . . . . . . 22 97 Appendix B. YANG Module Template . . . . . . . . . . . . . . . . 24 98 Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 27 99 C.1. Changes from 00 to 01 . . . . . . . . . . . . . . . . . . 27 100 C.2. Changes from 01 to 02 . . . . . . . . . . . . . . . . . . 27 101 C.3. Changes from 02 to 03 . . . . . . . . . . . . . . . . . . 27 102 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 29 104 1. Introduction 106 The standardization of network configuration interfaces for use with 107 the NETCONF [RFC4741] protocol requires a modular set of data models, 108 which can be reused and extended over time. 110 This document defines a set of usage guidelines for standards track 111 documents containing YANG [I-D.ietf-netmod-yang] data models. It is 112 similar to the MIB usage guidelines specification [RFC4181] in intent 113 and structure. 115 Many YANG constructs are defined as optional to use, such as the 116 description clause. However, in order to maximize interoperability 117 of NETCONF implementations utilizing YANG data models, it is 118 desirable to define a set of usage guidelines which may require a 119 higher level of compliance than the minimum level defined in the YANG 120 specification. 122 The NETCONF stack can be conceptually partitioned into four layers. 124 Layer Example 125 +-------------+ +--------------------+ +-------------------+ 126 (4) | Content | | Configuration data | | Notification data | 127 +-------------+ +--------------------+ +-------------------+ 128 | | | 129 +-------------+ +-----------------+ | 130 (3) | Operations | | | | 131 +-------------+ +-----------------+ | 132 | | | 133 +-------------+ +--------------------+ +----------------+ 134 (2) | Messages | | , | | | 135 +-------------+ +--------------------+ +----------------+ 136 | | | 137 +-------------+ +-----------------------------------------+ 138 (1) | Secure | | SSH, TLS, BEEP/TLS, SOAP/HTTP/TLS, ... | 139 | Transports | | | 140 +-------------+ +-----------------------------------------+ 142 Figure 1 144 This document defines usage guidelines related to the NETCONF 145 operations layer (3), and NETCONF content layer (4). 147 2. Terminology 149 2.1. Requirements Notation 151 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 152 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 153 document are to be interpreted as described in [RFC2119]. 155 RFC 2119 language is used here to express the views of the NETMOD 156 working group regarding YANG module content. Yang modules complying 157 with this document will treat the RFC 2119 terminology as if it were 158 describing best current practices. 160 2.2. NETCONF Terms 162 The following terms are defined in [RFC4741] and are not redefined 163 here: 165 o application 167 o capabilities 169 o client 171 o operation 173 o RPC 175 o server 177 2.3. YANG Terms 179 The following terms are defined in [I-D.ietf-netmod-yang] and are not 180 redefined here: 182 o data node 184 o module 186 o submodule 188 o namespace 190 o version 192 2.4. Terms 194 The following terms are used throughout this document: 196 o module: Generic term for a YANG data model module or submodule. 197 When describing properties which are specific to submodules, the 198 term 'YANG submodule', or simply 'submodule' is used instead. 200 o Published Document: A stable release of a module, usually 201 contained in an RFC. 203 o Unpublished Document: An unstable release of a module, usually 204 contained in an Internet Draft. 206 3. General Documentation Guidelines 208 YANG data model modules under review are likely to be contained in 209 Internet Drafts. All guidelines for Internet Draft authors MUST be 210 followed. These guidelines are available online at: 211 http://www.rfc-editor.org/rfc-editor/instructions2authors.txt 213 The following sections MUST be present in an Internet Draft 214 containing a module: 216 o YANG data model boilerplate section 218 o Narrative sections 220 o Definitions section 222 o Security Considerations section 224 o IANA Considerations section 226 o References section 228 3.1. YANG Data Model Boilerplate Section 230 This section MUST contain a verbatim copy of the latest approved 231 Internet-Standard Management Framework boilerplate, which is 232 available on-line, in section 4 of the Trust Legal Provisions (TLP) 233 document, at: http://trustee.ietf.org/license-info/ 235 Each YANG module contained within an Internet Draft or RPC MUST be 236 identified as a 'Code Component'. The strings '' and 237 '' SHOULD be used to identify each Code Component. 239 3.2. Narrative Sections 241 The narrative part MUST include an overview section that describes 242 the scope and field of application of the module(s) defined by the 243 specification and that specifies the relationship (if any) of these 244 modules to other standards, particularly to standards containing 245 other module modules. The narrative part SHOULD include one or more 246 sections to briefly describe the structure of the modules defined in 247 the specification. 249 If the module(s) defined by the specification import definitions from 250 other modules (except for those defined in the YANG 251 [I-D.ietf-netmod-yang] or YANG Types [I-D.ietf-netmod-yang-types] 252 documents) or are always implemented in conjunction with other 253 modules, then those facts MUST be noted in the overview section, as 254 MUST any special interpretations of objects in other modules. 256 3.3. Definitions Section 258 This section contains the module(s) defined by the specification. 259 These modules MUST be written in YANG [I-D.ietf-netmod-yang]. 261 See Section 4 for guidelines on YANG usage. 263 3.4. Security Considerations Section 265 Each specification that defines one or more modules MUST contain a 266 section that discusses security considerations relevant to those 267 modules. This section MUST be patterned after the latest approved 268 template (available at [ed: URL TBD]). 270 In particular, writable module objects that could be especially 271 disruptive if abused MUST be explicitly listed by name and the 272 associated security risks MUST be spelled out; similarly, readable 273 module objects that contain especially sensitive information or that 274 raise significant privacy concerns MUST be explicitly listed by name 275 and the reasons for the sensitivity/privacy concerns MUST be 276 explained. 278 3.5. IANA Considerations Section 280 In order to comply with IESG policy as set forth in 281 http://www.ietf.org/ID-Checklist.html, every Internet-Draft that is 282 submitted to the IESG for publication MUST contain an IANA 283 Considerations section. The requirements for this section vary 284 depending what actions are required of the IANA. 286 3.5.1. Documents that Create a New Name Space 288 If an Internet-Draft defines a new name space that is to be 289 administered by the IANA, then the document MUST include an IANA 290 Considerations section, that specifies how the name space is to be 291 administered. 293 Specifically, if any YANG module namespace statement value contained 294 in the document is not already registered with IANA, then a new YANG 295 Namespace registry entry must be requested from the IANA. The YANG 296 specification includes the procedure for this purpose in its IANA 297 Considerations section. 299 3.5.2. Documents that Extend an Existing Name Space 301 If an Internet-Draft defines any extensions to a YANG Namespace 302 already administered by the IANA, then the document MUST include an 303 IANA Considerations section, specifies how the name space extension 304 is to be administered. 306 Specifically, if any YANG submodule belongs-to value contained in the 307 document is associated with a module that contains a namespace 308 statement value equal to a YANG Namespace already administered by the 309 IANA, then the existing YANG Namespace must be updated to include the 310 new submodule. 312 3.6. Reference Sections 314 For every import or include statement which appears in a module 315 contained in the specification, which identifies a module in a 316 separate document, a corresponding normative reference to that 317 document MUST appear in the Normative References section. The 318 reference MUST correspond to the specific module version actually 319 used within the specification. 321 For every reference statement which appears in a module contained in 322 the specification, which identifies a separate document, a 323 corresponding normative reference to that document SHOULD appear in 324 the Normative References section. The reference SHOULD correspond to 325 the specific document version actually used within the specification. 327 3.7. Copyright Notices 329 The proper copyright notices MUST be present in the module 330 description statement. Refer to the IETF Trust Legal Provision for 331 the exact legal text that needs to be included. 333 3.8. Intellectual Property Section 335 The proper IPR statements MUST be present in the document, according 336 to the most current Internet Draft boilerplate. Refer to the IETF 337 Trust Legal Provision for the exact legal text that needs to be 338 included. 340 4. YANG Usage Guidelines 342 In general, modules in IETF standards-track specifications MUST 343 comply with all syntactic and semantic requirements of YANG. 344 [I-D.ietf-netmod-yang]. The guidelines in this section are intended 345 to supplement the YANG specification, which is intended to define a 346 minimum set of conformance requirements. 348 In order to promote interoperability and establish a set of practices 349 based on previous experience, the following sections establish usage 350 guidelines for specific YANG constructs. 352 Only guidelines which clarify or restrict the minimum conformance 353 requirements are included here. 355 4.1. Module Naming Conventions 357 Modules contained in standards track documents SHOULD be named with 358 the prefix 'ietf-'. Other types of modules MUST NOT use the 'ietf-' 359 prefix string. 361 A distinctive word or acronym (e.g., protocol name or working group 362 acronym) SHOULD be used in the module name. If new definitions are 363 being defined to extend one or more existing modules, then the same 364 word or acronym should be reused, instead of creating a new one. 366 All published module names MUST be unique. 368 Once a module name is published, it MUST not be reused, even if the 369 RFC containing the module is reclassified to 'Historic' status. 371 4.2. Identifiers 373 Identifiers for modules, submodules, typedefs, groupings, data 374 objects, rpcs, and notifications MUST be between 1 and 64 characters 375 in length. 377 4.3. Defaults 379 In general, it is suggested that sub-statements containing default 380 values SHOULD NOT be present. For example, 'status current;', 381 'config true;', 'mandatory false;', and 'max-elements unbounded;' are 382 common defaults which would make the module difficult to read if used 383 everywhere they are allowed. 385 Instead, it is suggested that common statements SHOULD only be used 386 when being set to a value other than the default value. 388 4.4. Conditional Statements 390 A module may be conceptually partitioned in several ways, using the 391 'if-feature' and/or 'when' statements. In addition, NETCONF 392 capabilities are designed to identify optional functionality. 394 Data model designers need to carefully consider all modularity 395 aspects, including the use of YANG conditional statements. 397 Objects SHOULD NOT directly reference NETCONF capabilities, in order 398 to specify optional behavior. Instead, a 'feature' statement SHOULD 399 be defined to represent the NETCONF capability, and the 'if-feature' 400 statement SHOULD be used within the object definition. 402 If the condition associated with the desired semantics is not 403 dependent on any particular instance value within the database, then 404 an 'if-feature' statement SHOULD be used instead of a 'when' 405 statement. 407 All 'must' and 'when' statements MUST contain valid XPath. If any 408 name tests are present, they MUST contain valid module prefixes and 409 data node names. References to non-existent nodes are considered 410 invalid in YANG, even though they are permitted in XPath. 412 The 'attribute' and 'namespace' axis SHOULD NOT be used because the 413 associated XML node types are not supported in YANG, and may not be 414 supported consistently across NETCONF server implementations. 416 The 'position' and 'last' functions SHOULD NOT be used. Also, the 417 'preceding', and 'following' axes SHOULD NOT be used. These 418 constructs rely on XML document order within a NETCONF server 419 configuration database, which may not be supported consistently or 420 produce reliable results across implementations. Predicate 421 expressions based on static node properties (e.g., name, value, 422 ancestors, descendants) SHOULD be used instead. 424 The 'preceding-sibling' and 'following-sibling' axes MAY be used, 425 with caution. A server is not required to maintain a persistent or 426 deterministic XML document order, which will affect use of these 427 axes. 429 Implicit 'position' function calls within predicates SHOULD NOT be 430 used. (e.g., //chapter[42]). 432 Data nodes which use the 'int64' and 'uint64' built-in type SHOULD 433 NOT be used within relational expressions. There are boundary 434 conditions in which the translation from the YANG 64-bit type to an 435 XPath number can cause incorrect results. 437 Data modelers need to be careful not to confuse the YANG value space 438 and the XPath value space. The data types are not the same in both, 439 and conversion between YANG and XPath data types SHOULD be considered 440 carefully. 442 Explicit XPath data type conversions MAY be used (e.g., 'string', 443 'boolean', or 'number' functions), instead of implicit XPath data 444 type conversions. 446 4.5. Lifecycle Management 448 The status statement SHOULD NOT be present if its value is 'current'. 449 It MUST be present if its value is 'deprecated' or 'obsolete'. 451 The module or submodule name MUST NOT be changed, once the document 452 containing the module or submodule is published. 454 The module namespace URI value SHOULD NOT be changed, once the 455 document containing the module is published. 457 The revision-date sub-statement (within the imports statement) SHOULD 458 be present if any groupings are used from the external module. 460 The revision-date sub-statement (within the include statement) SHOULD 461 be present if any groupings are used from the external sub-module. 463 4.6. Header Contents 465 For published modules, the namespace MUST be a globally unique URI, 466 as defined in [RFC3986]. This value is usually assigned by the IANA. 468 The organization statement MUST be present. If the module is 469 contained in a documented intended for standards-track status, then 470 the organization SHOULD be the IETF working group chartered to write 471 the document. 473 The contact statement MUST be present. If the module is contained in 474 a documented intended for standards-track status, then the working 475 group WEB and mailing information MUST be present, and the document 476 author contact information SHOULD be present. In addition, the Area 477 Director and other contact information MAY be present. 479 The description statement MUST be present. If the module is 480 contained in an unpublished document, then the file name of this 481 document SHOULD be identified in the description statement. This 482 text MUST be removed when the document is published. 484 Modules are often extracted from their original documents and it is 485 useful for developers and operators to know how to find the original 486 source document in a consistent manner. 488 The reference statement MUST be present. It MUST identify the 489 published document which contains the module. 491 If the module relies on information contained in other documents, 492 which are not the same documents implied by the import statements 493 present in the module, then these documents MUST be identified in the 494 reference statement. 496 A revision statement MUST be present for each published version of 497 the module. 499 Each new revision MUST include a revision date which is higher than 500 any other revision date in the module. 502 It is acceptable to reuse the same revision statement within 503 unpublished versions (i.e., Internet Drafts), but the revision date 504 MUST be updated to a higher value each time the Internet Draft is re- 505 published. 507 4.7. Temporary Namespace Assignments 509 It is desirable to include only valid YANG modules in documents, 510 whether they are published yet or not. 512 o allows the module to compile correctly instead of generating 513 disruptive fatal errors. 515 o allows early implementors to use the modules without picking a 516 random value for this field. 518 o allows early interoperability testing since independent 519 implementations will use the same namespace value. 521 Until a URI is assigned by the IANA, a temporary namespace URI MUST 522 be provided for the namespace statement in a YANG module. A value 523 SHOULD be selected which is not likely to collide with other YANG 524 namespaces. 526 An unpublished module namespace statement value SHOULD include the 527 field 'DRAFT-nn', where 'nn' is replaced by the current Internet 528 Draft number. 530 If the YANG module has been previously published, then the RPC being 531 updated needs to be identified. In this case, an unpublished module 532 namespace statement value SHOULD include the field 533 'DRAFT-XXXXBIS-nn', where 'XXXX' is replaced by the RFC number being 534 updated, and 'nn' is replaced by the current Internet Draft number. 536 A temporary namespace statement value SHOULD have the following form: 537 :: 539 The suggested URN prefix string that SHOULD be used is shown below. 540 This value will be defined by the IANA. urn:ietf:params:xml:ns:yang: 542 The following example URNs would be valid temporary namespace 543 statement values: 545 urn:ietf:params:xml:ns:yang:ietf-netconf-partial-lock:DRAFT-09 547 urn:ietf:params:xml:ns:yang:ietf-netconf-state:DRAFT-07 549 urn:ietf:params:xml:ns:yang:ietf-netconf:DRAFT-4741BIS-01 551 4.8. Top Level Database Objects 553 There SHOULD only be one top-level data node defined in each YANG 554 module. However, there MAY be more than one if needed. 556 The top-level data organization SHOULD be considered carefully, in 557 advance. Data model designers need to consider how the functionality 558 for a given protocol or protocol family will grow over time. 560 The names and data organization SHOULD reflect persistent 561 information, such as the name of a protocol. The name of the working 562 group SHOULD NOT be used because this may change over time. 564 A mandatory database object is defined as a node that a client must 565 provide for the database to be valid. The server will not provide a 566 value under any conditions. 568 Top-level database objects MUST NOT be mandatory. 570 If a mandatory node appears at the top-level, it will immediately 571 cause the database to be invalid. This can occur when the server 572 boots or when a module is loaded dynamically at runtime. 574 Top level objects are declared in YANG as mandatory with the 575 mandatory statement or the min-elements statement. All nested non- 576 presence containers are transparent, so a mandatory node nested 577 within one or more non-presence containers causes the top-level 578 container to be considered mandatory. 580 4.9. Data Types 582 Selection of an appropriate data type (i.e., built-in type, existing 583 derived type, or new derived type) is very subjective and therefore 584 few requirements can be specified on that subject. 586 Data model designers SHOULD use the most appropriate built-in data 587 type for the particular application. 589 If extensibility of enumerated values is required, then the 590 identityref data type SHOULD be used instead of an enumeration or 591 other built-in type. 593 For string data types, if a machine-readable pattern can be defined 594 for the desired semantics, then one or more pattern statements SHOULD 595 be present. 597 For string data types, if the length of the string is not required to 598 be unbounded in all implementations, then a length statement SHOULD 599 be present. 601 For numeric data types, if the values allowed by the intended 602 semantics are different than those allowed by the unbounded intrinsic 603 data type (e.g., int32), then a range statement SHOULD be present. 605 The signed numeric data types (i.e., 'int8', 'int16', 'int32', and 606 'int64') SHOULD NOT be used unless negative values are allowed for 607 the desired semantics. 609 For enumeration or bits data types, the semantics for each enum or 610 bit SHOULD be documented. A separate description statement (within 611 each enum or bit statement) SHOULD be present. 613 4.10. Reusable Type Definitions 615 If an appropriate derived type exists in any standard module, such as 616 [I-D.ietf-netmod-yang-types], then it SHOULD be used instead of 617 defining a new derived type. 619 If an appropriate units identifier can be associated with the desired 620 semantics, then a units statement SHOULD be present. 622 If an appropriate default value can be associated with the desired 623 semantics, then a default statement SHOULD be present. 625 If a significant number of derived types are defined, and it is 626 anticipated that these data types will be reused by multiple modules, 627 then these derived types SHOULD be contained in a separate module or 628 submodule, to allow easier reuse without unnecessary coupling. 630 The description statement MUST be present. 632 If the type definition semantics are defined in an external document, 633 then the reference statement SHOULD be present. 635 4.11. Object Definitions 637 The description statement MUST be present in the following body 638 statements: 640 o extension 642 o feature 644 o identity 646 o typedef 648 o grouping 650 o augment 652 o rpc 654 o notification 656 The description statement MUST be present in the following data 657 definition constructs: 659 o container 661 o leaf 663 o leaf-list 665 o list 667 o choice 669 o anyxml 671 If the object semantics are defined in an external document, then a 672 reference statement SHOULD be present. 674 The 'anyxml' construct MUST NOT be used within configuration data. 676 If there are referential integrity constraints associated with the 677 desired semantics that can be represented with XPath, then one or 678 more must statements SHOULD be present. 680 For list and leaf-list objects, if the number of possible instances 681 is not required to be unbounded for all implementations, then the 682 max-elements statement SHOULD be present. 684 If any must or when statements are used within the object definition, 685 then the object description statement SHOULD describe the purpose of 686 each one. 688 4.12. RPC Definitions 690 The description statement MUST be present. 692 If the RPC method semantics are defined in an external document, then 693 a reference statement SHOULD be present. 695 If the RPC method impacts system behavior in some way, it SHOULD be 696 mentioned in the description statement. 698 If the RPC method is potentially harmful to system behavior in some 699 way, it MUST be mentioned in the Security Considerations section of 700 the document. 702 4.13. Notification Definitions 704 The description statement MUST be present. 706 If the notification semantics are defined in an external document, 707 then a reference statement SHOULD be present. 709 5. IANA Considerations 711 There are no actions requested of IANA at this time. 713 6. Security Considerations 715 This document defines documentation guidelines for NETCONF content 716 defined with the YANG data modeling language. It does not introduce 717 any new or increased security risks into the management system. 719 7. Acknowledgments 721 The structure and contents of this document are adapted from 722 Guidelines for MIB Documents [RFC4181], by C. M. Heard. 724 8. References 726 8.1. Normative References 728 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 729 Requirement Levels", BCP 14, RFC 2119, March 1997. 731 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 732 Resource Identifier (URI): Generic Syntax", STD 66, 733 RFC 3986, January 2005. 735 [RFC4741] Enns, R., "NETCONF Configuration Protocol", RFC 4741, 736 December 2006. 738 [I-D.ietf-netmod-yang] 739 Bjorklund, M., "YANG - A data modeling language for 740 NETCONF", draft-ietf-netmod-yang-10 (work in progress), 741 January 2010. 743 [I-D.ietf-netmod-yang-types] 744 Schoenwaelder, J., "Common YANG Data Types", 745 draft-ietf-netmod-yang-types-05 (work in progress), 746 December 2009. 748 8.2. Informative References 750 [RFC4181] Heard, C., "Guidelines for Authors and Reviewers of MIB 751 Documents", BCP 111, RFC 4181, September 2005. 753 Appendix A. Module Review Checklist 755 This section is adapted from RFC 4181. 757 The purpose of a YANG module review is to review the YANG module both 758 for technical correctness and for adherence to IETF documentation 759 requirements. The following checklist may be helpful when reviewing 760 a draft document: 762 1. I-D Boilerplate -- verify that the draft contains the required 763 Internet-Draft boilerplate (see 764 http://www.ietf.org/ietf/1id-guidelines.txt), including the 765 appropriate statement to permit publication as an RFC, and that 766 I-D boilerplate does not contain references or section numbers. 768 2. Abstract -- verify that the abstract does not contain 769 references, that it does not have a section number, and that its 770 content follows the guidelines in 771 http://www.ietf.org/ietf/1id-guidelines.txt. 773 3. YANG Module Boilerplate -- verify that the draft contains the 774 latest approved SNMP Network Management Framework boilerplate 775 from the OPS area web site 776 (http://www.ops.ietf.org/mib-boilerplate.html). [ed: real URL 777 TBD] 779 4. Security Considerations Section -- verify that the draft uses 780 the latest approved template from the OPS area web site 781 (http://www.ops.ietf.org/mib-security.html) and that the 782 guidelines therein have been followed. 784 5. IANA Considerations Section -- this section must always be 785 present. If the draft requires no action from the IANA, ensure 786 that this is explicitly noted. If the draft requires URI values 787 to be assigned, ensure that the IANA Considerations section 788 contains the information specified in [TBD] of these guidelines. 789 If the draft contains the initial version of an IANA-maintained 790 module, verify that the [TBD] invocation contains maintenance 791 instructions that comply with the requirements in RFC 2434. In 792 the latter case, the IANA Considerations section that will 793 appear in the RFC MUST contain a pointer to the actual IANA- 794 maintained module. 796 6. References -- verify that the references are properly divided 797 between normative and informative references, that RFC 2119 is 798 included as a normative reference if the terminology defined 799 therein is used in the document, that all references required by 800 the boilerplate are present, that all YANG modules containing 801 imported items are cited as normative references, and that all 802 citations point to the most current RFCs unless there is a valid 803 reason to do otherwise (for example, it is OK to include an 804 informative reference to a previous version of a specification 805 to help explain a feature included for backward compatibility). 807 7. Copyright Notices -- verify that the draft contains an 808 abbreviated copyright notice in the description statement of 809 each YANG module or sub-module, and that it contains the full 810 copyright notice and disclaimer specified in Sections 5.4 and 811 5.5 of RFC 3978 at the end of the document. Make sure that the 812 correct year is used in all copyright dates. 814 8. IPR Notice -- if the draft does not contains a verbatim copy of 815 the IPR notice specified in Section 5 of RFC 3979, recommend 816 that the IPR notice be included. 818 9. Other Issues -- check for any issues mentioned in 819 http://www.ietf.org/ID-Checklist.html that are not covered 820 elsewhere. 822 10. Technical Content -- review the actual technical content for 823 compliance with the guidelines in this document. The use of a 824 YANG module compiler is recommended when checking for syntax 825 errors; see [YANG tool URL TBD] for more information. Checking 826 for correct syntax, however, is only part of the job. It is 827 just as important to actually read the YANG module document from 828 the point of view of a potential implementor. It is 829 particularly important to check that description statements are 830 sufficiently clear and unambiguous to allow interoperable 831 implementations to be created. 833 Appendix B. YANG Module Template 835 file "ietf-template.yang" 837 module ietf-template { 839 // replace this string with a unique namespace URN value 840 namespace 841 "urn:ietf:params:xml:ns:yang:ietf-template:DRAFT-02"; 843 // replace this string, and try to pick a unique prefix 844 prefix "temp"; 846 // import statements here: e.g., 847 // import ietf-yang-types { prefix yang; } 848 // import ietf-inet-types { prefix inet; } 850 // identify the IETF working group if applicable 851 organization 852 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 854 // update this contact statement with your info 855 contact 856 "WG Web: 857 WG List: 859 WG Chair: your-WG-chair 860 862 Editor: your-name 863 "; 865 // replace the first sentence in this description statement. 866 // replace the copyright notice with the most recent 867 // version, if it has been updated since the publication 868 // of this document 869 description 870 "This module defines a template for other YANG modules. 872 Copyright (c) 2009 IETF Trust and the persons identified as 873 the document authors. All rights reserved. 875 Redistribution and use in source and binary forms, with or 876 without modification, are permitted provided that the 877 following conditions are met: 879 - Redistributions of source code must retain the above 880 copyright notice, this list of conditions and the 881 following disclaimer. 883 - Redistributions in binary form must reproduce the above 884 copyright notice, this list of conditions and the 885 following disclaimer in the documentation and/or other 886 materials provided with the distribution. 888 - Neither the name of Internet Society, IETF or IETF 889 Trust, nor the names of specific contributors, may be 890 used to endorse or promote products derived from this 891 software without specific prior written permission. 893 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 894 CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED 895 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 896 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 897 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 898 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 899 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 900 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 901 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 902 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 903 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 904 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 905 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 906 POSSIBILITY OF SUCH DAMAGE. 908 This version of this YANG module is part of RFC XXXX; see 909 the RFC itself for full legal notices."; 911 // RFC Ed.: replace XXXX with actual RFC number and remove this note 913 reference "RFC XXXX"; 915 // RFC Ed.: remove this note 916 // Note: extracted from draft-ietf-netmod-yang-usage-02.txt 918 // replace YYYY-MM-DD with a real date (year-month-day) 919 // here is an example revision date: 2009-08-12 920 revision YYYY-MM-DD { 921 description 922 "Initial version"; 924 } 926 // extension statements 928 // feature statements 930 // identity statements 932 // typedef statements 934 // grouping statements 936 // data definition statements 938 // augment statements 940 // rpc statements 942 // notification statements 944 // DO NOT put deviation statements in a published module 946 } 948 950 Figure 2 952 Appendix C. Change Log 954 C.1. Changes from 00 to 01 956 o Added transport 'TLS' to figure 1. 958 o Added note about RFC 2119 terminology. 960 o Corrected URL for instructions to authors. 962 o Updated namespace procedures section. 964 o Updated guidelines on module contact, reference, and organization 965 statements. 967 o Added note on use of preceding-sibling and following-sibling axes 968 in XPath expressions. 970 o Added section on temporary namespace statement values. 972 o Added section on top level database objects. 974 o Added ietf-template.yang appendix. 976 C.2. Changes from 01 to 02 978 o Updated figure 1 per mailing list comments. 980 o Updated suggested organization to include the working group name. 982 o Updated ietf-template.yang to use new organization statement 983 value. 985 o Updated Code Component requirements as per new TLP. 987 o Updated ietf-template.yang to use new Code Component begin and end 988 markers. 990 o Updated references to the TLP in a couple sections. 992 o Change manager/agent terminology to client/server. 994 C.3. Changes from 02 to 03 996 o Updated figure 1 to align with 4741bis draft. 998 o Updated guidelines for import-by-revision and include-by-revision. 1000 o Added file name to code begins convention in ietf-template module. 1002 Author's Address 1004 Andy Bierman 1005 InterWorking Labs 1007 Email: andyb@iwl.com