[YANGTOOLS-509] can't use key from element defined in inner grouping from list using outer grouping Created: 18/Sep/15  Updated: 10/Apr/22  Resolved: 26/Nov/15

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

Type: Bug
Reporter: Vishal Thapar 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


External issue ID: 4330

 Description   

If I have something like this:

grouping inner {
leaf myKey;
leaf fieldAbc;
}

grouping outer {
uses inner;
}

list myList {
key "myKey";
uses outer;
}

It fails with error on key "myKey". Problem encountered in: https://git.opendaylight.org/gerrit/#/c/24078/5/hwvtepsouthbound/hwvtepsouthbound-api/src/main/yang/hwvtep.yang Check code form Line 56-90 and then 137 to 151.

For now workaround would be to use both the groupings directly in code 137 to 151. Refer fix at: https://gist.github.com/vishnoianil/d5fd0a8967791ff2aa0c



 Comments   
Comment by Peter Kajsa [ 08/Oct/15 ]

Hi,

I tested the attached yang model and everything works ok.

Can you provide me more information please:

  • version of yangtools (helium, lithium or master)
  • error message
  • stack trace
  • other useful information

Thx.
Peter.

Comment by Tony Tkacik [ 08/Oct/15 ]

Hi Vishal,
could you please provide logs to further analyze type of error you are seeing?

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