CN110007924A - The automated construction method and system of YANG model configuration interface - Google Patents
The automated construction method and system of YANG model configuration interface Download PDFInfo
- Publication number
- CN110007924A CN110007924A CN201910252147.2A CN201910252147A CN110007924A CN 110007924 A CN110007924 A CN 110007924A CN 201910252147 A CN201910252147 A CN 201910252147A CN 110007924 A CN110007924 A CN 110007924A
- Authority
- CN
- China
- Prior art keywords
- node
- yaml
- yang
- model
- sdn controller
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses the automated construction methods and system of a kind of YANG model configuration interface, are related to SDN controller field.Method includes the following steps: SDN controller is according to the mapping ruler between preset YANG model and YAML format, it is the model description information of YAML format by YANG model conversion;Model description information inquiry request of the SDN controller response from control program, is sent to the control program for the model description information of the YAML format;The model description information that program parses YAML format according to default rule is controlled, it is automatic to construct YANG model configuration interface.When the present invention can be realized newly-increased YANG model, SDN controller and control program zero are developed.
Description
Technical field
The present invention relates to SDN controller fields, are specifically related to a kind of automation building side of YANG model configuration interface
Method and system.
Background technique
SDN (Software Defined Network, software defined network) is a kind of novel network architecture, is led to
It crosses network-based control plane and Forwarding plane separation, control function is extracted from network node, with programmable side
Formula controls network behavior, constructs dynamic, controllable network architecture.
SDN controller, that is, software defined network core control layer application program.It is shown in Figure 1, in SDN network,
Upwards, SDN controller docks peripheral control program with Freeware interface;Downwards, real to open hardware interface docking interchanger
Existing control plane function.In SDN controller, it is divided into northbound interface layer, core processing layer, southbound interface from top to bottom
Layer.SDN controller receives the request of control interchanger from control program, via the module that these each layers cooperate, will request
With certain agreement, such as: NETCONF is handed down to interchanger, after interchanger reports related configuration successful or failure news, then
Control program is returned to from bottom to up, and a control function is i.e. complete to be realized.
NETCONF agreement is divided into transport layer, RPC layers, operation layer and content layer, wherein content layer is uniquely without standard
The layer of change, then a kind of new modeling language YANG is produced, its target is built to NETCONF data model, operation
Mould covers the operation layer and content layer of NETCONF agreement.YANG model is defined by tree describes the layer of data model
The data type of grade nested structure and each attribute.
In the implementation of the present invention, at least there are the following problems in the prior art for inventor's discovery: due to YANG mould
Type configuration interface and api interface do not have the reasons such as versatility, development cycle long, API solidification, issue YANG using traditional approach
When model, for different YANG models, controls program and SDN controller needs to develop the YANG model configuration interface customized
And api interface.Once there is new YANG model to be added, controls program and SDN controller needs to develop again.
Summary of the invention
The purpose of the invention is to overcome the shortcomings of above-mentioned background technique, provide a kind of YANG model configuration interface from
Dynamicization construction method and system, when can be realized newly-increased YANG model, SDN controller and control program zero are developed.
In a first aspect, providing a kind of automated construction method of YANG model configuration interface, comprising the following steps:
SDN controller is according to the mapping ruler between preset YANG model and YAML format, by YANG model conversion
The model description information of YAML format;
Model description information inquiry request of the SDN controller response from control program, by the model of the YAML format
Description information is sent to the control program;
The model description information that program parses YAML format according to default rule is controlled, it is automatic to construct the configuration of YANG model
Interface;
Control program generates configuration information according to the data inputted on the YANG model configuration interface, is controlled by SDN
Device issues configuration information.
The embodiment of the present invention can automatically generate YANG model configuration interface, when increasing YANG model newly, SDN controller and control
Processing procedure sequence is without coding.
According in a first aspect, in the first possible implementation of the first aspect, SDN controller is according to preset
Mapping ruler between YANG model and YAML format, by YANG model conversion be YAML format model description information include:
Intension consistency based on YANG model node and YAML node, by the YANG model node pair with identical meanings
Etc. ground be converted to YAML node.
According to the first possible implementation of first aspect, in second of possible implementation of first aspect
In, it is the model description information of YAML format by YANG model conversion, includes the following steps:
The SDN controller reads YANG file, by the way of recursive traversal, identifies the keyword in YANG file;
The Object node in YAML file is converted by the container node in YANG file;
The array node list node in YANG file converted in YAML file;
The data type of leaf node in YANG file is parsed, and is converted into the corresponding data type of YAML file.
According in a first aspect, in a third possible implementation of the first aspect, the response of SDN controller is from control
The model description information of the YAML format is sent to the control program by the model description information inquiry request of program, packet
Include following steps:
Program is controlled in a manner of http request, sends asking for the model description information of inquiry YAML format to SDN controller
It asks;
The inquiry request of the northbound interface receiving control program of SDN controller, positions according to inquiry request and reads YAML
The data of http protocol format by the YAML Document encapsulation at the data of http protocol format, and are returned to control by file
Program.
According in a first aspect, in a fourth possible implementation of the first aspect, controlling program according to preset rule
The model description information of YAML format is then parsed, it is automatic to construct YANG model configuration interface, specifically includes the following steps:
Consistency of the program based on YAML node, control program Basic Elements of Graphic User Interface descriptive model is controlled, by YAML node
Control program graphical interfaces is converted on a 50-50 basis;
If it is Object node, the tree-shaped node of Program Generating is controlled, the tree-shaped node is deployable, the node type after expansion
Including Object node, array node, basic data type;
If it is array node, the tree-shaped node of Program Generating is controlled, the tree-shaped node is deployable, and supports additions and deletions sub- section
Point, all child nodes have same data structure, and child node is Object node or fundamental type data;
If it is leaf node, control the control that Program Generating has user's editting function, comprising: text box, radio box,
Combobox.
According in a first aspect, in the fifth possible implementation of the first aspect, controlling program according to the YANG
The data inputted on model configuration interface generate configuration information, issue configuration information by SDN controller, include the following steps;
The data inputted on YANG model configuration interface are verified;
By the configuration information by the data assembling of verification at YAML format, sent to the northbound interface of SDN controller
Http request issues configuration information by SDN controller.
According to the 5th of first aspect the kind of possible implementation, in the 6th kind of possible implementation of first aspect
In, configuration information is issued by SDN controller, comprising the following steps:
Control program sends the request for issuing configuration information to SDN controller;
The configuration information for controlling the YAML format that program is sent is converted XML format by SDN controller, passes through southbound interface
In the channel NETCONF, the configuration information of XML format is issued to corresponding equipment.
According in a first aspect, in a seventh possible implementation of the first aspect, the YANG model configuration interface
The hierarchical relationship of YANG data is shown with the tree of extensible nesting.
According to the 7th of first aspect the kind of possible implementation, in the 8th kind of possible implementation of first aspect
In, the node in the tree supports editting function.
Second aspect provides a kind of automation building system of YANG model configuration interface,
The system includes SDN controller and control program, wherein SDN controller includes:
YANG parsing module, is used for: according to the mapping ruler between preset YANG model and YAML format, by YANG mould
Type is converted to the model description information of YAML format;
Northbound interface is used for: the model description information inquiry request from control program is responded, by the YAML format
Model description information is sent to the control program;
Controlling program includes:
Interface constructs module, is used for: the model description information of YAML format is parsed according to default rule, it is automatic to construct
YANG model configuration interface;
Configuration information generation module, is used for: being generated according to the data inputted on the YANG model configuration interface with confidence
Breath, and configuration information is issued by SDN controller.
According to second aspect, in the first possible implementation of the second aspect, the YANG of the SDN controller is solved
Analysis module is used for:
Intension consistency based on YANG model node and YAML node, by the YANG model node pair with identical meanings
Etc. ground be converted to YAML node.
According to the first possible implementation of second aspect, in second of possible implementation of second aspect
In, the YANG parsing module of the SDN controller is specifically used for:
The YANG parsing module of the SDN controller reads YANG file, by the way of recursive traversal, identification YANG text
Keyword in part;
The Object node in YAML file is converted by the container node in YANG file;
The array node list node in YANG file converted in YAML file;
The data type of leaf node in YANG file is parsed, and is converted into the corresponding data type of YAML file.
According to second aspect, in the third possible implementation of the second aspect, control program includes enquiry module,
It is used for: in a manner of http request, the request of the model description information of inquiry YAML format is sent to SDN controller;
The northbound interface of SDN controller is used for: the request that the enquiry module of receiving control program is sent, according to the request
YAML file is positioned and reads, by the YAML Document encapsulation at the data of http protocol format, and by http protocol format
Data return to the enquiry module of control program.
According to second aspect, in the fourth possible implementation of the second aspect, the interface building mould of program is controlled
Block is specifically used for:
Consistency of the program based on YAML node, control program Basic Elements of Graphic User Interface descriptive model is controlled, by YAML node
Control program graphical interfaces is converted on a 50-50 basis;
If it is Object node, the tree-shaped node of Program Generating is controlled, the tree-shaped node is deployable, the node type after expansion
Including Object node, array node, basic data type;
If it is array node, the tree-shaped node of Program Generating is controlled, the tree-shaped node is deployable, and supports additions and deletions sub- section
Point, all child nodes have same data structure, and child node is Object node or fundamental type data;
If it is leaf node, control the control that Program Generating has user's editting function, comprising: text box, radio box,
Combobox.
According to second aspect, in a fifth possible implementation of the second aspect, the configuration information for controlling program is raw
Include: at module
Submodule is verified, is used for: the data inputted on YANG model configuration interface is verified;
Submodule is assembled, is used for: by the configuration information by the data assembling of verification at YAML format;
Configuration distributing submodule, is used for: sending http request to the northbound interface of SDN controller, calls SDN controller
Issue the configuration information of YAML format.
According to the 5th of second aspect the kind of possible implementation, in the 6th kind of possible implementation of second aspect
In, SDN controller further include:
YAML turns XML module, is used for: the configuration information for the YAML format that the configuration distributing submodule for controlling program is sent
It is converted into XML format;
Southbound interface is used for: by the channel NETCONF, the configuration information of XML format being issued to corresponding equipment.
According to second aspect, in the 7th kind of possible implementation of second aspect, the YANG model configuration interface
The hierarchical relationship of YANG data is shown with the tree of extensible nesting.
According to the 7th of second aspect the kind of possible implementation, in the 8th kind of possible implementation of second aspect
In, the node in the tree supports editting function.
Compared with prior art, advantages of the present invention is as follows:
SDN controller in the present invention compiles YANG model, generates the model description information of YAML format, is controlled based on SDN
The model description information that device processed provides automatically generates the configuration interface of control program, completely without coding.SDN controller provides
General northbound interface obtains model information for control program and issues configuration information.This mode has very big versatility,
When newly-increased YANG model, YANG configuration interface constructs automatically, API is few and has versatility, can be realized newly-increased YANG model
When, SDN controller and control program zero are developed.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of SDN network model;
Fig. 2 is the overall workflow figure in the embodiment of the present invention;
Fig. 3 is the flow chart that YANG is parsed in the embodiment of the present invention;
Fig. 4 is the flow chart of northbound interface interrogation model in the embodiment of the present invention;
Fig. 5 is the flow chart that program construction YANG configuration interface is controlled in the embodiment of the present invention;
Fig. 6 is the flow chart for controlling program in the embodiment of the present invention and issuing YANG configuration information;
Fig. 7 is the flow chart that northbound interface issues YANG configuration information in the embodiment of the present invention.
Specific embodiment
It reference will now be made in detail to specific embodiments of the present invention now, instantiate example of the invention in the accompanying drawings.Although will knot
The specific embodiment description present invention is closed, it will be understood that, it is not intended to limit the invention to the embodiment described.On the contrary, it is desirable to cover
Cover the change for including within the spirit and scope of the present invention, modification and the equivalent being defined by the following claims.It should be noted that this
In the method and step that describes can realize that and any functional block or function arrangement can quilts by any functional block or function arrangement
It is embodied as the combination of physical entity or logic entity or the two.
The embodiment of the present invention provides a kind of automated construction method of YANG model configuration interface, comprising the following steps:
SDN controller is according to the mapping ruler between preset YANG model and YAML format, by YANG model conversion
The model description information of YAML format, the model description information are YAML file;
Model description information inquiry request of the SDN controller response from control program, by the model of the YAML format
Description information is sent to the control program;
The model description information that program parses YAML format according to default rule is controlled, it is automatic to construct the configuration of YANG model
Interface;
Control program generates configuration information according to the data inputted on the YANG model configuration interface, is controlled by SDN
Device issues configuration information.
Preferably, SDN controller is according to the mapping ruler between preset YANG model and YAML format, by YANG model
The model description information for being converted to YAML format includes:
Intension consistency based on YANG model node and YAML node, by the YANG model node pair with identical meanings
Etc. ground be converted to YAML node.
Preferably, it is the model description information of YAML format by YANG model conversion, includes the following steps:
The SDN controller reads YANG file, by the way of recursive traversal, identifies the keyword in YANG file;
The Object node in YAML file is converted by the container node in YANG file;
The array node list node in YANG file converted in YAML file;
The data type of leaf node in YANG file is parsed, and is converted into the corresponding data type of YAML file.
Preferably, model description information inquiry request of the SDN controller response from control program, by the YAML format
Model description information be sent to the control program, comprising the following steps:
Program is controlled in a manner of http request, sends asking for the model description information of inquiry YAML format to SDN controller
It asks;
The inquiry request of the northbound interface receiving control program of SDN controller, positions according to inquiry request and reads YAML
The data of http protocol format by the YAML Document encapsulation at the data of http protocol format, and are returned to control by file
Program.
Preferably, control program parses the model description information of YAML format according to default rule, constructs YANG automatically
Model configuration interface, specifically includes the following steps:
Consistency of the program based on YAML node, control program Basic Elements of Graphic User Interface descriptive model is controlled, by YAML node
Control program graphical interfaces is converted on a 50-50 basis;
If it is Object node, the tree-shaped node of Program Generating is controlled, the tree-shaped node is deployable, the node type after expansion
Including Object node, array node, basic data type;
If it is array node, the tree-shaped node of Program Generating is controlled, the tree-shaped node is deployable, and supports additions and deletions sub- section
Point, all child nodes have same data structure, and child node is Object node or fundamental type data;
If it is leaf node, control the control that Program Generating has user's editting function, comprising: text box, radio box,
Combobox.
Preferably, control program generates configuration information according to the data inputted on the YANG model configuration interface, passes through
SDN controller issues configuration information, includes the following steps;
The data inputted on YANG model configuration interface are verified;
By the configuration information by the data assembling of verification at YAML format, sent to the northbound interface of SDN controller
Http request issues configuration information by SDN controller.
Preferably, configuration information is issued by SDN controller, comprising the following steps:
Control program sends the request for issuing configuration information to SDN controller;
The configuration information for controlling the YAML format that program is sent is converted XML format by SDN controller, passes through southbound interface
In the channel NETCONF, the configuration information of XML format is issued to corresponding equipment.
Preferably, the YANG model configuration interface shows the level of YANG data with the tree of extensible nesting
Relationship.
Preferably, the node in the tree supports editting function.
The embodiment of the present invention can automatically generate YANG model configuration interface, when increasing YANG model newly, SDN controller and control
Processing procedure sequence is without coding.
API is versatile, and SDN controller only needs to provide limited several API, has great versatility, supports institute
There is YANG model to issue.
The embodiment of the present invention also provides a kind of automation building system of YANG model configuration interface, which includes SDN
Controller and control program, wherein SDN controller includes:
YANG parsing module, is used for: according to the mapping ruler between preset YANG model and YAML format, by YANG mould
Type is converted to the model description information of YAML format;
Northbound interface is used for: the model description information inquiry request from control program is responded, by the YAML format
Model description information is sent to the control program;
Controlling program includes:
Interface constructs module, is used for: the model description information of YAML format is parsed according to default rule, it is automatic to construct
YANG model configuration interface;
Configuration information generation module, is used for: being generated according to the data inputted on the YANG model configuration interface with confidence
Breath, and configuration information is issued by SDN controller.
Preferably, the YANG parsing module of the SDN controller is used for:
Intension consistency based on YANG model node and YAML node, by the YANG model node pair with identical meanings
Etc. ground be converted to YAML node.
Preferably, the YANG parsing module of the SDN controller is specifically used for:
The YANG parsing module of the SDN controller reads YANG file, by the way of recursive traversal, identification YANG text
Keyword in part;
The Object node in YAML file is converted by the container node in YANG file;
The array node list node in YANG file converted in YAML file;
The data type of leaf node in YANG file is parsed, and is converted into the corresponding data type of YAML file.
Preferably, control program includes enquiry module, is used for: in a manner of http request, sending and inquires to SDN controller
The request of the model description information of YAML format;
The northbound interface of SDN controller is used for: the request that the enquiry module of receiving control program is sent, according to the request
YAML file is positioned and reads, by the YAML Document encapsulation at the data of http protocol format, and by http protocol format
Data return to the enquiry module of control program.
Preferably, the interface building module for controlling program is specifically used for:
Consistency of the program based on YAML node, control program Basic Elements of Graphic User Interface descriptive model is controlled, by YAML node
Control program graphical interfaces is converted on a 50-50 basis;
If it is Object node, the tree-shaped node of Program Generating is controlled, the tree-shaped node is deployable, the node type after expansion
Including Object node, array node, basic data type;
If it is array node, the tree-shaped node of Program Generating is controlled, the tree-shaped node is deployable, and supports additions and deletions sub- section
Point, all child nodes have same data structure, and child node is Object node or fundamental type data;
If it is leaf node, control the control that Program Generating has user's editting function, comprising: text box, radio box,
Combobox.
Preferably, the configuration information generation module for controlling program includes:
Submodule is verified, is used for: the data inputted on YANG model configuration interface is verified;
Submodule is assembled, is used for: by the configuration information by the data assembling of verification at YAML format;
Configuration distributing submodule, is used for: sending http request to the northbound interface of SDN controller, calls SDN controller
Issue the configuration information of YAML format.
Preferably, SDN controller further include:
YAML turns XML module, is used for: the configuration information for the YAML format that the configuration distributing submodule for controlling program is sent
It is converted into XML format;
Southbound interface is used for: by the channel NETCONF, the configuration information of XML format being issued to corresponding equipment.
Preferably, the YANG model configuration interface shows the level of YANG data with the tree of extensible nesting
Relationship.
Preferably, the node in the tree supports editting function.
In order to make those skilled in the art more fully understand the present invention, with reference to the accompanying drawings and detailed description to this hair
It is bright to be described in further detail.
Note: the example next to be introduced is only a specific example, and not as limiting embodiments of the invention
It is necessary for following specific step, numerical value, condition, data, sequence etc..Those skilled in the art can be by reading this explanation
Book constructs the more embodiments that do not mention in this specification to use design of the invention.
Shown in Figure 2, SDN controller includes northbound interface, YANG parsing module, YAML turns XML module, south orientation connects
Mouthful.
Northbound interface provides calling interface for control program, realizes that YANG pattern query, YANG model configuration information issue
Etc. functions.
YANG parsing module completes YANG file and reads, the correctness of verification YANG file dependence, parses YANG language
Method, the model for generating YAML format describe file.
Why YANG file will be parsed into YAML file, be because the data of YAML format are more friendly to user, more
It is easily processed, advantageously when carrying out data interaction, control program interface building.YAML format be it is a kind of intuitively can be by
The Data Serialization format that computer identifies is a readability height and is easy to be read by the mankind, easy to be interactive with scripting language,
For expressing the programming language of data sequences.It is analogous to the data description language of the subset X ML of standard generalized markup language,
Grammer ratio XML is simple very much.
After SDN controller receives the configuration information for the YAML format that control program is sent, YAML turns XML module for YAML lattice
The configuration information of formula switchs to XML format, and is issued in equipment by the channel NETCONF in southbound interface.
Controlling program is user application (APP), and gui interface is presented.In embodiments of the present invention, the master of program is controlled
Function is wanted to have:
1. calling northbound interface interrogation model description information;
2. the model description information of YAML format is parsed according to default rule, it is automatic to construct YANG model configuration interface,
The hierarchical relationship of YANG data is shown with tree, the node in tree supports editting function.
3. the data constraint rule defined according to YAML model, verifies the data of user's input, such as: effective model
Enclose, default value, character length, canonical matching etc..
Shown in Figure 3, the process flow of YANG parsing module is as follows:
SDN controller reads YANG file, verifies the correctness of YANG file machine dependence;Parse YANG file language
Method extracts model information;It is the model description information of YAML format by YANG model conversion.
The verification principle of YANG file and dependence is as follows:
1. file format is YANG type;
2. whether the file relied on exists;
3. whether correct fileversion number is, if consistent;
4. whether producing Circular dependency between file.
When YANG parsing module is by the model description information that YANG model conversion is YAML format, needs to formulate and reflect accordingly
Penetrate rule.
YANG model and the mapping ruler of the model description information of YAML format are as shown in table 1, the formulation of the mapping ruler
Principle is the mould of the intension consistency based on YANG model node and YAML node, i.e. YANG model node and YAML node description
Type object is meant that the same, and the YANG model node equity with identical meanings is converted to YAML node.
The mapping ruler of table 1, YANG model node and YAML node
Wherein, the Chinese of YANG node is explained as follows:
Container: container node;
List: list node;
Leaf: leaf node.
The Chinese of YAML node is explained as follows:
Object: Object node;
Array: array node;
Int8:8 integer nodes;
Int16:16 integer nodes;
Int32:32 integer nodes;
Int64:64 integer nodes;
Decimal64:64 decimal number nodes;
String: character string type node;
Enumeration: enumeration type node;
Bool: Boolean type node.
In YANG file, container, that is, container node, for summing up relevant node to a subtree
In subtree, container node only has child node, void value.Container may include any quantity, any kind of
Child node, including leaf node leaf, list node list, container node container.
List is list node, defines a series of list items.All list items are all mutually isostructural examples, this is
The important difference of list node and container node.One list node can include any amount, any type of sub- section
Point, including leaf node leaf, list node list, container node container.
Leaf is leaf node, contains the fundamental type data as integer or string.It has and only has
One certain types of value, and there is no child node.
In table 1 mapping ruler the specific implementation process is as follows:
YANG parsing module reads YANG file, by the way of recursive traversal, identifies the keyword in YANG file;
Container node is encountered, is the object node in YAML file by the Node;
List node is encountered, is the array node in YAML file by the Node;
Leaf node is encountered, the data type of the leaf node is further parsed.
YANG model onboard data type generally has: int8, int16, int32, int64, decimal64, string,
Enumeration, boolean, these data types be eventually mapped to int8, int16 in YAML file, int32,
int64、decimal64、string、bool、enumeration。
In addition, YANG is able to use " typedef " statement defines derived type from fundamental type.It is used in YANG
The customization type of " typedef " statement, is derived from fundamental type data due to being, so when switching to the type in YAML,
Mapping ruler is consistent with fundamental type data.YANG parsing module is based on above-mentioned mapping ruler, the model information that YANG is defined,
At the model description information of YAML format, the information such as data type, data constraint rule completely retain for complete escape, are not in
Semanteme missing.
The northbound interface of SDN controller be control routine access controller inlet module, mainly provide pattern query,
YANG model configuration information such as issues at the functions.
Shown in Figure 4, the process of the northbound interface interrogation model of SDN controller is as follows:
When the northbound interface of SDN controller receives the interrogation model request from control program, according to querying condition, positioning
To specific YAML file;
SDN controller reads YAML file content, is packaged into http protocol format;
The northbound interface of SDN controller returns data to control program.
Shown in Figure 5, control program parses the model description information of YAML format according to default rule, automatic to construct
The process of YANG configuration interface is as follows:
Program is controlled in a manner of http request, initiates interrogation model request to SDN controller, control program passes through calling
The northbound interface interrogation model description information of SDN controller;
Control program gets the model description information of SDN controller return being defined with YAML format;
Program is controlled according to default rule analytic modell analytical model description information, and constructs YANG model configuration interface automatically.
Since interface constructs automatically, completely without manual intervention and overlapping development, greatly save manpower and when
Between put into.
YANG model configuration interface shows the hierarchical relationship of YANG data with tree, and the node in tree is supported
Editting function completes the increasing of YANG model, deletes, changes, Cha Gongneng.
In addition, carrying data check rule in YAML model description information, these rules in a control program also can be by
Expressed intact needs to verify validity, the legitimacy of data when user is when inputting YANG configuration information.
The interface element for controlling program is generated based on YAML, it then follows GUI (the Graphical User in table 2
Interface, graphic user interface) create-rule.
Table 2, GUI create-rule
GUI create-rule in table 2 defines YANG model to the mapping ruler at interface, and the essence of the mapping ruler is base
In YANG model node, YAML node, control program Basic Elements of Graphic User Interface descriptive model ability to express on consistency, will have
There is the node of identical intension to carry out reciprocity conversion, YANG model is allow to translate into YAML, control program figure circle by lossless
Face.
The mapping ruler at YANG model to interface is the core rule that the embodiment of the present invention can be realized that interface constructs automatically,
It is the switching foundation that Model Abstractionization is embodied to graphic user interface.GUI create-rule of the program based on table 2 is controlled, is passed through
The back end for parsing YAML, generates corresponding GUI element, and what is be presented to the user is exactly the tree-shaped of the nesting that can be unfolded
Structure.
Control program interface generating process the following steps are included:
1. controlling the tree-shaped node of Program Generating if it is object node, which can be unfolded, can wrap after expansion
Node containing any type, such as: object, array, basic data type;
2. controlling the tree-shaped node of Program Generating, which can be unfolded, and support additions and deletions sub- section if it is array node
Point, all child nodes have same data structure, and child node can be object or fundamental type data;
3. if it is leaf node, i.e. fundamental type data cannot be further spread out, leaf node can be edited.
According to different fundamental type data, control Program Generating and have the control of user's editting function such as: text box, radio box, under
Draw frame etc.;
4. data check rule is not visual interface element, be included in said modules as hiding attribute, to
The data of family input are verified.
Shown in Figure 6, the process that control program issues YANG configuration information is as follows:
User needs to fill in configuration information in YANG configuration interface;
Data are verified, during filling in, and before issuing configuration, control program requires the conjunction to data
Method is verified, and verification rule of the verification rule in YANG file, this verification rule is in YANG model analyzing
Stage is by the lossless data check rule be converted in YAML file;
After data check is errorless, program is controlled by YANG configuration information and is assembled into YAML format, to the north of SDN controller
Http request is sent to interface, calls the YANG configuration information of SDN controller to issue interface, configuration information is issued.
Shown in Figure 7, the process that SDN controller issues YANG configuration information is as follows:
The northbound interface of SDN controller, which is received, issues YANG model request from control program;
The YAML of SDN controller turns XML module and converts equipment for the configuration information of the YAML format received can to identify
XML format;
The southbound interface of SDN controller calls the channel NETCONF, and the configuration information of XML format is issued to corresponding set
It is standby.
New YANG model only needs that SDN controller is added, and by parsing, control program can generate configuration interface, into
Row data distributing controls program and SDN controller almost without encoding amount, therefore can shorten the development cycle.
Based on the same inventive concept, it the embodiment of the present application also provides a kind of computer readable storage medium, stores thereon
There is computer program, all method and steps or Part Methods step of the above method are realized when computer program is executed by processor
Suddenly.
The present invention realizes all or part of the process in the above method, can also be instructed by computer program relevant
Hardware is completed, and computer program can be stored in a computer readable storage medium, which holds by processor
When row, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, computer program includes computer program code, computer
Program code can be source code form, object identification code form, executable file or certain intermediate forms etc..Computer-readable Jie
Matter may include: can carry computer program code any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk,
CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random
Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that computer-readable
The content that medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, such as at certain
A little jurisdictions do not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
Based on the same inventive concept, the embodiment of the present application also provides a kind of electronic equipment, including memory and processor, deposits
The computer program run on a processor is stored on reservoir, processor is realized in the above method when executing computer program
All method and steps or Part Methods step.
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng processor is the control centre of computer installation, utilizes each portion of various interfaces and the entire computer installation of connection
Point.
Memory can be used for storing computer program and/or module, and processor is stored in memory by operation or execution
Interior computer program and/or module, and the data being stored in memory are called, realize the various function of computer installation
Energy.Memory can mainly include storing program area and storage data area, wherein storing program area can storage program area, at least
Application program needed for one function (such as sound-playing function, image player function etc.);Storage data area can store basis
Mobile phone uses created data (such as audio data, video data etc.).In addition, memory may include that high speed is deposited at random
Access to memory can also include nonvolatile memory, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart
Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk
Memory device, flush memory device or other volatile solid-state parts.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system, server or calculating
Machine program product.Therefore, the present invention can be used complete hardware embodiment, complete software embodiment or combine software and hardware side
The form of the embodiment in face.Moreover, it wherein includes computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in computer-usable storage medium (including but not limited to magnetic disk storage and optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, equipment (system), server and computer program product
Flowchart and/or the block diagram describe.It should be understood that can be realized by computer program instructions in flowchart and/or the block diagram
The combination of process and/or box in each flow and/or block and flowchart and/or the block diagram.It can provide these calculating
Processing of the machine program instruction to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices
Device is to generate a machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute
For realizing the function of being specified in one or more flows of the flowchart and/or one or more blocks of the block diagram
Device.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (10)
1. a kind of automated construction method of YANG model configuration interface, which comprises the following steps:
YANG model conversion is YAML according to the mapping ruler between preset YANG model and YAML format by SDN controller
The model description information of format;
Pattern query request of the SDN controller response from control program, the model description information of the YAML format is sent
To the control program;
The model description information that program parses YAML format according to default rule is controlled, it is automatic to construct YANG model configuration circle
Face.
2. the method as described in claim 1, it is characterised in that:
YANG model conversion is YAML according to the mapping ruler between preset YANG model and YAML format by SDN controller
The model description information of format includes:
Intension consistency based on YANG model node and YAML node, on a 50-50 basis by the YANG model node with identical meanings
Be converted to YAML node.
3. method according to claim 2, it is characterised in that:
It is the model description information of YAML format by YANG model conversion, includes the following steps:
The SDN controller reads YANG file, by the way of recursive traversal, identifies the keyword in YANG file;
The Object node in YAML file is converted by the container node in YANG file;
The array node list node in YANG file converted in YAML file;
The data type of leaf node in YANG file is parsed, and is converted into the corresponding data type of YAML file.
4. the method as described in claim 1, it is characterised in that:
The model description information that program parses YAML format according to default rule is controlled, it is automatic to construct YANG model configuration circle
Face, specifically includes the following steps:
Consistency of the program based on YAML node, control program Basic Elements of Graphic User Interface descriptive model is controlled, by YAML node equity
Ground is converted to control program graphical interfaces;
If it is Object node, the tree-shaped node of Program Generating is controlled, the tree-shaped node is deployable, and the node type after expansion includes
Object node, array node, basic data type;
If it is array node, the tree-shaped node of Program Generating is controlled, the tree-shaped node is deployable, and supports additions and deletions child node, institute
There is child node to have same data structure, child node is Object node or fundamental type data;
If it is leaf node, the control that Program Generating has user's editting function is controlled, comprising: text box, radio box, drop-down
Frame.
5. the method as described in claim 1, it is characterised in that:
Control program generates configuration information according to the data inputted on the YANG model configuration interface, by under SDN controller
Configuration information is sent out, is included the following steps;
The data inputted on YANG model configuration interface are verified;
By the configuration information by the data assembling of verification at YAML format, http is sent to the northbound interface of SDN controller and is asked
It asks, configuration information is issued by SDN controller.
6. method as claimed in claim 5, it is characterised in that:
Configuration information is issued by SDN controller, comprising the following steps:
Control program sends the request for issuing configuration information to SDN controller;
The configuration information for controlling the YAML format that program is sent is converted XML format by SDN controller, by southbound interface
The configuration information of XML format is issued to corresponding equipment by the channel NETCONF.
7. a kind of automation of YANG model configuration interface constructs system, it is characterised in that:
The system includes SDN controller and control program, wherein SDN controller includes:
YANG parsing module, is used for: according to the mapping ruler between preset YANG model and YAML format, YANG model being turned
It is changed to the model description information of YAML format;
Northbound interface is used for: the model description information inquiry request from control program is responded, by the model of the YAML format
Description information is sent to the control program;
Controlling program includes:
Interface constructs module, is used for: the model description information of YAML format is parsed according to default rule, it is automatic to construct YANG mould
Type configuration interface.
8. system as claimed in claim 7, it is characterised in that:
The YANG parsing module of the SDN controller is used for:
Intension consistency based on YANG model node and YAML node, on a 50-50 basis by the YANG model node with identical meanings
Be converted to YAML node.
9. system as claimed in claim 7, it is characterised in that:
Controlling program includes enquiry module, is used for: in a manner of http request, sending inquiry YAML format to SDN controller
The request of model description information;
The northbound interface of SDN controller is used for: the request that the enquiry module of receiving control program is sent, and is positioned according to the request
And YAML file is read, by the YAML Document encapsulation at the data of http protocol format, and by the data of http protocol format
Return to the enquiry module of control program.
10. system as claimed in claim 9, it is characterised in that:
SDN controller further include:
YAML turns XML module, is used for: the configuration information for the YAML format that the configuration distributing submodule for controlling program is sent is converted
For XML format;
Southbound interface is used for: by the channel NETCONF, the configuration information of XML format being issued to corresponding equipment.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910252147.2A CN110007924A (en) | 2019-03-29 | 2019-03-29 | The automated construction method and system of YANG model configuration interface |
PCT/CN2019/096669 WO2020199423A1 (en) | 2019-03-29 | 2019-07-19 | Automated construction method and system for yang model configuration interface |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910252147.2A CN110007924A (en) | 2019-03-29 | 2019-03-29 | The automated construction method and system of YANG model configuration interface |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110007924A true CN110007924A (en) | 2019-07-12 |
Family
ID=67168966
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910252147.2A Withdrawn CN110007924A (en) | 2019-03-29 | 2019-03-29 | The automated construction method and system of YANG model configuration interface |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110007924A (en) |
WO (1) | WO2020199423A1 (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111124548A (en) * | 2019-12-31 | 2020-05-08 | 科大国创软件股份有限公司 | Rule analysis method and system based on YAML file |
CN111625226A (en) * | 2020-05-29 | 2020-09-04 | 北京无线电测量研究所 | Prototype-based human-computer interaction design implementation method and system |
WO2020199423A1 (en) * | 2019-03-29 | 2020-10-08 | 烽火通信科技股份有限公司 | Automated construction method and system for yang model configuration interface |
CN112069788A (en) * | 2020-09-10 | 2020-12-11 | 杭州安恒信息技术股份有限公司 | A yaml file parsing method, device, device and storage medium |
WO2021103801A1 (en) * | 2019-11-28 | 2021-06-03 | 华为技术有限公司 | Information processing method and related device |
CN113300888A (en) * | 2021-05-21 | 2021-08-24 | 刘超 | YANG model browser and client device |
CN114167805A (en) * | 2021-11-23 | 2022-03-11 | 长园运泰利视觉科技(珠海)有限公司 | A Programmable PLC Monitoring System |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9436443B2 (en) * | 2014-08-28 | 2016-09-06 | At&T Intellectual Property I, L.P. | Software defined network controller |
CN106789225A (en) * | 2016-12-13 | 2017-05-31 | 广州唯品会信息科技有限公司 | A kind of method and device of interface operation port mapping configuration |
CN107315768A (en) * | 2017-05-17 | 2017-11-03 | 上海交通大学 | The distribution information interacting method and system mapped based on Heterogeneous Information model |
CN108334387A (en) * | 2017-01-20 | 2018-07-27 | 阿里巴巴集团控股有限公司 | Dynamic interface rendering intent and device |
WO2018169294A1 (en) * | 2017-03-13 | 2018-09-20 | 성균관대학교 산학협력단 | I2nsf network security function-facing interface yang data model |
CN108920376A (en) * | 2018-07-13 | 2018-11-30 | 北京京东金融科技控股有限公司 | Test method, device and the medium of application program |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103281197B (en) * | 2013-04-08 | 2016-03-30 | 浙江工商大学 | A kind of ForCES collocation method based on NETCONF |
CN105446966B (en) * | 2014-05-30 | 2019-01-18 | 国际商业机器公司 | The method and apparatus that production Methods data are converted to the mapping ruler of RDF format data |
CN106559251B (en) * | 2015-09-30 | 2019-03-15 | 中兴通讯股份有限公司 | A kind of Compilation Method and corresponding interface, component and system based on YANG model |
CN109246161B (en) * | 2017-07-10 | 2021-08-17 | 中国电信股份有限公司 | Scheduling method and device of controller and computer readable storage medium |
CN108055143A (en) * | 2017-09-30 | 2018-05-18 | 广州西麦科技股份有限公司 | The collocation method and system of a kind of SDN-Hub |
CN110007924A (en) * | 2019-03-29 | 2019-07-12 | 烽火通信科技股份有限公司 | The automated construction method and system of YANG model configuration interface |
-
2019
- 2019-03-29 CN CN201910252147.2A patent/CN110007924A/en not_active Withdrawn
- 2019-07-19 WO PCT/CN2019/096669 patent/WO2020199423A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9436443B2 (en) * | 2014-08-28 | 2016-09-06 | At&T Intellectual Property I, L.P. | Software defined network controller |
CN106789225A (en) * | 2016-12-13 | 2017-05-31 | 广州唯品会信息科技有限公司 | A kind of method and device of interface operation port mapping configuration |
CN108334387A (en) * | 2017-01-20 | 2018-07-27 | 阿里巴巴集团控股有限公司 | Dynamic interface rendering intent and device |
WO2018169294A1 (en) * | 2017-03-13 | 2018-09-20 | 성균관대학교 산학협력단 | I2nsf network security function-facing interface yang data model |
CN107315768A (en) * | 2017-05-17 | 2017-11-03 | 上海交通大学 | The distribution information interacting method and system mapped based on Heterogeneous Information model |
CN108920376A (en) * | 2018-07-13 | 2018-11-30 | 北京京东金融科技控股有限公司 | Test method, device and the medium of application program |
Non-Patent Citations (2)
Title |
---|
AUTOMATION: "Configuring Cisco IOS XE With YANG-based YAML Files", 《HTTPS://NETWORKOP.CO.UK/BLOG/2017/03/13/YAML-YANG/》 * |
刘建琪: "基于YANG数据模型的SDN转发设备自动配置的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020199423A1 (en) * | 2019-03-29 | 2020-10-08 | 烽火通信科技股份有限公司 | Automated construction method and system for yang model configuration interface |
WO2021103801A1 (en) * | 2019-11-28 | 2021-06-03 | 华为技术有限公司 | Information processing method and related device |
CN111124548A (en) * | 2019-12-31 | 2020-05-08 | 科大国创软件股份有限公司 | Rule analysis method and system based on YAML file |
CN111124548B (en) * | 2019-12-31 | 2023-10-27 | 科大国创软件股份有限公司 | Rule analysis method and system based on YAML file |
CN111625226A (en) * | 2020-05-29 | 2020-09-04 | 北京无线电测量研究所 | Prototype-based human-computer interaction design implementation method and system |
CN112069788A (en) * | 2020-09-10 | 2020-12-11 | 杭州安恒信息技术股份有限公司 | A yaml file parsing method, device, device and storage medium |
CN113300888A (en) * | 2021-05-21 | 2021-08-24 | 刘超 | YANG model browser and client device |
CN114167805A (en) * | 2021-11-23 | 2022-03-11 | 长园运泰利视觉科技(珠海)有限公司 | A Programmable PLC Monitoring System |
Also Published As
Publication number | Publication date |
---|---|
WO2020199423A1 (en) | 2020-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110007924A (en) | The automated construction method and system of YANG model configuration interface | |
CN106528129B (en) | A kind of Web application interface generation system and method | |
CN114625353B (en) | Model framework code generation system and method | |
CN107273117B (en) | Programming-friendly agile code automatic generation system | |
CN102663103B (en) | Configurable method for automatically generating database and accessing data | |
US7836119B2 (en) | Distributed execution model for cross-organizational declarative web applications | |
US8839192B2 (en) | System and method for presentation of cross organizational applications | |
US8229976B2 (en) | Data binding for XML schemas | |
CN103701772B (en) | Method for constructing digital media content resource cloud system | |
CN100478883C (en) | Plug-in component, system and method for providing unionize interface for multicell application | |
CN103123646B (en) | Conversion method and device for automatically converting XML documents into OWL documents | |
KR101519381B1 (en) | Apparatus and method for making web application using html5 | |
CN105488052B (en) | Structural data is switched to the method and system of format formfile | |
CN107391815B (en) | A kind of quickly configuration method towards extensive smart grid communication simulation platform | |
CN114253546A (en) | Code generation method and device, storage medium and electronic device | |
CN112230929B (en) | A data analysis method, device and storage medium for CIM model | |
US10706225B2 (en) | Form management system and method | |
CN112306622B (en) | Construction method and device of VNF template | |
CN101303663A (en) | Simulation test method for digital set-top box software development | |
CN104077414B (en) | A kind of decoding apparatus and its coding/decoding method applied to LTE network signal | |
Mezei et al. | The dynamic sensor data description and data format conversion language. | |
CN116991406A (en) | Method, device and storage medium for generating user interface UI design manuscript | |
CN114020358B (en) | Interface rendering method and device based on iOS application | |
CN111626444B (en) | Model maintenance dynamic self-adaption method, device and system based on regulation and control cloud and storage medium | |
Böhms et al. | IntUBE energy information integration platform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190712 |