Can i do augment for gropung?

Hello! I have a grouping and i have to extend it when i need. Like a:

grouping grouping_name {
leaf a1;
leaf a2;
leaf a3;
}

augment “module:grouping_name”{
when “condition_name”;
leaf a4;
leaf a5;
}

list list_name {
key “name”;
leaf name;
uses grouping_name
}

Does it work?
Thank you.

The RFC https://tools.ietf.org/html/rfc7950#page-119 mentions

The target node MUST be either a container, list, choice, case, input, output, or notification node.

So it is not possible to augment grouping.

1 Like

Right, it isn’t possible to have the name of a grouping as the argument to augment - but you can have augment as a substatement to uses, augmenting the grouping in the place(s) where it is used. However since then too the argument to augment must be one of the nodes you mention, and that node must be defined in the grouping, it isn’t actually possible to add “toplevel” nodes to the grouping this way, as @irusya930 is attempting to do.