Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 1.25 KB

File metadata and controls

40 lines (33 loc) · 1.25 KB

yang2cpp

Script to conver YANG models to C++ Class.

Requirements

What's alerady done

  • Module parsing
  • Container parsing
  • Single-key list parsing
  • Augment parsing
  • Leaf parsing

TODO List

Please refer to Issues

How to use

# ./yang2cpp.py --help
usage: yang2cpp.py [-h] [-o PREFIX] [-d DIR] [-p PATH1:PATH2] input

Convert a given YANG model in a C++ classes model.

positional arguments:
 input                 YANG file to be converted.

optional arguments:
 -h, --help            show this help message and exit
 -o PREFIX, --output PREFIX
                       Output prefix. Two files (a .h and a .cc) will be
                       created based on this prefix. The default is the YANG
                       module name.
 -d DIR, --output-directory DIR
                       Path to directory where the output files will be
                       placed in. The default is the current directory.
 -p PATH1:PATH2, --path PATH1:PATH2
                       path is a colon (:) separated list of directories to
                       search for import