[MDSAL-168] Augmenting a choice without a case results in no getter/setter Created: 13/May/16 Updated: 09/Mar/18 Resolved: 25/Jul/16 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Lori Jakab | Assignee: | Filip Gregor |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 5884 |
| Description |
|
See also We have the following augments in a model (https://git.opendaylight.org/gerrit/gitweb?p=lispflowmapping.git;a=blob;f=mappingservice/lisp-proto/src/main/yang/odl-lisp-address-types.yang;h=2637ebc222fb6b58eb907b2fd6f346ca1a7e3c37;hb=HEAD): grouping augmented-lisp-address { type bin:ipv4-address-binary; type bin:ipv6-address-binary; The "address" that is augmented is a choice, that doesn't have 'case' statements. The yangtools generated Ipv {4,6}Binary and objects don't have any getter method to access the leaf value, and the Ipv{4,6}BinaryBuilder object can't set or get the leaf either. Looking at the comment at the top of the auto-generated Java classes, and comparing it to the non-augmented counterparts reveals that the latter seem to add a 'case' statement to the YANG snippet, even if the original model doesn't have it. Manually adding a 'case' to the above augment solves the problem, and getters/setters become available. |
| Comments |
| Comment by Filip Gregor [ 14/Jun/16 ] |
|
Proposed fix: https://git.opendaylight.org/gerrit/#/c/40158/ |
| Comment by Robert Varga [ 07/Jul/16 ] |
|
Needs manual cherry-pick to Beryllium |