-
Notifications
You must be signed in to change notification settings - Fork 317
Closed
Labels
is:bugBug description.Bug description.status:completedFrom the developer perspective, the issue was solved (bug fixed, question answered,...)From the developer perspective, the issue was solved (bug fixed, question answered,...)
Description
Use following YANG datamodel (file example.yang):
module example {
yang-version 1.1;
namespace "ex:ample";
prefix example;
import ietf-yang-structure-ext {
prefix sx;
}
grouping files {
container files {
list file {
key id;
leaf id {
type uint32;
}
}
}
}
sx:structure struct {
container c {
leaf b {
type uint32;
}
}
}
sx:augment-structure "/example:struct/c" {
//leaf a {type uint32;}
uses files;
}
}yanglint 3.7.8
yanglint example.yang
libyang err : Ext plugin "ly2 structure v1": Extension sx:augment-structure does not define any data-def-stmt statements. (/example:{extension='sx:augment-structure'}//example:struct/c)
According to https://datatracker.ietf.org/doc/html/rfc7950#section-14 , uses is part of the data-def-stmt (uses-stmt)
data-def-stmt = container-stmt /
leaf-stmt /
leaf-list-stmt /
list-stmt /
choice-stmt /
anydata-stmt /
anyxml-stmt /
uses-stmt
When you add artificial leaf like below, it works fine.
sx:augment-structure "/example:struct/c" {
leaf a {type uint32;}
uses files;
}
Metadata
Metadata
Assignees
Labels
is:bugBug description.Bug description.status:completedFrom the developer perspective, the issue was solved (bug fixed, question answered,...)From the developer perspective, the issue was solved (bug fixed, question answered,...)