Difference between revisions of "C++ generator for YANG data"

(Created page with "==Checkout Pyang== * svn checkout http://pyang.googlecode.com/svn/trunk/ /tmp/pyang ==Using console== * export PYANG_PLUGINPATH=<location of management framework>/pyplugin *...")
 
m (Using console)
Line 8: Line 8:
 
* export YANG_MODPATH=/tmp/pyang/modules
 
* export YANG_MODPATH=/tmp/pyang/modules
  
   $pyang -f j2cpp simple.yang --y2cpp-output <output directory> --y2cpp-mgt <location of management framework>
+
   $pyang -f y2cpp simple.yang --y2cpp-output <output directory> --y2cpp-mgt <location of management framework>
  
 
==Using OpenClovis IDE==
 
==Using OpenClovis IDE==

Revision as of 04:25, 26 March 2013

Checkout Pyang

Using console

  • export PYANG_PLUGINPATH=<location of management framework>/pyplugin
  • export PYTHONPATH=$PYTHONPATH:/tmp/pyang
  • export YANG_MODPATH=/tmp/pyang/modules
 $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:
  1. Create a new yang data model anywhere locate at your project.
  2. 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".