Sweetcomb/NewModel

From fd.io
< Sweetcomb
Revision as of 17:33, 21 March 2019 by Ypiperea (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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