[YANGTOOLS-480] Yangtools fails to decode leafref in choice statement Created: 24/Jul/15  Updated: 10/Apr/22  Due: 13/Aug/15  Resolved: 29/Sep/15

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Wojciech Dec Assignee: Peter Kajsa
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks YANGTOOLS-481 Failed to find codec for yang leafs Resolved
Duplicate
is duplicated by YANGTOOLS-481 Failed to find codec for yang leafs Resolved
External issue ID: 4051

 Description   

When processing a read from an instance of the following model:

typedef bridge-domain-ref {
type leafref

{ path "/vpp/bridge-domains/bridge-domain/name"; }

}

container l2 {

choice interconnection {
case xconnect-based {
leaf xconnect-outgoing-interface

{ type if:interface-ref; }

}
case bridge-based {
leaf bridge-domain

{ type bridge-domain-ref; }

leaf split-horizon-group

{ type uint8; }

leaf bridged-virtual-interface

{ type boolean; }

}
}
Yangtools fails to decode properly the bridge-domain name leaf node giving the following error:

2015-07-23 20:39:51,383 | ERROR | pool-51-thread-1 | XmlStreamUtils | 71 - org.opendaylight.yangtools.yang-data-impl - 0.6.3.Helium-SR1 | Failed to find codec for type (urn:ietf:params:xml:ns:yang:1)leafref [xpath=/vpp/bridge-domains/bridge-domain/name], falling back to using stream

Data processing still succeeds because the data is actually a string, however it may fail in other cases.



 Comments   
Comment by Robert Varga [ 08/Sep/15 ]

Is this reproducible with Lithium-SR1?

Comment by Peter Kajsa [ 24/Sep/15 ]

fix for stable/helium: https://git.opendaylight.org/gerrit/#/c/27394/

On master branch it has been already fixed.

Generated at Wed Feb 07 20:53:22 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.