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
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.
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 (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.
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.
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.
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.
The following terminologies are defined in this document:
This section divides all statements of YANG 1.0 into several kinds of categories.
This document is Supported by BUPT Excellent Ph.D. Students Foundation (CX2019314).
This memo includes no request to IANA.
All drafts are required to have a security considerations section. See RFC 3552 for a guide.
[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. |
[RFC3552] | Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003. |
This becomes an Appendix.