Checkout Pyang
Using console
- export PYANG_PLUGINPATH=<location of management framework>/pyplugin
- export PYTHONPATH=$PYTHONPATH:/tmp/pyang
- export YANG_MODPATH=/tmp/pyang/modules:<your include YANG data>
$/tmp/pyang/bin/pyang -f y2cpp simple.yang --y2cpp-output <output directory> --y2cpp-mgt <location of management framework>
Using OpenClovis IDE
- Select location of Management Framework (calling client lib for mgt object)
- Window >> Show View >> Yang Explorer View, click at pull down menu and select "Select Management Framework Location" action.
- Defined YANG data model file:
- Create a new yang data model anywhere locate at your project.
- Import YANG data model from Window >> Show View >> Yang Explorer View, click at pull down menu and select "Import YANG file" action.
- C++ codegen class objects:
- Open Yang Explorer View: Window >> Show View >> Yang Explorer View. Right click on yang data model from this list viewer (support multi-select items) and select "Generator CPP".