Internet Engineering Task Force B. Yan, Ed.
Internet-Draft Z. Li, Ed.
Intended status: Standards Track Y. Zhao, Ed.
Expires: November 16, 2020 Beijing Univ. of Posts and Telecom.
May 15, 2020

YANG Model Conversion
draft-yby-yang-model-conversion-00

Abstract

This document introduces the grammer extensions and relavant rules for YANG 1.0 to complete the mapping between two similar YANG modules that describe the same entity.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on November 16, 2020.

Copyright Notice

Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

YANG 1.0 and YANG 1.1 are proposed originally as a domain-specific language to define the network model for NETCONF protocol. Based on YANG language, some organizations define their own public network models, and many companies (the equipment manufacturer, the telecom operators, the Internet companies, etc.) define their private models. Therefore, a network entity (device, etc.) MAY be described as different YANG data trees by different organizations and companies. In some cases, the data is required to be converted among different YANG models. This document proposes some extensions, named Yang Model Conversion (YMC), for YANG 1.0 to define the mapping rules of the nodes under the schema tree. By using YMC, the conversion rules MUST be clear, and the information deviation of conversion SHOULD be evaluated properly.

2. Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

3. Overview

YMC is consisted of a set of new statements based on YANG language. These statements are designed to represent the mapping relationships of one-to-one, one-to-many, and one-to-none for different schema nodes under different XPath. The statements that includes leaf, leaf-list, list, etc. MAY be mapped to other statements with some limitations. For the nested usage of statements, the mapping statements SHOULD be also nested. When there is a big gap between two YANG models, the mapping deviation MAY be introduced and result in failures in networks. YMC proposes a method to evaluate the information loss while mapping. Thus, the performance SHOULD be predicted, and some potential risks SHOULD be avoided in advance.

4. Terminology

The following terminologies are defined in this document:

5. Mapping Relationships

5.1. One-to-one Mapping

5.2. One-to-many Mapping

5.3. One-to-none Mapping

6. Grammer Extension for YANG

6.1. The mapto Statement

6.2. The statements Statement

6.2.1. The statements's Substatements

6.2.2. The source Substatement

6.2.3. The destination Substatement

6.2.4. Usage example

6.3. The maptype Statement

6.3.1. The value of oto

6.3.2. The value of otm

6.3.3. The value of otn

6.3.4. Usage example

6.4. The deviation Statement

6.4.1. Usage example

7. Mapping for statements

This section divides all statements of YANG 1.0 into several kinds of categories.

7.1. Mapping of module Statement

7.2. Mapping of submodule Statement

7.3. Mapping of typedef Statement

7.4. Mapping of type Statement

7.5. Mapping of container Statement

7.6. Mapping of leaf Statement

7.7. Mapping of leaf-list Statement

7.8. Mapping of list Statement

7.9. Mapping of choice Statement

7.10. Mapping of anyxml Statement

7.11. Mapping of grouping Statement

7.12. Mapping of uses Statement

7.13. Mapping of rpc Statement

7.14. Mapping of notification Statement

7.15. Mapping of augment Statement

7.16. Mapping of identity Statement

7.17. Mapping of extension Statement

7.18. Mapping of conformance-related Statements

7.19. Mapping of common Statements

8. Synchronization among Multiple Model's Datastores

9. Mapping Deviation Evaluation

10. Acknowledgements

This document is Supported by BUPT Excellent Ph.D. Students Foundation (CX2019314).

11. IANA Considerations

This memo includes no request to IANA.

12. Security Considerations

All drafts are required to have a security considerations section. See RFC 3552 for a guide.

13. References

13.1. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010.
[RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J. and A. Bierman, "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011.
[RFC7950] Bjorklund, M., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016.

13.2. Informative References

[RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003.

Appendix A. Additional Stuff

This becomes an Appendix.

Authors' Addresses

Boyuan Yan (editor) Beijing Univ. of Posts and Telecom. No. 10 Xitucheng Rd. Beijing, Haidian Dist. CN Phone: +86 188 1052 8290 EMail: yanboyuan@bupt.edu.cn
Zhuotong Li (editor) Beijing Univ. of Posts and Telecom. No. 10 Xitucheng Rd. Beijing, Haidian Dist. CN EMail: lizhuotong@bupt.edu.cn
Yongli Zhao (editor) Beijing Univ. of Posts and Telecom. No. 10 Xitucheng Rd. Beijing, Haidian Dist. CN EMail: yonglizhao@bupt.edu.cn