Skip to content

yanglint can't find absolute path leafref target when defined within sx:augment-structure #2375

Open
@ksallberg

Description

@ksallberg

Reproducible with: yanglint 3.7.8

This YANG should be valid AFAICT but yanglint can't find the leafref's target:

module example {
  yang-version 1.1;
  namespace "ex:ample";
  prefix example;

  import ietf-yang-structure-ext {
    prefix sx;
  }

  container files {
    list file {
      key id;

      leaf id {
        type uint32;
      }
    }
  }

  sx:structure struct {
    container c {
    }
  }

  sx:augment-structure "/example:struct/c" {
    leaf id {
      type leafref {
        path "/example:files/example:file/example:id";
      }
    }
  }
}

yanglint example.yang
libyang err : Not found node "files" in path. (/example:c/id)

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:bugBug description.status:invalidIssue is not reproducible or the behavior is intended.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions