Details
-
Bug
-
Status: Resolved
-
Resolution: Cannot Reproduce
-
None
-
None
-
None
-
None
-
Operating System: Windows
Platform: PC
-
1454
Description
When this construction:
leaf sub-type {
type identityref
}
is placed into 'module', 'container', 'grouping', 'augment' node,
yangtools generate incorrect hierarchy between abstract classes.
Example:
Here is hierarchy described placed in yang file:
identity action-base
{ description "Base identity for action types"; }identity experimenter
{ description ""; base action-base; } leaf sub-type {
type identityref
}
Therefore correct inheritance relationship should be: 'Experimenter extends ActionBase'.
But generated code is as follows: 'Experimenter extends BaseIdentity'
(Generated abstract class (Experimenter.java) looses it's parent class (ActionBase.java))
If you comment this part of yang file:
"leaf sub-type {
type identityref
}"
, suddenly generation of inheritance works properly.
Yang file is attached in attachment.