Skip to content

ResolveLeafrefTarget Not returning correct vlaue in case of List inside choice where list's key is a leafref #981

@Sneh-Prabha

Description

@Sneh-Prabha

I used ygot/generator/generator.go to generate the gostruct file using yang files as input.
I have a scenario where following heirarchy of elements causing the error.

/container/choice/case/container/list/leaf (leaf is of leafref type)

I have debugged and found that in api ResolveLeafrefTarget in ygot/yangschema/yangschema.go file
fixedPath, err := fixSchemaTreePath(path, contextEntry) --> here value is fixedPath doesnt has choice and case name which is ended in error of "could not resolve leafref path"

Let me know if this kind of scenario is supported in ygot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions