idnits 2.17.1 draft-yby-yang-model-conversion-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 : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC6020]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (May 15, 2020) is 1440 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) No issues found here. Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force B. Yan, Ed. 3 Internet-Draft Z. Li, Ed. 4 Intended status: Standards Track Y. Zhao, Ed. 5 Expires: November 16, 2020 Beijing Univ. of Posts and Telecom. 6 May 15, 2020 8 YANG Model Conversion 9 draft-yby-yang-model-conversion-00 11 Abstract 13 This document introduces the grammer extensions and relavant rules 14 for YANG 1.0 [RFC6020] to complete the mapping between two similar 15 YANG modules that describe the same entity. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at https://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on November 16, 2020. 34 Copyright Notice 36 Copyright (c) 2020 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (https://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 52 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 3 53 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 4. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 5. Mapping Relationships . . . . . . . . . . . . . . . . . . . . 4 56 5.1. One-to-one Mapping . . . . . . . . . . . . . . . . . . . 4 57 5.2. One-to-many Mapping . . . . . . . . . . . . . . . . . . . 4 58 5.3. One-to-none Mapping . . . . . . . . . . . . . . . . . . . 4 59 6. Grammer Extension for YANG . . . . . . . . . . . . . . . . . 4 60 6.1. The mapto Statement . . . . . . . . . . . . . . . . . . . 4 61 6.2. The statements Statement . . . . . . . . . . . . . . . . 4 62 6.2.1. The statements's Substatements . . . . . . . . . . . 4 63 6.2.2. The source Substatement . . . . . . . . . . . . . . . 4 64 6.2.3. The destination Substatement . . . . . . . . . . . . 4 65 6.2.4. Usage example . . . . . . . . . . . . . . . . . . . . 4 66 6.3. The maptype Statement . . . . . . . . . . . . . . . . . . 4 67 6.3.1. The value of oto . . . . . . . . . . . . . . . . . . 4 68 6.3.2. The value of otm . . . . . . . . . . . . . . . . . . 5 69 6.3.3. The value of otn . . . . . . . . . . . . . . . . . . 5 70 6.3.4. Usage example . . . . . . . . . . . . . . . . . . . . 5 71 6.4. The deviation Statement . . . . . . . . . . . . . . . . . 5 72 6.4.1. Usage example . . . . . . . . . . . . . . . . . . . . 5 73 7. Mapping for statements . . . . . . . . . . . . . . . . . . . 5 74 7.1. Mapping of module Statement . . . . . . . . . . . . . . . 5 75 7.2. Mapping of submodule Statement . . . . . . . . . . . . . 5 76 7.3. Mapping of typedef Statement . . . . . . . . . . . . . . 5 77 7.4. Mapping of type Statement . . . . . . . . . . . . . . . . 5 78 7.5. Mapping of container Statement . . . . . . . . . . . . . 5 79 7.6. Mapping of leaf Statement . . . . . . . . . . . . . . . . 5 80 7.7. Mapping of leaf-list Statement . . . . . . . . . . . . . 5 81 7.8. Mapping of list Statement . . . . . . . . . . . . . . . . 5 82 7.9. Mapping of choice Statement . . . . . . . . . . . . . . . 5 83 7.10. Mapping of anyxml Statement . . . . . . . . . . . . . . . 5 84 7.11. Mapping of grouping Statement . . . . . . . . . . . . . . 5 85 7.12. Mapping of uses Statement . . . . . . . . . . . . . . . . 5 86 7.13. Mapping of rpc Statement . . . . . . . . . . . . . . . . 5 87 7.14. Mapping of notification Statement . . . . . . . . . . . . 5 88 7.15. Mapping of augment Statement . . . . . . . . . . . . . . 5 89 7.16. Mapping of identity Statement . . . . . . . . . . . . . . 6 90 7.17. Mapping of extension Statement . . . . . . . . . . . . . 6 91 7.18. Mapping of conformance-related Statements . . . . . . . . 6 92 7.19. Mapping of common Statements . . . . . . . . . . . . . . 6 93 8. Synchronization among Multiple Model's Datastores . . . . . . 6 94 9. Mapping Deviation Evaluation . . . . . . . . . . . . . . . . 6 95 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 96 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 97 12. Security Considerations . . . . . . . . . . . . . . . . . . . 6 98 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 99 13.1. Normative References . . . . . . . . . . . . . . . . . . 6 100 13.2. Informative References . . . . . . . . . . . . . . . . . 7 101 Appendix A. Additional Stuff . . . . . . . . . . . . . . . . . . 7 102 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 104 1. Introduction 106 YANG 1.0 [RFC6020] and YANG 1.1 [RFC7950] are proposed originally as 107 a domain-specific language to define the network model for NETCONF 108 [RFC6241] protocol. Based on YANG language, some organizations 109 define their own public network models, and many companies (the 110 equipment manufacturer, the telecom operators, the Internet 111 companies, etc.) define their private models. Therefore, a network 112 entity (device, etc.) MAY be described as different YANG data trees 113 by different organizations and companies. In some cases, the data is 114 required to be converted among different YANG models. This document 115 proposes some extensions, named Yang Model Conversion (YMC), for YANG 116 1.0 [RFC6020] to define the mapping rules of the nodes under the 117 schema tree. By using YMC, the conversion rules MUST be clear, and 118 the information deviation of conversion SHOULD be evaluated properly. 120 2. Requirements Language 122 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 123 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 124 document are to be interpreted as described in RFC 2119 [RFC2119]. 126 3. Overview 128 YMC is consisted of a set of new statements based on YANG language. 129 These statements are designed to represent the mapping relationships 130 of one-to-one, one-to-many, and one-to-none for different schema 131 nodes under different XPath. The statements that includes leaf, 132 leaf-list, list, etc. MAY be mapped to other statements with some 133 limitations. For the nested usage of statements, the mapping 134 statements SHOULD be also nested. When there is a big gap between 135 two YANG models, the mapping deviation MAY be introduced and result 136 in failures in networks. YMC proposes a method to evaluate the 137 information loss while mapping. Thus, the performance SHOULD be 138 predicted, and some potential risks SHOULD be avoided in advance. 140 4. Terminology 142 The following terminologies are defined in this document: 144 o YMC - YANG model conversion. 146 o map set - a set of map nodes that define the mapping rules between 147 two YANG modules. A YANG file SHOULD include only one map set. 149 o map node - a node in the map set that SHOULD be used to map the 150 schema node from one module to the schema node in another module. 152 o mapto - a node of map nodes. 154 o statements - a node of map nodes. 156 o maptype - a node of map nodes. 158 o oto - a value of maptype node that means the one-to-one mapping. 160 o otm - a value of maptype node that means the one-to-many mapping. 162 o otn - a value of maptype node that means the one-to-none mapping. 164 5. Mapping Relationships 166 5.1. One-to-one Mapping 168 5.2. One-to-many Mapping 170 5.3. One-to-none Mapping 172 6. Grammer Extension for YANG 174 6.1. The mapto Statement 176 6.2. The statements Statement 178 6.2.1. The statements's Substatements 180 6.2.2. The source Substatement 182 6.2.3. The destination Substatement 184 6.2.4. Usage example 186 6.3. The maptype Statement 188 6.3.1. The value of oto 189 6.3.2. The value of otm 191 6.3.3. The value of otn 193 6.3.4. Usage example 195 6.4. The deviation Statement 197 6.4.1. Usage example 199 7. Mapping for statements 201 This section divides all statements of YANG 1.0 into several kinds of 202 categories. 204 7.1. Mapping of module Statement 206 7.2. Mapping of submodule Statement 208 7.3. Mapping of typedef Statement 210 7.4. Mapping of type Statement 212 7.5. Mapping of container Statement 214 7.6. Mapping of leaf Statement 216 7.7. Mapping of leaf-list Statement 218 7.8. Mapping of list Statement 220 7.9. Mapping of choice Statement 222 7.10. Mapping of anyxml Statement 224 7.11. Mapping of grouping Statement 226 7.12. Mapping of uses Statement 228 7.13. Mapping of rpc Statement 230 7.14. Mapping of notification Statement 232 7.15. Mapping of augment Statement 233 7.16. Mapping of identity Statement 235 7.17. Mapping of extension Statement 237 7.18. Mapping of conformance-related Statements 239 7.19. Mapping of common Statements 241 8. Synchronization among Multiple Model's Datastores 243 9. Mapping Deviation Evaluation 245 10. Acknowledgements 247 This document is Supported by BUPT Excellent Ph.D. Students 248 Foundation (CX2019314). 250 11. IANA Considerations 252 This memo includes no request to IANA. 254 12. Security Considerations 256 All drafts are required to have a security considerations section. 257 See RFC 3552 [RFC3552] for a guide. 259 13. References 261 13.1. Normative References 263 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 264 Requirement Levels", BCP 14, RFC 2119, 265 DOI 10.17487/RFC2119, March 1997, 266 . 268 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 269 the Network Configuration Protocol (NETCONF)", RFC 6020, 270 DOI 10.17487/RFC6020, October 2010, 271 . 273 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 274 and A. Bierman, Ed., "Network Configuration Protocol 275 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 276 . 278 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 279 RFC 7950, DOI 10.17487/RFC7950, August 2016, 280 . 282 13.2. Informative References 284 [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC 285 Text on Security Considerations", BCP 72, RFC 3552, 286 DOI 10.17487/RFC3552, July 2003, 287 . 289 Appendix A. Additional Stuff 291 This becomes an Appendix. 293 Authors' Addresses 295 Boyuan Yan (editor) 296 Beijing Univ. of Posts and Telecom. 297 No. 10 Xitucheng Rd. 298 Beijing, Haidian Dist. 299 CN 301 Phone: +86 188 1052 8290 302 Email: yanboyuan@bupt.edu.cn 304 Zhuotong Li (editor) 305 Beijing Univ. of Posts and Telecom. 306 No. 10 Xitucheng Rd. 307 Beijing, Haidian Dist. 308 CN 310 Email: lizhuotong@bupt.edu.cn 312 Yongli Zhao (editor) 313 Beijing Univ. of Posts and Telecom. 314 No. 10 Xitucheng Rd. 315 Beijing, Haidian Dist. 316 CN 318 Email: yonglizhao@bupt.edu.cn