Difference between revisions of "Sweetcomb/NewModel"

From fd.io
Jump to: navigation, search
(Created page with "== Implementing a new YANG model in Sweetcomb == === Adding YANG model file to sweetcomb === Download the YANG model file to appropriate sweetcomb location under plugin subd...")
 
m (Implementing a new YANG model in Sweetcomb)
Line 1: Line 1:
== Implementing a new YANG model in Sweetcomb ==
+
= Implementing a new YANG model in Sweetcomb =
  
=== Adding YANG model file to sweetcomb ===
+
== Adding YANG model file to sweetcomb ==
  
 
Download the YANG model file to appropriate sweetcomb location under plugin subdirectory.
 
Download the YANG model file to appropriate sweetcomb location under plugin subdirectory.
 
Your Yang model must be named <model>@<revision>.yang
 
Your Yang model must be named <model>@<revision>.yang
  
=== Developp scvpp helper functions ===
+
== Developp scvpp helper functions ==
  
 
All interaction with VAPI must be made in scvpp source code.
 
All interaction with VAPI must be made in scvpp source code.
Line 14: Line 14:
 
* VAPI_CALL
 
* VAPI_CALL
  
=== Developp and add callbacks ===
+
== Developp and add callbacks ==
  
 
A yang model can be represented as a tree and its elements accessed using XPATH syntax.
 
A yang model can be represented as a tree and its elements accessed using XPATH syntax.

Revision as of 17:33, 21 March 2019

Implementing a new YANG model in Sweetcomb

Adding YANG model file to sweetcomb

Download the YANG model file to appropriate sweetcomb location under plugin subdirectory. Your Yang model must be named <model>@<revision>.yang

Developp scvpp helper functions

All interaction with VAPI must be made in scvpp source code. Please, leverage as much as possible existing maccros such as:

  • VAPI_RETVAL_CB
  • VAPI_COPY_CB
  • VAPI_CALL

Developp and add callbacks

A yang model can be represented as a tree and its elements accessed using XPATH syntax. You need to know which XPATH you want to support in your YANG model.

//TODO: xpath_t structure, new file, register_model