Method and system for realizing mapping from YANG model to internal model

A technology of internal model and mapping relationship, applied in the field of communication, can solve problems such as high cost of mapping development work, complex functions, complex models, etc., and achieve the effect of reducing the workload of mapping development and maintenance

Active Publication Date: 2019-06-28
FENGHUO COMM SCI & TECH CO LTD
View PDF2 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the network operating system running on the network equipment has complex functions, and more exists as a platform software. It supports various network equipment, including datacom routers/switches, PTN equipme...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for realizing mapping from YANG model to internal model
  • Method and system for realizing mapping from YANG model to internal model
  • Method and system for realizing mapping from YANG model to internal model

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0059] See Figure 4 As shown, the embodiment of the present invention provides a method for realizing the mapping of a YANG model to an internal model, including the following steps:

[0060] S10: Use the extended private mapping statement in the YANG model text file to support the mapping from the YANG model to the internal model (internal model) during the development phase;

[0061] S20, when the internal model engine is started, the internal model is loaded, and internal model classes and internal model elements are established in the memory;

[0062] S30, when Netconf is started, load the YANG model, and build the YANG model tree in the memory; analyze the private mapping information to establish the mapping relationship between the YANG model and internal model classes and internal model elements;

[0063] The method provided by the embodiment of the present invention further includes the following steps:

[0064] S40: After Netconf receives the YANG configuration of the network ...

Embodiment 2

[0067] On the basis of Embodiment 1, S10 specifically includes the following steps:

[0068] Step S101, use the extension statement in the YANG model to define the extended private mapping statement fosv4-ext-map; an example is as follows:

[0069]

[0070] Step S102, use the extended private mapping statement in the YANG list or container to map a list or container to an internal model class; an example is as follows:

[0071] list instance{

[0072] fosv4-ext-map "ISIS";

[0073] }

[0074] Step S103, the leaf node under the YANG list or container uses an extended private mapping statement to map a leaf node under the list or container to an internal model element. Examples are as follows:

[0075] leaf instance-name{

[0076] fosv4-ext-map "ISIS:instance_id";

[0077] }

[0078] The following is the content of the ISIS model after using extension. Note: To simplify the description, there are a lot of cuts:

[0079]

[0080]

[0081]

Embodiment 3

[0083] On the basis of Embodiment 1, S30 specifically includes the following steps:

[0084] Step S301, load the YANG model when Netconf is started, and construct the YANG model tree;

[0085] Step S302: Parse the extended private mapping statement mapped to the internal model class under the list or container, search for the corresponding internal model class according to the internal model class name, and store the found internal model class in the list or container in the YANG model tree;

[0086] Step S303, parse the extended private mapping statement mapped to the internal model element under the leaf node, first search for the corresponding internal model class according to the internal model class name, then find the corresponding internal model element according to the internal model element name, and store the found internal model element Under the leaf node in the YANG model tree;

[0087] Step S304: Iterate the YANG model tree so that each child internal model class inherit...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and a system for realizing mapping from a YANG model to an internal model, relates to the technical field of communication, and aims to support mapping from the YANG model to the internal model by using an extended private mapping statement in the YANG model in a development stage. The method comprises: loading an internal model, and establishing an internal modelclass and internal model elements in a memory; loading the YANG model, and establishing a YANG model tree in the memory; analyzing the private mapping information to establish a mapping relation between the YANG model and the internal model class and between the YANG model and the internal model elements. By adopting the method and the device, when the Netconf receives the YANG configuration, theYANG configuration is analyzed to obtain a YANG instance tree, nodes of the YANG instance tree are mapped into instances of an internal model class, and a temporary internal model mapping object aftermapping is constructed; and then the temporary internal model mapping object is sent to an internal model engine, so that automatic mapping from the YANG model to the internal model can be realized.

Description

Technical field [0001] The present invention relates to the field of communication technology, in particular to a method and system for realizing the mapping from a YANG model to an internal model. Background technique [0002] The Network Configuration Protocol (Netconf, Network Configuration Protocol) is a standard protocol for installing, operating, and deleting network device configurations. YANG was born with NETCONF. YANG is a Data Modeling Language, which is used to describe the data model of NETCONF-related network configuration and network status. YANG itself is not a data model, but a language that defines the data model. The model built using the YANG language is referred to as the YANG model. The goal of NETCONF and YANG is to realize the automation of network configuration in a programmable way, thereby simplifying and accelerating the deployment of network equipment and services, and saving costs for network operators and enterprise users. [0003] See figure 1 As s...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): H04L12/24G06F8/30
Inventor 马红斌
Owner FENGHUO COMM SCI & TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products