Question

Recently I study the API definition for Opendaylight.

As we know, YANG is a modeling language for NETCONF. However, Opendaylight uses it as a Java code generator for MD-SAL.

So I am wondering :

  1. How does YANG Tool help generate Java code for MD-SAL?

  2. Do you have some YANG code generator tutorials?

Thanks.

Était-ce utile?

La solution

How does YANG Tool help generate Java code for MD-SAL?

YANG defines the data definition model which is used by MD-SAL to model messages sent by client application. There are two types of API used by client applications. DOM and Binding Aware. Data models in both API types can be modeled by YANG.

Binding Aware APIs have a method for each leaf in the yang model, they are compiled against the YANG model and they have concrete data structure.

DOM APIs used in datastore ,they can implement general purpose models, runtime adaption of model is possible and they are not typesafe.

Autres conseils

Check out https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL.

There are loads of tutorials there, as well as a WebEx recording etc.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top