You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
choice a-or-b {
case a {
list interface {
key "name";
leaf name {
type string;
}
}
}
}
leaf mgmt-interface {
type leafref {
path "../interface/name";
}
}
I want the leaf "mgmt-interface" to reference the leaf "name". If I use the path "../interface/name", I run into the failure:
ERROR Generating GoStruct Code: unable to resolve leafref field: could not resolve leafref path...
Should the schemaTree contain choice/case statements? If yes, should I update my leafref path to: "../a-or-b/a/interface/name" or should ygot be ignoring case/choice branches while walking the schema tree looking for leafs?
The text was updated successfully, but these errors were encountered:
I have the following YANG:
choice a-or-b {
case a {
list interface {
key "name";
leaf name {
type string;
}
}
}
}
leaf mgmt-interface {
type leafref {
path "../interface/name";
}
}
I want the leaf "mgmt-interface" to reference the leaf "name". If I use the path "../interface/name", I run into the failure:
ERROR Generating GoStruct Code: unable to resolve leafref field: could not resolve leafref path...
This occurs because the schemaTree at: https://github.com/openconfig/ygot/blob/master/ygen/schematree.go#L83 contains the choice and case identifiers: "a-or-b", "a" as branches. It works if I change my leafref path to: "../a-or-b/a/interface/name".
Should the schemaTree contain choice/case statements? If yes, should I update my leafref path to: "../a-or-b/a/interface/name" or should ygot be ignoring case/choice branches while walking the schema tree looking for leafs?
The text was updated successfully, but these errors were encountered: