[MDSAL-208] Duplicate field PmfGrp.Pmf._25Gps Created: 18/Nov/16  Updated: 09/Mar/18  Resolved: 09/Mar/18

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

Type: Bug
Reporter: zhuweisheng 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-309 V1 codegen generates enum constants t... Resolved
is duplicated by YANGTOOLS-718 Duplicate field PmfGrp.Pmf._25Gps Resolved
External issue ID: 7199

 Comments   
Comment by Martin Ciglan [ 18/Nov/16 ]

zhuweisheng 2016-11-18 05:35:03 UTC

I get a Error when trying to parse a yang file like below:
grouping pmf-grp {
leaf pmf {
type enumeration {
enum 2.5Gps

{ description "pmf optional"; }

enum 25Gps

{ description "pmf mandatory"; }

enum 100Gps

{ description "undo pmf"; }

}
default 100Gps;
}
}
the error is:
Duplicate field PmfGrp.Pmf._25Gps
Is this a bug in yangtools?

Comment by Martin Ciglan [ 18/Nov/16 ]

moving to MDSAL project, this is binding spec v1 issue

not sure if this is going to be fixed there, leaving bug unconfirmed for time being

Comment by Robert Varga [ 30/Jan/18 ]

The issue comes from mapping enumeration names, where the period in '2.5Gps' gets removed, leading to a conflict with '25Gps'. A bit more exploration in the mapping logic is needed to see if we can fix this without breaking everyone else.

Comment by Robert Varga [ 09/Mar/18 ]

Dealing with duplicates should be the purview of the alternative mapping scheme discussed in MDSAL-309.

Comment by Robert Varga [ 09/Mar/18 ]

This is a subset of issues solved in MDSAL-309.

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