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

m (Using console)
(Using console)
 
Line 6: Line 6:
 
* export PYANG_PLUGINPATH=<location of management framework>/pyplugin
 
* export PYANG_PLUGINPATH=<location of management framework>/pyplugin
 
* export PYTHONPATH=$PYTHONPATH:/tmp/pyang
 
* export PYTHONPATH=$PYTHONPATH:/tmp/pyang
* export YANG_MODPATH=/tmp/pyang/modules
+
* export YANG_MODPATH=/tmp/pyang/modules:<your include YANG data>
  
   $pyang -f y2cpp simple.yang --y2cpp-output <output directory> --y2cpp-mgt <location of management framework>
+
   $/tmp/pyang/bin/pyang -f y2cpp simple.yang --y2cpp-output <output directory> --y2cpp-mgt <location of management framework>
  
 
==Using OpenClovis IDE==
 
==Using OpenClovis IDE==

Latest revision as of 07:30, 27 March 2013

[edit] Checkout Pyang

[edit] 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>

[edit] 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".