Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

OVSDB client code automatic generation method, system and device and medium

An automatic generation and client-side technology, applied in the transmission system, code compilation, program code conversion, etc., can solve the problems of frequent addition and modification of database entry fields, error-prone, troublesome use, etc., to increase code readability and readability Maintainability and difficulty reduction effects

Active Publication Date: 2021-01-15
PURPLE MOUNTAIN LAB
View PDF3 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] 1. There are a large number of hard-coded and highly repetitive operations in the database, which are cumbersome and error-prone;
[0007] 2. In the business development stage, the database entry fields are frequently added and modified, and the code that needs to be modified may not be discovered in time, leaving BUG;
[0008] 3. The ovsdb-client operation command line needs to construct the database operation by itself, which is cumbersome to use and cannot realize the rapid generation of test data

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
  • OVSDB client code automatic generation method, system and device and medium
  • OVSDB client code automatic generation method, system and device and medium
  • OVSDB client code automatic generation method, system and device and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] The present invention will be further described below in conjunction with the accompanying drawings.

[0046]The invention discloses a method for automatically generating OVSDB client codes, which uses the Go Json parsing package to deserialize the OVSDB Schema file, extracts detailed information such as key databases, database entries, and entry fields, classifies the OVSDB database, and uses pre-written template code file to generate all codes, the code generation process is as follows figure 1 shown, including the following steps:

[0047] Step S1, Schema file legality check

[0048] First, obtain the OVSDB Schema file to be parsed. The Schema file is a collection of database objects, which defines the table item structure, attributes and the relationship between each table item in the database according to business requirements. The content includes the database name, database version number, The name of the table item and the information of each table item. The i...

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 an OVSDB client code automatic generation method, system and device and a medium. The method comprises the steps: acquiring a to-be-analyzed Schema file and performing validitycheck; defining an analyzed data format, and analyzing the content in the valid Schema file into the data format; generating a database Go language code based on the analyzed data, comprising: generating a public code in combination with a template code file; generating a code of each table item in combination with the template code file; and formatting the generated code. According to the method, all codes are generated by using a pre-written template code file, a user is prevented from directly constructing database operation codes by generating the table entries of the OVSDB to achieve addition, deletion, modification and query, and unstructured character string mapping is avoided by using structured table entry data, so that the difficulty of integrating the OVSDB in a Go language project is reduced, and the code readability and maintainability are improved.

Description

technical field [0001] The invention belongs to the field of SDN (software-defined network) and databases, in particular to a method, system, equipment and medium for automatically generating OVSDB client code. Background technique [0002] The protocols in the SDN network can be divided into management plane protocols and control plane protocols according to their functions. With the SDN controller as the boundary, according to the level of the programmable interface, it can be divided into southbound interface and northbound interface. Strictly speaking, the OpenFlow protocol is a southbound interface protocol at the control level, while the OVSDB management protocol is a southbound interface protocol at the management level. [0003] The OVSDB management protocol (Open vSwitch Database Management Protocol, Open Virtual Switch Database Management Protocol) was originally proposed by VMware, which is responsible for managing the open virtual switch database (OpenvSwitch Da...

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
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/06G06F8/41G06F8/34
CPCH04L69/22G06F8/34G06F8/44
Inventor 余兆国沈洋
Owner PURPLE MOUNTAIN LAB
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products