Skip to content

failed to sx:augment-structure directly under sx:structure #2338

@mrdotchenke

Description

@mrdotchenke

Version: libyang 3.7.8

There are two modules, the module a defined sx:structure called "struct"

module a {
  yang-version 1.1;
  namespace urn:tests:extensions:structure:a;
  prefix a;
  import ietf-yang-structure-ext {
    prefix sx;
  }
  sx:structure struct {
    container n1 {
      leaf l {
        type uint32;
      }
    }
  }
}

And the module b defined sx:augment-structure to directly augment an leaf under the "/a:struct"

module b {
  yang-version 1.1;
  namespace urn:tests:extensions:structure:b;
  prefix b;
  import ietf-yang-structure-ext {
    prefix sx;
  }
  import a {
    prefix a;
  }
  sx:augment-structure "/a:struct" {
    leaf aug-leaf {
      type string;
    }
  }
}

When call lys_parse_mem with module b, after module a was successful loaded, would got an error:

libyang[0]: Augment extension target node "/a:struct" from module "b" was not found. (schemadata path: /b:{extension='sx:augment-structure'}/{augment='/a:struct'})

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:questionIssue is actually a question.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions