[YANGTOOLS-1312] Refining leaf-list with "default" Created: 19/Aug/21 Updated: 20/Oct/21 Resolved: 19/Aug/21 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.8, 7.0.5 |
| Type: | Bug | Priority: | High |
| Reporter: | Balagangadhar Bathula | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I have modeled my yang structure with a grouping, which has a leaf-list. When this grouping is used, I have refined the leaf-list to set a default value. However the yangtools gives an error "can not perform refine of 'DEFAULT' for the target 'LEAF_LIST'. " Pyang works fine with no error/warning. I have looked at the RFC https://datatracker.ietf.org/doc/html/rfc7950#section-7.13.2 and it seems supported. Can you please help with this.
grouping abcded {
container xyz {
description "blah";
leaf zyx { type boolean; description "blah blah..."; }
leaf pqr { type string; description "yada yada..."; }
leaf rst { type boolean; description "more blah..."; }
leaf-list abc { type abc-type; description "more yada..."; }
}
}
uses somewhere:abcded {
refine "xyz/abcd" { default "all"; }
}
typedef abc-type {
description "Used to indicate the types";
type enumeration {
enum one { description "first type"; value 1; }
enum two { description "second type"; value 2; }
enum three { description "third type"; value 3; }
enum four { description "fourth type; value 4; }
enum all { description "Reuse all possible options"; value 99; }
}
}
|
| Comments |
| Comment by Balagangadhar Bathula [ 19/Aug/21 ] |
|
Hi Robert, what would the MD-SAL version that will use 6.0.8 yangtools? Currently when I use MD-SAL 7.0.8 it still uses 6.0.7 yangtool plugin. Is there a way to explicitly specify yangtools 6.0.8 in the pom? Sorry I'm novice to the maven. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> |
| Comment by Robert Varga [ 19/Aug/21 ] |
|
yang-maven-plugin wiring is done here: https://github.com/opendaylight/mdsal/blob/v7.0.8/binding/binding-parent/pom.xml#L59-L61 and you are inheriting it via the <parent/> clausule. I am not sure how you'd go about overriding it, sorry as for yangtools-6.0.8, it should be release in a couple of weeks and then it's going to hop on whatever next mdsal release is next in that train ... mdsal-7.0.10 I guess. |
| Comment by Balagangadhar Bathula [ 19/Aug/21 ] |
|
Thanks rovarga Is there is any link to see next release dates for md-sal? I tried looking, but couldn't find any. Our YANG models are supposed to be released by end of sept 21. If we could get a this fix before that, it would be great. Again many thanks for all the help! |
| Comment by Robert Varga [ 20/Oct/21 ] |
|
yangtools-6.0.8 is out there, as is mdsal-7.0.10. Sorry about the delay. |