[MDSAL-188] Can't resolve leafref when its path isn't part of the grouping declaring it Created: 15/Jul/16  Updated: 03/May/18  Resolved: 21/Jul/16

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

Type: Bug
Reporter: Alexis de Talhouët Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Duplicate
duplicates MDSAL-182 Java binding v1: leafref up two conta... Resolved
External issue ID: 6194

 Description   

I’m having trouble with a leafref definition:
if I’m using relative path ../../../../../component/config/name
yangtool fails with the following error: https://gist.github.com/adetalhouet/3fa35df94f530a24a936d9a3165bd36e
if I’m using plain path, so /components/component/config/name
yangtool succeed.

This is the yang model https://github.com/openconfig/public/blob/master/release/models/platform/openconfig-platform.yang



 Comments   
Comment by Alexis de Talhouët [ 15/Jul/16 ]

From Peter Kajsa:

"MD-SAL (according to the current binding specification) generates java classes also for groupings and so when MD-SAL tries to generate java class for „platform-subcomponent-ref-config“ grouping, it evaluates the leafref relative path in context of this grouping and therefore no node is found.

grouping platform-subcomponent-ref-config {
description
"Configuration data for subcomponent references";

leaf name {
type leafref

{ path "../../../../../component/config/name"; }

description
"Reference to the name of the subcomponent";
}
}"

Comment by Martin Ciglan [ 20/Jul/16 ]

Hi Alexis

can you please have a look at
https://bugs.opendaylight.org/show_bug.cgi?id=6141 and confirm possible duplicate?

I can't reach github link you have provided so I am not sure about error stacktrace. Thank you.

Martin

Comment by Alexis de Talhouët [ 20/Jul/16 ]

Hello Martin,

My bad I deleted that gist, but you're correct, this bug is a duplicate of BUG-6141.

I see Boron-RC0 as target, will it be on schedule?

Thanks,
Alexis

Comment by Martin Ciglan [ 21/Jul/16 ]

Hi Alexis

Thanks for check. At the moment, target is next available one, but bug is not assigned to anybody yet. I will let you know.

Martin

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