[YANGTOOLS-1080] Add yang-version 1.1 example for maven plugin to doc Created: 13/Feb/20 Updated: 16/Feb/20 |
|
| Status: | Confirmed |
| Project: | yangtools |
| Component/s: | maven plugin |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Chris Lott | Assignee: | Chris Lott |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I could not find a single example YANG module in https://docs.opendaylight.org or on https://wiki.opendaylight.org/view/YANG_Tools that is marked with "yang-version 1.1;" Please add a new example to show how that works and the configuration operations (if any) that are required for generating Java code from a 1.1 module using the maven plugin. |
| Comments |
| Comment by Chris Lott [ 14/Feb/20 ] |
|
rovarga thanks for nudging me towards the current versions. I'll be glad to contribute a new example on a new wiki page if someone will please just provide a compatible set of the plugin, binding and code generator versions. The wiki page link above is 3+ years out of date, specifies version 0.6.1-SNAPSHOT for all three. Today I'm using yang-maven-plugin version 4.0.1 and maven-sal-api-gen-plugin version 3.0.9. Now I'm stuck on a baffling exception: [ERROR] Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:4.0.1:generate-sources (default) on project o1-netconf-client: Execution default of goal org.opendaylight.yangtools:yang-maven-plugin:4.0.1:generate-sources failed: An API incompatibility was encountered while executing org.opendaylight.yangtools:yang-maven-plugin:4.0.1:generate-sources: java.lang.NoSuchMethodError: org.opendaylight.yangtools.yang.model.util.SchemaNodeUtils.getAllTypeDefinitions(Lorg/opendaylight/yangtools/yang/model/api/DataNodeContainer;)Ljava/util/Collection; |
| Comment by Chris Lott [ 14/Feb/20 ] |
|
I created a new page, please review https://wiki.opendaylight.org/view/YANG_Tools:Java_Binding_Yang_Version_1.1_Demo If you would rather have this content in https://docs.opendaylight.org then let me know and I could probably change that wiki text into RST & submit to your gerrit. |
| Comment by Robert Varga [ 14/Feb/20 ] |
|
Well, we just do not have the resources to keep the wiki updated – authoritative information lives at docs these days. The error you are seeing comes from misaligned versions, project versions really have to match https://docs.opendaylight.org/projects/integration-distribution/en/latest/platform-versions.html . The best approach to get things going is to follow https://docs.opendaylight.org/en/stable-neon/developer-guide/developing-apps-on-the-opendaylight-controller.html#building-an-example-module . |
| Comment by Robert Varga [ 14/Feb/20 ] |
|
Thanks for the offer, yes, docs is very much preferred. Probably could use a section in the developer guide, perhaps as an alternative to the archetype-driven approach. |
| Comment by Chris Lott [ 16/Feb/20 ] |
|
The wiki page I created at https://wiki.opendaylight.org/view/YANG_Tools:Java_Binding_Yang_Version_1.1_Demo seems to have vanished. When I try to visit that link my browser is redirected to page https://wiki.lfnetworking.org/display/ODL//view/YANG_Tools:Java_Binding_Yang_Version_1.1_Demo which does not exist. What's going on? If I can recover that page content I will create an RST version, but I sure I don't feel like starting over from scratch
|