# contrail-generateDS
**Repository Path**: liudongyang/contrail-generateDS
## Basic Information
- **Project Name**: contrail-generateDS
- **Description**: contrail-generateDS
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2023-01-10
- **Last Updated**: 2024-06-10
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
contrail-generateDS
===================
Contrail XML schema code generator
The contrail XSD generator reads .xsd files containing IF-MAP identities, links and properties
and generates python, c++ and java code used by different modules of the Contrail Virtual Network Controller.
The IDL syntax is the following:
#IFMAP-SEMANTICS-IDL list-of-statements
list-of-statements := list-of-statements, statement
statement := Link('element', 'identifier', 'identifier', [ref-type-list])|
Type('element', [type-list])|
Property(element-name identifier-name)|
Exclude('element', [generator-list])
element := metadata element name
identifier := identifier element name | "any" | "all"
ref-type-list:= ref-type-list 'has' |
:= ref-type-list 'ref' |
:=
ref-type-list:= ref-type-list 'string-enum' |
:=
string-enum := This command will convert string type restriction to
enum type
generator-list:= generator-list 'backend'|
:= generator-list 'frontend'|
:=
example:
```
```
The XSD snippet above defines two IFMAP identifiers (virtual-machine and virtual-machine-interface) and the associated
metadata (link between virtual-machine and its interface) as well as properties that can be associated with the identifiers.
The implementation is using generateDS as an XSD parser and to help it create an intermediate model; this intermediate model
is implemented by type_model.py and ifmap_model.py; different backends then generate code for different software modules.