[MDSAL-253] BindingToNormalizedNodeCodec fails to deserialize union of leafrefs Created: 15/May/17 Updated: 01/Mar/18 Resolved: 01/Mar/18 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | Binding codegen, Binding V2 codegen |
| Affects Version/s: | None |
| Fix Version/s: | Fluorine |
| Type: | Bug | ||
| Reporter: | Marek Gradzki | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| External issue ID: | 8449 | ||||||||||||||||
| Priority: | Normal | ||||||||||||||||
| Description |
|
Here is model example: typedef name1-ref { } typedef name2-ref { } container top { leaf name2 { type string; } } container cont { mandatory true; Deserializing: "cont": { "ref": "some-name" }Gives following exception: [...] Caused by: java.lang.NoSuchMethodException: org.opendaylight.yang.gen.v1.urn.test.rev170101.Cont$Ref.getName1Ref() Full trace included. |
| Comments |
| Comment by Marek Gradzki [ 15/May/17 ] |
|
Attachment honeycomb.log.txt has been added with description: honeycomb log |
| Comment by Jakub Toth [ 22/May/17 ] |
|
Hi, can you try this patch, please ? https://git.opendaylight.org/gerrit/#/c/57619/ Let me know about results, please. Thanks |
| Comment by Marek Gradzki [ 23/May/17 ] |
|
It works for the example I attached. But the underlying issue we had was with following model: https://gerrit.fd.io/r/#/c/6658/2/v3po/api/src/main/yang/unnumbered-interfaces.yang@26 And this is still failing, but with different exception: [...] Caused by: java.lang.NoSuchMethodException: org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.unnumbered.interfaces.rev170510.unnumbered.config.attributes.Unnumbered$Use.getUint32UseValue() |
| Comment by Jakub Toth [ 23/May/17 ] |
|
(In reply to Marek Gradzki from comment #3) OK, fixed. I missed to do conversion of YANG type to Java type. |
| Comment by Marek Gradzki [ 23/May/17 ] |
|
Thanks. Retested and it works now. |
| Comment by Martin Ciglan [ 12/Jun/17 ] |
|
at some point, this needs cherry-pick to Carbon for binding spec v1. Back to CONFIRMED |
| Comment by Jakub Toth [ 21/Jul/17 ] |
| Comment by Jakub Toth [ 24/Jul/17 ] |
| Comment by Robert Varga [ 30/Jan/18 ] |
|
Binding V2 is not fixed, the patch needs to be ported. |
| Comment by Jie Han [ 07/Feb/18 ] |
|
Binding v2: https://git.opendaylight.org/gerrit/67990 |