idnits 2.17.1 draft-lengyel-netmod-yang-instance-data-00.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (February 6, 2018) is 2263 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-netconf-rfc7895bis' is defined on line 396, but no explicit reference was found in the text == Unused Reference: 'I-D.ietf-netconf-yang-push' is defined on line 401, but no explicit reference was found in the text == Unused Reference: 'I-D.vallin-ccamp-alarm-module' is defined on line 407, but no explicit reference was found in the text == Unused Reference: 'RFC2119' is defined on line 412, but no explicit reference was found in the text == Unused Reference: 'RFC8174' is defined on line 417, but no explicit reference was found in the text == Outdated reference: A later version (-07) exists of draft-ietf-netconf-rfc7895bis-04 == Outdated reference: A later version (-25) exists of draft-ietf-netconf-yang-push-13 Summary: 0 errors (**), 0 flaws (~~), 9 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group B. Lengyel 3 Internet-Draft Ericsson 4 Intended status: Standards Track B. Claise 5 Expires: August 10, 2018 Cisco Systems, Inc. 6 February 6, 2018 8 YANG Instance Data Files and their use for Documenting Server 9 Capabilities 10 draft-lengyel-netmod-yang-instance-data-00 12 Abstract 14 This document specifies a standard file format for YANG instance 15 data, that is data that could be stored in a datastore and whose 16 syntax and semantics is defined by YANG models. Instance data files 17 can be used to provide information that is defined in design time. 18 There is a need to document Server capabilities (which are often 19 specified in design time), which should be done using instance data 20 files. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at https://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on August 10, 2018. 39 Copyright Notice 41 Copyright (c) 2018 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (https://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 1. Terminology 56 Instance Data Set: A named set of data items that can be used as 57 instance data in a YANG data tree. 59 Instance Data File: A file containing an instance data set formatted 60 according to the rules described in this document. 62 2. Introduction 64 A YANG server has a number of server-capabilities that can be 65 retrieved from the server using protocols like NETCONF or RESTCONF. 66 YANG server capabilities include among other things 68 o data defined in ietf-yang-library (YANG modules, submodules, 69 features, deviations, schema-mounts) 71 o datastores supported 73 o alarms supported (draft-vallin-ccamp-alarm-module) 75 o data nodes, subtrees that support or do not support on-change 76 notifications (draft-ietf-netconf-yang-push)- 78 o netconf-capabilities 80 o etc. 82 While it is good practice to allow a client to query these 83 capabilites from the live YANG server, that is often not enough. 84 Many of these server-capabilities are relatively stable. They may 85 change 87 1. only at upgrade, or 89 2. rarely (e.g. due to licensing), or 91 3. more frequently 93 Most capabilities belong to type 1), some to type 2) and a relatively 94 small set to type 3). Many network nodes only have type 1) or type 95 1+2) capabilities. Stable capabilities are usually defined by a 96 vendor in design time, before the product is released. While these 97 capabilities can be retrieved from the live server in run-time, there 98 is a strong need to provide the same data already during design time. 99 (Often only a part of all the server capabilities can be made 100 available.) 102 Often when a network node is released an associated NMS (network 103 management system) is also released with it. The NMS depends on the 104 capabilities of the YANG server. During NMS implementation the 105 information about server capabilities is needed. If the information 106 is not available early in some off-line document, but only as 107 instance data from the network node, the NMS implementation will be 108 delayed, because it has to wait for the network node to be ready. 109 Also assuming that all NMS implementors will have a correctly 110 configured network node available to retrieve data from, is a very 111 expensive proposition. (An NMS may handle dozens of node types.) 113 Beside NMS implementors, system integrators and many others also need 114 the same information early. Examples could be model driven testing, 115 generating documentation, etc. 117 This document specifies a file format for YANG instance data and 118 proposes to use it to provide server capability information, allowing 119 vendors to specify capabilities together with the YANG modules. 121 The same instance data file format can be used for other purposes, 122 like providing initial data for any YANG module. E.g. a basic set of 123 access control groups can be provided either by a device vendor or an 124 operator using a network device. 126 2.1. Data Life cycle 128 Data defined or documented in YANG Instance Data Sets may be used for 129 preloading a YANG server with this data, but the server may populate 130 the data without using the actual file in which case the Instance 131 Data File is only used as documentation. 133 While such data will usually not change, a data documented by 134 Instance Data Files MAY be changed by the YANG server itself or by 135 management operations. It is out of scope for this document to 136 specify a method to prevent this. 138 Notifications about the change of data documented by Instance Data 139 Sets may be supplied by e.g. the Yang-Push mechanism, but it is out 140 of scope for this document. 142 2.2. Use Case 1: Early Documentation of Server Capabilites 144 An operator wants to integrate his own in-house built management 145 system with the network node from ACME Systems. The management 146 integration must be ready by the time the first AcmeRouter 9000 is 147 installed in the network. To do the integration the operator needs 148 the the list of supported YANG modules and features. While this list 149 could be read from the ietf-yang-library via Netconf, in order to 150 allow time for developing the management integration, the operator 151 demands this information early. The operator will value that this 152 information is available in a standard format, that is actually the 153 same format he can later read from the node via Netconf. 155 2.3. Use Case 2: Preloading Data 157 Defining Access control data is a complex task. To help with this 158 the device vendor pre-defines some of the data. Among others a set 159 of default groups (/nacm:nacm/nacm:groups) are defined e.g. "read- 160 only", "operator", "sys-admin". The operator will often use these 161 default groups, but is also free to completely remove them and define 162 his own set of groups. 164 3. Instance Data File Format 166 Two standard formats to represent YANG Instance Data are specified 167 based on the XML and JSON serialization. The XML format is defined 168 in [RFC7950] while the JSON format is defined in [RFC7951] with the 169 additions below. 171 For both formats data is placed in a top level auxiliary container 172 named "instance-data". The purpose of the container, which is not 173 part of the real data itself, is to contain the potentially multiple 174 top level XML elements and to carry meta-data for the complete 175 instance-data-set. 177 The XML format SHALL follow the format returned for a NETCONF GET 178 operation. The container SHALL contain all data that 179 would be inside the wrapper element. XML attributes SHOULD 180 NOT be used, however if a SW receiving a YANG instance data file 181 encounters XML attributes it MUST discard them silently, allowing 182 them to be used later for other purposes. 184 The JSON format SHALL follow the format of the reply returmed for a 185 RESTCONF GET request directed at the datastore resource: 186 {+restconf}/data. ETags and Timestamps SHOULD NOT be included. 188 A YANG Instance data file MUST contain a single instance data set. 189 Instance data MUST conform to the corresponding YANG Modules. 191 Default values SHOULD NOT but MAY be included. Config=true and 192 config=false data may be mixed in the instance data file. Instance 193 data files MAY contain partial data sets. This means mandatory, min- 194 elements or require-instance=true constrains MAY be violated. 196 Meta data, information about the data set itself SHALL be included in 197 the instance data file. Metadata SHALL be formulated following 198 [RFC7952] using the annotations defined in module ietf-yang-instance- 199 data-annotations. All metadata SHOULD be connected to the top level 200 "instance-data" container. Meta data SHALL include: 202 o Name of the instance data set 204 o Revision date of the instance data set (later a semantic version 205 MAY also be included) 207 o Description of the instance data set. The description SHOULD 208 contain information whether and how the data can change during the 209 lifetime of the network element. 211 Any other metadata may also be included after these items. 213 220 221 222 ietf-system 223 2014-08-06 224 225 urn:ietf:params:xml:ns:yang:ietf-system 226 implement 227 authentication 228 radius-authentication 229 230 231 233 Figure 1: XML Instance Data File example 235 { 236 "instance-data": { 237 "@": { 238 "ietf-yang-instance-data-annotations:instance-data-set": 239 "acme-router-modules", 240 "ietf-yang-instance-data-annotations:revision": "2108-01-25", 241 "ietf-yang-instance-data-annotations:contact": 242 "info@acme.com", 243 "ietf-yang-instance-data-annotations:description": 244 "Defines the set of modules that an acme-router will contain." 245 }, 246 "ietf-yang-library:modules-state": { 247 "module": [ 248 { 249 "name": "ietf-system", 250 "revision": "2014-08-06", 251 "namespace": "urn:ietf:params:xml:ns:yang:ietf-system", 252 "conformance-type": "implement", 253 "feature": ["authentication", "radius-authentication"] 254 } 255 ] 256 } 257 } 258 } 260 Figure 2: JSON Instance Data File example 262 4. Providing Initial Data 264 YANG instance data files SHOULD be used to provide design time 265 information about server capabilities. The content of the instance 266 data file SHOULD describe the capabilities of the server, however 267 there is no general guarantee that the capabilities will not change 268 over time. Whether capabilities change and if so, when and how 269 SHOULD be described either in the instance data file description 270 statements or some other implementation specific manner. The set of 271 server capabilities to be documented will be defined by other 272 standards and specifications, and is out of scope for this document. 273 Whether and how the instance data files are used by SW implementing a 274 YANG server is out of scope for this specification. 276 5. YANG Model 278 file "ietf-yang-instance-data-annotations.yang" 280 module ietf-yang-instance-data-annotations { 281 yang-version 1.1; 282 namespace 283 "urn:ietf:params:xml:ns:yang:ietf-yang-instance-data-annotations"; 284 prefix ida ; 286 import ietf-yang-types { prefix "yang"; } 287 import ietf-yang-metadata { prefix "md"; } 289 organization "IETF NETMOD Working Group"; 290 contact 291 "WG Web: 293 WG List: 295 Author: Balazs Lengyel 296 "; 298 description "The module defines annotations to allow defining 299 metadata for YANG Instance Data files."; 300 reference "RFC 7950, RFC 7962"; 302 revision 2017-08-24 { 303 description "Initial revision."; 304 reference "RFC XXXX: YANG Instance Data"; 305 } 307 md:annotation instance-data-set { 308 type yang:yang-identifier; 309 description "Defines the name of a YANG instance data set. 311 The annotation SHALL only be used on the top level 312 element in RFC XXXX defined YANG Instance Data files. 313 Exactly one instance-data-set annotation SHALL be used per 314 element."; 315 } 317 md:annotation contact { 318 type string; 319 description "Contains the same information the ontact statement 320 carries for a YANG module. 322 The annotation SHALL only be used on the top level 323 element in RFC XXXX defined YANG Instance Data files. 324 Zero or one contact annotation SHALL be used per 325 element."; 326 } 328 md:annotation organization { 329 type string; 331 description "Contains the same information the organization 332 statement carries for a YANG module. 334 The annotation SHALL only be used on the top level 335 element in RFC XXXX defined YANG instance data files. 336 Zero or one organization annotation SHALL be used per 337 element."; 338 } 340 md:annotation revision { 341 type string { 342 pattern '\d{4}-\d{2}-\d{2}'; 343 } 344 description "Specifies the data the instance-data-set was 345 modified for this release. 347 The annotation SHALL only be used on the top level 348 element in RFC XXXX defined YANG Instance Data files. 349 One or more revision annotations SHALL be used per 350 element. 351 A separate annotation SHOULD be added each time the 352 instance-data-set is released."; 353 } 355 md:annotation description { 356 type string; 357 description "Defines the name of a YANG instance data set. 359 The annotation SHALL be used on the top level element 360 in RFC XXXX defined YANG Instance Data files, and MAY be used 361 on other data elements of an instance data file. 362 Zero one description annotation SHALL be used per element, but 363 exactly one description annotation SHALL be used on the top 364 level element."; 365 } 366 } 368 370 6. Security Considerations 372 To be completed 374 7. IANA Considerations 376 No IANA action is requested. 378 8. References 380 8.1. Normative References 382 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 383 RFC 7950, DOI 10.17487/RFC7950, August 2016, 384 . 386 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 387 RFC 7951, DOI 10.17487/RFC7951, August 2016, 388 . 390 [RFC7952] Lhotka, L., "Defining and Using Metadata with YANG", 391 RFC 7952, DOI 10.17487/RFC7952, August 2016, 392 . 394 8.2. Informative References 396 [I-D.ietf-netconf-rfc7895bis] 397 Bierman, A., Bjorklund, M., Schoenwaelder, J., Watsen, K., 398 and R. Wilton, "YANG Library", draft-ietf-netconf- 399 rfc7895bis-04 (work in progress), January 2018. 401 [I-D.ietf-netconf-yang-push] 402 Clemm, A., Voit, E., Prieto, A., Tripathy, A., Nilsen- 403 Nygaard, E., Bierman, A., and B. Lengyel, "YANG Datastore 404 Subscription", draft-ietf-netconf-yang-push-13 (work in 405 progress), February 2018. 407 [I-D.vallin-ccamp-alarm-module] 408 Vallin, S. and M. Bjorklund, "YANG Alarm Module", draft- 409 vallin-ccamp-alarm-module-01 (work in progress), October 410 2017. 412 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 413 Requirement Levels", BCP 14, RFC 2119, 414 DOI 10.17487/RFC2119, March 1997, 415 . 417 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 418 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 419 May 2017, . 421 Authors' Addresses 422 Balazs Lengyel 423 Ericsson 424 xxx 425 1117 Budapest 426 Hungary 428 Phone: +36-70-330-7909 429 Email: balazs.lengyel@ericsson.com 431 Benoit Claise 432 Cisco Systems, Inc. 433 De Kleetlaan 6a b1 434 1831 Diegem 435 Belgium 437 Phone: +32 2 704 5622 438 Email: bclaise@cisco.com