[YANGTOOLS-968] Add support for RFC7950 Errata 5617 leafrefs Created: 18/Mar/19 Updated: 10/Apr/22 Resolved: 24/Dec/19 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.4, 3.0.8 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
Observed in
leaf flavor {
type leafref {
path "deref(../../../ext-cpd/int-virtual-link-desc)/../desc-flavor/id";
}
}
we end up splitting the path, but not account for the call correctly, leading to: java.lang.IllegalArgumentException: Parameter 'localName':'int-virtual-link-desc)' contains illegal character ')' at org.opendaylight.yangtools.yang.common.QName.checkLocalName (QName.java:101) at org.opendaylight.yangtools.yang.common.QName.create (QName.java:139) at org.opendaylight.yangtools.yang.common.QName.create (QName.java:165) at org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.stringPathPartToQName (SchemaContextUtil.java:596) at org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.lambda$resolveRelativeXPath$2 (SchemaContextUtil.java:674) at com.google.common.collect.Iterators$6.transform (Iterators.java:785) at com.google.common.collect.TransformedIterator.next (TransformedIterator.java:47) at com.google.common.collect.Iterators$ConcatenatedIterator.next (Iterators.java:1363) at com.google.common.collect.Iterables$6$1.next (Iterables.java:882) at com.google.common.collect.Iterables$6$1.next (Iterables.java:882) at com.google.common.collect.Iterables$6$1.next (Iterables.java:882) at org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findNodeIn (SchemaContextUtil.java:397) at org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findNodeIn (SchemaContextUtil.java:408) at org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findNodeIn (SchemaContextUtil.java:408) at org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findNodeInModule (SchemaContextUtil.java:362) at org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findNodeInSchemaContext (SchemaContextUtil.java:267) at org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findDataSchemaNodeForRelativeXPath (SchemaContextUtil.java:226) at org.opendaylight.mdsal.binding.yang.types.AbstractTypeProvider.provideTypeForLeafref (AbstractTypeProvider.java:521) at org.opendaylight.mdsal.binding.yang.types.AbstractTypeProvider.javaTypeForLeafrefOrIdentityRef (AbstractTypeProvider.java:300) at org.opendaylight.mdsal.binding.yang.types.AbstractTypeProvider.javaTypeForSchemaDefinitionType (AbstractTypeProvider.java:194) |
| Comments |
| Comment by Robert Varga [ 19/Mar/19 ] |
|
The deref() call is invalid in this context, as per RFC7950's definition of 'path-arg'. |
| Comment by Robert Varga [ 25/Mar/19 ] |
|
This actually is reported as an Errata here: https://www.rfc-editor.org/errata/eid5617 , but the mailing list traffic seems to be on track to reject the proposal. |
| Comment by Robert Varga [ 22/Dec/19 ] |
|
... which leads to interop problems, as Tail-F's NSO is using this extension. Also the errata is held for document update, so it's sure to be included in 7950bis. |