[YANGTOOLS-406] Compilation error: duplicate name for grouping and enum in ietf-routing.yang Created: 30/Jan/15  Updated: 10/Apr/22  Resolved: 18/Jun/15

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

Type: Bug
Reporter: Minna Hu 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-1 Binding Specification: Grouping, data... Resolved
External issue ID: 2656

 Description   

Hi,

I tried to generate JAVA class from ietf-routing.yang (see http://www.netconfcentral.org/modules/ietf-routing), but the generated classes cannot compile, because grouping special-next-hop and enum special-next-hop have the same name, yang definition as follows. Could you solve the problem? Thanks!

grouping special-next-hop {
description
"This grouping provides the leaf for specifying special
next-hop options.";
leaf special-next-hop {
type enumeration {
enum "blackhole"

{ value 0; description "Silently discard the packet."; }

enum "unreachable"

{ value 1; description "Discard the packet and notify the sender with an error message indicating that the destination host is unreachable."; }

enum "prohibit"

{ value 2; description "Discard the packet and notify the sender with an error message indicating that the communication is administratively prohibited."; }

enum "receive"

{ value 3; description "The packet will be received by the local network device."; }

}
description
"Special next-hop options.";
}
} // grouping special-next-hop


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