idnits 2.17.1 draft-ietf-netmod-yang-instance-file-format-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. 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 : ---------------------------------------------------------------------------- ** There are 3 instances of too long lines in the document, the longest one being 4 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 615 has weird spacing: '...n front of th...' == Line 631 has weird spacing: '... { type strin...' == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (December 6, 2018) is 1967 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'I-D.ietf-netmod-yang-data-ext' is defined on line 698, but no explicit reference was found in the text == Outdated reference: A later version (-05) exists of draft-ietf-netmod-yang-data-ext-01 == Outdated reference: A later version (-09) exists of draft-ietf-ccamp-alarm-module-06 == Outdated reference: A later version (-25) exists of draft-ietf-netconf-yang-push-20 Summary: 1 error (**), 0 flaws (~~), 8 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Netmod B. Lengyel 3 Internet-Draft Ericsson 4 Intended status: Standards Track B. Claise 5 Expires: June 9, 2019 Cisco Systems, Inc. 6 December 6, 2018 8 YANG Instance Data File Format 9 draft-ietf-netmod-yang-instance-file-format-01 11 Abstract 13 There is a need to document data defined in YANG models when a live 14 YANG server is not available. Data is often needed already in design 15 time or needed by groups that do not have a live running YANG server 16 available. This document specifies a standard file format for YANG 17 instance data, which follows the syntax and semantic from existing 18 YANG models, re-using existing formats from operation/request 19 and decorates them with metadata. 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at https://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on June 9, 2019. 38 Copyright Notice 40 Copyright (c) 2018 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (https://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 56 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 57 2.1. High Level Principles . . . . . . . . . . . . . . . . . . 4 58 3. Instance Data File Format . . . . . . . . . . . . . . . . . . 4 59 3.1. Specifying the Target YANG Modules: target-ptr . . . . . 6 60 3.1.1. IN-LINE Method . . . . . . . . . . . . . . . . . . . 7 61 3.1.2. URI Method . . . . . . . . . . . . . . . . . . . . . 7 62 3.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 8 63 4. Data Life cycle . . . . . . . . . . . . . . . . . . . . . . . 11 64 5. Delivery of Instance Data . . . . . . . . . . . . . . . . . . 12 65 6. YANG Model . . . . . . . . . . . . . . . . . . . . . . . . . 12 66 7. Security Considerations . . . . . . . . . . . . . . . . . . . 15 67 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 68 8.1. URI Registration . . . . . . . . . . . . . . . . . . . . 15 69 8.2. YANG Module Name Registration . . . . . . . . . . . . . . 15 70 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 16 71 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 72 10.1. Normative References . . . . . . . . . . . . . . . . . . 16 73 10.2. Informative References . . . . . . . . . . . . . . . . . 16 74 Appendix A. Open Issues . . . . . . . . . . . . . . . . . . . . 17 75 Appendix B. Changes between revisions . . . . . . . . . . . . . 17 76 Appendix C. Detailed Use Cases - Non-Normative . . . . . . . . . 19 77 C.1. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . 19 78 C.1.1. Use Case 1: Early Documentation of Server 79 Capabilities . . . . . . . . . . . . . . . . . . . . 19 80 C.1.2. Use Case 2: Preloading Data . . . . . . . . . . . . . 20 81 C.1.3. Use Case 3: Documenting Factory Default Settings . . 20 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21 84 1. Terminology 86 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 87 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 88 "OPTIONAL" in this document are to be interpreted as described in BCP 89 14 RFC 2119 [RFC2119] RFC 8174 [RFC8174] when, and only when, they 90 appear in all capitals, as shown here. 92 Design time: A time during which a YANG model and the implementation 93 behind it is created. Sometimes in other documents this period is 94 divided into design and implementation time. 96 Instance Data Set: A named set of data items that can be used as 97 instance data in a YANG data tree. 99 Instance Data File: A file containing an instance data set formatted 100 according to the rules described in this document. 102 Target YANG Module: A YANG module for which the instance data set 103 contains instance data, like ietf-yang-library in the examples. 105 YANG Instance Data, or just instance data for short, is data that 106 could be stored in a datastore and whose syntax and semantics is 107 defined by YANG models. 109 2. Introduction 111 There is a need to document data defined in YANG models when a live 112 YANG server is not available. Data is often needed already in design 113 time or needed by groups that do not have a live running YANG server 114 available. To facilitate this off-line delivery of data this 115 document specifies a standard format for YANG instance data sets and 116 YANG instance data files. 118 The following is a list of already implemented and potential use 119 cases. 121 UC1 Documentation of server capabilities 123 UC2 Preloading default configuration data 125 UC3 Documenting Factory Default Settings 127 UC4 Instance data used as backup 129 UC5 Storing the configuration of a device, e.g. for archive or audit 130 purposes 132 UC6 Storing diagnostics data 134 UC7 Allowing YANG instance data to potentially be carried within 135 other IPC message formats 137 UC8 Default instance data used as part of a templating solution 139 UC9 Providing data examples in RFCs or internet drafts 141 In Appendix C we describe the first three use cases in detail. 143 There are already many and varied use cases where YANG instance data 144 could be used. We do not want to limit future uses of instance data 145 sets, so specifying how and when to use Yang instance data is out of 146 scope for this document. It is anticipated that other documents 147 outside the instance data set itself will define specific use cases. 148 Use cases are listed here only to indicate the need for this work. 150 2.1. High Level Principles 152 The following is a list of the basic principles of the instance data 153 format: 155 P1 Two standard formats are based on the XML and the JSON encoding 157 P2 Re-use existing formats from the operation/request 159 P3 Add metadata about the instance data set 161 P4 A YANG instance data file shall contain only a single YANG 162 instance data set 164 P5 A YANG instance data set may contain data for many target YANG 165 modules 167 P6 Instance data may include configuration data, state data or a mix 168 of the two 170 P7 Partial data sets are allowed 172 P8 YANG instance data format may be used for any data for which 173 target YANG module(s) are defined and available to the reader, 174 independent of whether the module is actually implemented by a 175 YANG server 177 3. Instance Data File Format 179 A YANG instance data file MUST contain a single instance data set and 180 no additional data. 182 The instance data set is placed in a top level auxiliary container 183 named "instance-data-set". An instance data set is made up of a 184 header part and content-data. The initial header part carries 185 metadata for the instance data set. It is defined by the ietf-yang- 186 instance-data YANG module. The content-data is all data inside the 187 anydata datanode, this carries the "real data" that we want to 188 document/provide. The syntax and semantics of content-data is 189 defined by the target YANG modules. 191 Two formats are specified that can be used to represent YANG instance 192 data based on the XML and JSON encoding. Later as other YANG 193 encodings (e.g. CBOR) are defined further instance data formats may 194 be specified. 196 The content-data part of the XML format SHALL follow the format 197 returned for a NETCONF GET operation. The anydata 198 node SHALL contain all elements that would be inside the 199 wrapper element of a reply to the operation. Some XML 200 attributes (e.g. metadata like origin) MAY be absent. SW handling 201 YANG instance data MUST ignore XML attributes unknown to it, allowing 202 them to be used later for other purposes. 204 The content-data part of the JSON format SHALL follow the format of 205 the payload of the reply returned for a RESTCONF GET request directed 206 at the datastore resource: {+restconf}/data or 207 {+restconf}/ds/. 209 Instance data MUST conform to the corresponding target YANG Modules 210 and follow the XML/JSON encoding rules as defined in [RFC7950] and 211 [RFC7951] and MUST use UTF-8 character encoding. A single instance 212 data set MAY contain data for any number of target YANG modules; if 213 needed it MAY carry the complete configuration and state data set for 214 a YANG server. Default values SHOULD NOT be included. 216 Config=true and config=false data MAY be mixed in the instance data 217 file. 219 Instance data files MAY contain partial data sets. This means 220 mandatory, min-elements or require-instance=true constrains MAY be 221 violated. 223 The name of the file SHALL be of the form: 225 instance-data-set-name ['@' revision-date] '.filetype' 227 E.g. acme-router-modules@2018-01-25.xml 229 The revision date is optional. ".filetype" SHALL be ".json" or ".xml" 230 according to the format used. 232 Metadata, information about the data set itself SHALL be included in 233 the instance data set. This data will be children of the top level 234 instance-data-set container as defined in the ietf-instance-data YANG 235 module. Metadata MUST include: 237 o name of the instance data set 238 Metadata SHOULD include: 240 o target-ptr: A pointer to the list of target YANG modules their 241 revision, supported features and deviations. 243 o Revision date of the instance data set. If both this date and and 244 the date in the instance data file name are present they MUST have 245 the same value. 247 o Description of the instance data set. The description SHOULD 248 contain information whether and how the data can change during the 249 lifetime of the YANG server. 251 Metadata MAY include: 253 o Organization responsible for the instance data set 255 o Contact information 257 o Information about the datastore associated with the instance data 258 set e.g. the datastore from where the data was read or the 259 datastore where the data could be loaded or the datastore which is 260 being documented. This information is optional, as often a single 261 datastore can not be specified. 263 o Timestamp: The date and time when the instance data set was last 264 modified. 266 o It is anticipated that different organizations will have the need 267 to augment the metadata with various other data nodes. 269 3.1. Specifying the Target YANG Modules: target-ptr 271 To properly understand and use an instance data set the user needs to 272 know the list of target YANG modules their revision, supported 273 features and deviations. The metadata "target-ptr" is used to 274 specify the YANG target module list. One of the following 3 options 275 SHALL be used: 277 IN-LINE method: Include the needed information as part of instance 278 data as defined by ietf-yang-library 280 URI method: Include a URI that points to the target module set. 281 (if you don't want to repeat the info again and again) 283 EXTERNAL Method: Do not include the target-ptr as the target YANG 284 module set is already known, or the information is available 285 through external documents. 287 Note, the specified target YANG modules only indicate the set of 288 modules that were used to define this YANG instance data set. 289 Sometimes instance data may be used for a YANG server supporting a 290 different YANG module set e.g. for UC2 preloading data the instance 291 data set may not be updated every time the YANG modules on the YANG 292 server are updated, an unchanged instance data set may still be 293 usable. Whether the instance data set is usable for a possibly 294 different real-life target YANG module set depends on the 295 compatibility between the specified target and the real-life target 296 YANG module set (considering modules, revisions, features, 297 deviations). 299 3.1.1. IN-LINE Method 301 Target-ptr MUST bet set to: 303 'inline:ietf-yang-library@' revision-date '.yang' 305 E.g. inline:ietf-yang-library@2016-06-21.yang 307 The revision date in the inline target-ptr is mandatory, it specifies 308 the revision of the ietf-yang-library used. The first group of data 309 inside the "anydata data" element MUST be instance data targeted at 310 the ietf-yang-library. This data SHALL specify the target YANG 311 modules, revisions, supported features and deviations for this and 312 all the other target YANG modules. 314 3.1.2. URI Method 316 Target-ptr MUST bet set to a URI that references another YANG 317 instance data file. The current instance data file will use the same 318 set of target YANG modules, revisions, supported features and 319 deviations as the other referenced YANG instance data file. 321 The referenced instance data file will usually contain data only for 322 ietf-yang-library to specify the target YANG modules for the original 323 instance data file. 325 The URI method is advantageous when the user wants to avoid the 326 overhead of specifying the target YANG modules in the instance data 327 file: E.g. In Use Case 6, when the system creates a diagnostic file 328 every 10 minutes to document the state of the YANG server. 330 The referenced YANG instance data file might use the in-line method 331 or might use the URI method to reference further instance data 332 file(s). However at the end of this reference chain there MUST be an 333 instance data file using the in-line method. 335 If a referenced instance data file is not available the revision 336 data, supported features and deviations for the target YANG modules 337 are unknown. 339 3.2. Examples 341 The following example is based on UC1, documenting server 342 capabilities. It provides (a shortened) list of supported YANG 343 modules for a YANG server. It uses the inline method for the target- 344 ptr. 346 347 349 acme-router-modules 350 inline:ietf-yang-library@2016-06-21.yang 351 352 2108-01-25 353 Initial version 354 355 Defines the minimal set of modules that any acme-router 356 will contain. 357 info@acme.com 358 359 362 363 364 ietf-yang-library 365 2016-06-21 366 urn:ietf:params:xml:ns:yang:ietf-yang-library 367 implement 368 369 370 ietf-system 371 2014-08-06 372 urn:ietf:params:xml:ns:yang:ietf-system 373 sys:authentication 374 sys:local-users 375 sys:ntp 376 377 acme-system-ext 378 2018-08-06 379 380 implement 381 382 383 ietf-yang-types 384 2013-07-15 385 urn:ietf:params:xml:ns:yang:ietf-yang-types 386 import 387 388 389 acme-system-ext 390 2018-08-06 391 urn:rdns:acme.com:oammodel:acme-system-ext 392 implement 393 394 395 396 398 Figure 1: XML Instance Data Set - Use case 1, Documenting server 399 capabilities 401 The following example is based on UC2, preloading default 402 configuration. It provides (a shortened) default rule set for a 403 read-only operator role. It uses the inline method for the target- 404 ptr. 406 407 409 read-only-acm-rules 410 inline:ietf-yang-library@2016-06-21.yang 411 412 2018-01-25 413 Initial version 414 415 Access control rules for a read-only role. 416 info@acme.com 417 418 419 420 ietf-yang-library 421 2016-06-21 422 423 424 ietf-netconf-acm 425 2012-02-22 426 427 428 429 true 430 deny 431 deny 432 433 read-only-role 434 read-only-group 435 436 read-all 437 * 438 read 439 permit 440 441 442 443 444 446 Figure 2: XML Instance Data Set - Use case 2, Preloading access 447 control data 449 The following example is based on UC6 Storing diagnostics data. An 450 instance data set is produced by the YANG server every 15 minutes 451 that contains statistics about netconf. As a new set is produced 452 automatically a revision-date would be useless; instead a timestamp 453 is included. 455 { 456 "ietf-yang-instance-data:instance-data-set": { 457 "name": "acme-router-netconf-diagnostics", 458 "target-ptr": "file:///acme-netconf-diagnostics-yanglib.json", 459 "timestamp": "2018-01-25T17:00:38Z", 460 "description": 461 "Netconf statistics", 462 "content-data": { 463 "ietf-netconf-monitoring:netconf-state": { 464 "statistics": { 465 "netconf-start-time ": "2018-12-05T17:45:00Z", 466 "in-bad-hellos ": "32", 467 "in-sessions ": "397", 468 "dropped-sessions ": "87", 469 "in-rpcs ": "8711", 470 "in-bad-rpcs ": "408", 471 "out-rpc-errors ": "408", 472 "out-notifications": "39007" 473 } 474 } 475 } 476 } 477 } 479 Figure 3: JSON Instance Data File example - UC6 Storing diagnostics 480 data 482 4. Data Life cycle 484 Data defined or documented in YANG instance data sets may be used for 485 preloading a YANG server with this data, but the server may populate 486 the data without using the actual file in which case the instance 487 data file is only used as documentation. 489 While such data will usually not change, data documented by instance 490 data sets MAY be changed by the YANG server itself or by management 491 operations. It is out of scope for this document to specify a method 492 to prevent this. Whether such data changes and if so, when and how, 493 SHOULD be described either in the instance data file description 494 statement or in some other implementation specific manner. 496 YANG instance data is a snap-shot of information at a specific point 497 of time. If the data changes afterwards this is not represented in 498 the instance data set anymore, the valid values can be retrieved in 499 run-time via Netconf/Restconf 500 Notifications about the change of data documented by instance data 501 sets may be supplied by e.g. the Yang-Push mechanism, but it is out 502 of scope for this document. 504 5. Delivery of Instance Data 506 Instance data sets that are produced as a result of some sort of 507 specification or design effort SHOULD be available without the need 508 for a live YANG server e.g. via download from the vendor's website, 509 or in any other way product documentation is distributed. 511 Other instance data sets may be read from or produced by the YANG 512 server itself e.g. UC6 documenting diagnostic data. 514 6. YANG Model 516 file "ietf-yang-instance-data.yang" 518 module ietf-yang-instance-data { 519 yang-version 1.1; 520 namespace 521 "urn:ietf:params:xml:ns:yang:ietf-yang-instance-data"; 522 prefix yid ; 524 import ietf-yang-data-ext { prefix yd; } 525 import ietf-datastores { prefix ds; } 526 import ietf-inet-types { prefix inet; } 527 import ietf-yang-types { prefix yang; } 529 organization "IETF NETMOD Working Group"; 530 contact 531 "WG Web: 532 WG List: 534 Author: Balazs Lengyel 535 "; 537 description "The module defines the structure and content of YANG 538 instance data sets."; 540 revision 2018-11-30 { 541 description "Initial revision."; 542 reference "RFC XXXX: YANG Instance Data Format"; 543 } 545 yd:yang-data instance-data-format { 546 container instance-data-set { 547 description "Auxiliary container to carry meta-data for 548 the complete instance data set."; 550 leaf name { 551 type string; 552 mandatory true; 553 description "Name of the YANG instance data set."; 554 } 556 leaf target-ptr { 557 type union { 558 type string { 559 pattern 'inline:ietf-yang-library@\d{4}-\d{2}-\d{2}\.yang'; 560 } 561 type inet:uri; 562 } 563 description "A pointer to the list of target YANG modules 564 their revisions, supported features and deviations. 565 target-ptr SHALL use one of the following formats: 567 IN-LINE format: target-ptr should bet set to: 568 'inline:ietf-yang-library@' revision-date '.yang' 569 E.g. inline:ietf-yang-library@2016-06-21.yang 570 The revision date is mandatory. When using the in-line 571 format the first group of data inside the content-data 572 node MUST be instance data targeted at the 573 ietf-yang-library. This data SHALL specify the target YANG 574 modules, revisions, supported features and deviations for 575 this and all the other target YANG modules of the set. 577 URI format. target-ptr MUST be a URI that references 578 another YANG instance data file. 579 This instance data file will use the same set of target 580 YANG modules, revisions, supported features and deviations 581 as this other referenced YANG instance data file."; 582 } 584 leaf description { type string; } 586 leaf contact { 587 type string; 588 description "Contact information for the person or 589 organization to whom queries concerning this 590 instance data set should be sent."; 591 } 593 leaf organization { 594 type string; 595 description "Organization responsible for the instance 596 data set."; 597 } 599 leaf datastore { 600 type ds:datastore-ref; 601 description "The identity of the datastore with which the 602 instance data set is associated. If a single specific 603 datastore can not be specified, the leaf MUST be absent. 605 If this leaf is absent, then the datastore to which the 606 instance data belongs is undefined."; 607 } 609 list revision { 610 key date; 611 description "Instance data sets that are produced as 612 a result of some sort of specification or design effort 613 SHOULD have at least one revision entry. For every 614 published editorial change, a new one SHOULD be added 615 in front of the revisions sequence so that all 616 revisions are in reverse chronological order. 618 For instance data sets that are read from 619 or produced by the YANG server or otherwise 620 subject to frequent updates or changes, revision 621 SHOULD NOT be present"; 623 leaf date { 624 type string { 625 pattern '\d{4}-\d{2}-\d{2}'; 626 } 627 description "Specifies the date the instance data set 628 was last modified. Formatted as YYYY-MM-DD"; 629 } 631 leaf description { type string; } 632 } 634 leaf timestamp { 635 type yang:date-and-time; 636 description "The date and time when the instance data set 637 was last modified. 639 For instance data sets that are read from or produced 640 by the YANG server or otherwise subject to frequent 641 updates or changes, timestamp SHOULD be present"; 642 } 643 anydata content-data { 644 mandatory true; 645 description "Contains the real instance data. 646 The data MUST conform to the relevant YANG Modules."; 647 } 648 } 649 } 650 } 652 654 7. Security Considerations 656 Depending on the nature of the instance data, instance data files MAY 657 need to be handled in a secure way. The same type of handling should 658 be applied, that would be needed for the result of a operation 659 returning the same data. 661 8. IANA Considerations 663 This document registers one URI and one YANG module. 665 8.1. URI Registration 667 This document registers one URI in the IETF XML registry [RFC3688]. 668 Following the format in RFC 3688, the following registration is 669 requested to be made: 671 URI: urn:ietf:params:xml:ns:yang:ietf-yang-instance-data 673 Registrant Contact: The IESG. 675 XML: N/A, the requested URI is an XML namespace. 677 8.2. YANG Module Name Registration 679 This document registers one YANG module in the YANG Module Names 680 registry [RFC6020]. 682 name: ietf-yang-instance-data 683 namespace: urn:ietf:params:xml:ns:yang:ietf-yang-instance-data 684 prefix: yid 685 reference: RFC XXXX 687 9. Acknowledgments 689 For their valuable comments, discussions, and feedback, we wish to 690 acknowledge Andy Bierman, Juergen Schoenwaelder, Rob Wilton, Joe 691 Clark, Martin Bjorklund, Ladislav Lhotka, Qin Wu and other members of 692 the Netmod WG. 694 10. References 696 10.1. Normative References 698 [I-D.ietf-netmod-yang-data-ext] 699 Bierman, A., Bjorklund, M., and K. Watsen, "YANG Data 700 Extensions", draft-ietf-netmod-yang-data-ext-01 (work in 701 progress), March 2018. 703 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 704 DOI 10.17487/RFC3688, January 2004, 705 . 707 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 708 the Network Configuration Protocol (NETCONF)", RFC 6020, 709 DOI 10.17487/RFC6020, October 2010, 710 . 712 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 713 RFC 7950, DOI 10.17487/RFC7950, August 2016, 714 . 716 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 717 RFC 7951, DOI 10.17487/RFC7951, August 2016, 718 . 720 10.2. Informative References 722 [I-D.ietf-ccamp-alarm-module] 723 Vallin, S. and M. Bjorklund, "YANG Alarm Module", draft- 724 ietf-ccamp-alarm-module-06 (work in progress), November 725 2018. 727 [I-D.ietf-netconf-rfc7895bis] 728 Bierman, A., Bjorklund, M., Schoenwaelder, J., Watsen, K., 729 and R. Wilton, "YANG Library", draft-ietf-netconf- 730 rfc7895bis-07 (work in progress), October 2018. 732 [I-D.ietf-netconf-yang-push] 733 Clemm, A., Voit, E., Prieto, A., Tripathy, A., Nilsen- 734 Nygaard, E., Bierman, A., and B. Lengyel, "Subscription to 735 YANG Datastores", draft-ietf-netconf-yang-push-20 (work in 736 progress), October 2018. 738 [I-D.wu-netconf-restconf-factory-restore] 739 Wu, Q., Lengyel, B., and Y. Niu, "Factory default 740 Setting", draft-wu-netconf-restconf-factory-restore-03 741 (work in progress), October 2018. 743 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 744 Requirement Levels", BCP 14, RFC 2119, 745 DOI 10.17487/RFC2119, March 1997, 746 . 748 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 749 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 750 May 2017, . 752 Appendix A. Open Issues 754 o Augmenting metadata must be possible. As of now it looks like 755 yang-data-ext will solve that. If not, define instance data as 756 regular YANG instead of yd:yang-data. 758 Appendix B. Changes between revisions 760 v00 - v01 762 o Added the target-ptr metadata with 3 methods 764 o Added timestamp metadata 766 o Removed usage of dedicated .yid file extension 768 o Added list of use cases 770 o Added list of principles 772 o Updated examples 774 o Moved detailed use case descriptions to appendix 776 v05 - v00-netmod 778 o New name for the draft following Netmod workgroup adoption. No 779 other changes 781 v04 - v05 783 o Changed title and introduction to clarify that this draft is only 784 about the file format and documenting server capabilities is just 785 a use case. 787 o Added reference to draft-wu-netconf-restconf-factory-restore 789 o Added new open issues. 791 v03 - v04 793 o Updated changelog for v02-v03 795 v02 - v03 797 o Updated the document according to comments received at IETF102 799 o Added parameter to specify datastore 801 o Rearranged chapters 803 o Added new use case: Documenting Factory Default Settings 805 o Added "Target YANG Module" to terminology 807 o Clarified that instance data is a snapshot valid at the time of 808 creation, so it does not contain any later changes. 810 o Removed topics from Open Issues according to comments received at 811 IETF102 813 v01 - v02 815 o The recommendation to document server capabilities was changed to 816 be just the primary use-case. (Merged chapter 4 into the use case 817 chapter.) 819 o Stated that RFC7950/7951 encoding must be followed which also 820 defines (dis)allowed whitespace rules. 822 o Added UTF-8 encoding as it is not specified in t950 for instance 823 data 825 o added XML declaration 827 v00 - v01 828 o Redefined using yang-data-ext 830 o Moved metadata into ordinary leafs/leaf-lists 832 Appendix C. Detailed Use Cases - Non-Normative 834 C.1. Use Cases 836 We present a number of use cases were YANG instance data is needed. 838 C.1.1. Use Case 1: Early Documentation of Server Capabilities 840 A YANG server has a number of server-capabilities that are defined in 841 YANG modules and can be retrieved from the server using protocols 842 like NETCONF or RESTCONF. YANG server capabilities include 844 o data defined in ietf-yang-library: YANG modules, submodules, 845 features, deviations, schema-mounts, datastores supported 846 ([I-D.ietf-netconf-rfc7895bis]) 848 o alarms supported ([I-D.ietf-ccamp-alarm-module]) 850 o data nodes, subtrees that support or do not support on-change 851 notifications ([I-D.ietf-netconf-yang-push]) 853 o netconf-capabilities in ietf-netconf-monitoring 855 While it is good practice to allow a client to query these 856 capabilities from the live YANG server, that is often not possible. 858 Often when a network node is released an associated NMS (network 859 management system) is also released with it. The NMS depends on the 860 capabilities of the YANG server. During NMS implementation 861 information about server capabilities is needed. If the information 862 is not available early in some off-line document, but only as 863 instance data from the live network node, the NMS implementation will 864 be delayed, because it has to wait for the network node to be ready. 865 Also assuming that all NMS implementors will have a correctly 866 configured network node available to retrieve data from, is a very 867 expensive proposition. (An NMS may handle dozens of node types.) 869 Network operators often build their own home-grown NMS systems that 870 needs to be integrated with a vendor's network node. The operator 871 needs to know the network node's server capabilities in order to do 872 this. Moreover the network operator's decision to buy a vendor's 873 product may even be influenced by the network node's OAM feature set 874 documented as the Yang server's capabilities. 876 Beside NMS implementors, system integrators and many others also need 877 the same information early. Examples could be model driven testing, 878 generating documentation, etc. 880 Most server-capabilities are relatively stable and change only during 881 upgrade or due to licensing or addition or removal of HW. They are 882 usually defined by a vendor in design time, before the product is 883 released. It feasible and advantageous to define/document them early 884 e.g. in a YANG instance data File. 886 It is anticipated that a separate IETF document will define in detail 887 how and which set of server capabilities should be documented. 889 C.1.2. Use Case 2: Preloading Data 891 There are parts of the configuration that must be fully configurable 892 by the operator, however for which often a simple default 893 configuration will be sufficient. 895 One example is access control groups/roles and related rules. While 896 a sophisticated operator may define dozens of different groups often 897 a basic (read-only operator, read-write system administrator, 898 security-administrator) triplet will be enough. Vendors will often 899 provide such default configuration data to make device configuration 900 easier for an operator. 902 Defining Access control data is a complex task. To help the device 903 vendor pre-defines a set of default groups (/nacm:nacm/groups) and 904 rules for these groups to access specific parts of common models 905 (/nacm:nacm/rule-list/rule). 907 YANG instance data files are used to document and/or preload the 908 default configuration. 910 C.1.3. Use Case 3: Documenting Factory Default Settings 912 Nearly every YANG server has a factory default configuration. If the 913 system is really badly misconfigured or if the current configuration 914 is to be abandoned the system can be reset to this default. 916 In Netconf the operation can already be used to reset 917 the startup datastore. There are ongoing efforts to introduce a new, 918 more generic reset-datastore operation for the same purpose 919 [I-D.wu-netconf-restconf-factory-restore] 921 The operator currently has no way to know what the default 922 configuration actually contains. YANG instance data can be used to 923 document the factory default configuration. 925 Authors' Addresses 927 Balazs Lengyel 928 Ericsson 929 Magyar Tudosok korutja 11 930 1117 Budapest 931 Hungary 933 Phone: +36-70-330-7909 934 Email: balazs.lengyel@ericsson.com 936 Benoit Claise 937 Cisco Systems, Inc. 938 De Kleetlaan 6a b1 939 1831 Diegem 940 Belgium 942 Phone: +32 2 704 5622 943 Email: bclaise@cisco.com