...
This page documents the existing Yang Parser used in ONAP and OpenDayLight and will investigate if they can be used for the C&PS.
Resources
- https://docs.opendaylight.org/en/latest/developer-guide/yang-tools.html*
- https://git.opendaylight.org/gerrit/admin/repos/yangtools
- https://gerrit.onap.org/r/admin/repos/ccsdk/sli/plugins
- https://javadoc.io/doc/org.opendaylight.yangtools
*Although this documentation link is to the latest ODL doc revision, it is very outdated and the code examples need significant updates, see findings in Mini-PoC below (bug reported: https://jira.opendaylight.org/browse/DOCS-126)
Overview
The Yang parser used in ONAP (CCSDK / SDNC) was developed (and still is) a OpenDayLight Library.
There are 2 different usage patterns within CCSDK, though.
Most of CCSDK/SDNC is using Yang primarily to define their northbound interfaces. In that context, there’s a maven plugin (org.opendaylight.yangtools:yang-maven-plugin) that is used to generate source code from the Yang model. Our application code in that case doesn’t really do anything directly with the Yang, since all of the that is handled for us by the generated code.
...
Overview
The Yang parser used in ONAP (CCSDK / SDNC) was developed (and still is) a OpenDayLight Library.
There are 2 different usage patterns within CCSDK, though.
Most of CCSDK/SDNC is using Yang primarily to define their northbound interfaces. In that context, there’s a maven plugin (org.opendaylight.yangtools:yang-maven-plugin) that is used to generate source code from the Yang model. Our application code in that case doesn’t really do anything directly with the Yang, since all of the that is handled for us by the generated code.
In ccsdk/sli/plugins, there is a plugin called restconf-client which was contributed by Huawei. That code uses the yangtool parser more directly so that it can interpret the results being returned when it calls a restconf interface.
Resources
- https://docs.opendaylight.org/en/latest/developer-guide/yang-tools.html*
- https://git.opendaylight.org/gerrit/admin/repos/yangtools
- https://gerrit.onap.org/r/admin/repos/ccsdk/sli/plugins
- https://javadoc.io/doc/org.opendaylight.yangtools
*Although this documentation link is to the latest ODL doc revision, it is very outdated and the code examples need significant updates, see findings in Mini-PoC below (bug reported: https://jira.opendaylight.org/browse/DOCS-126)
Mini-PoC
To help this evaluation I will create a small sample project with the goal to pare a yang file using the ODL Yang Tools. I will report my findings here
...