netmod-wg / yang-next

Feature requests for future versions of YANG
6 stars 0 forks source link

add "uses" as a sub-statement to "augment" #85

Closed kwatsen closed 1 month ago

kwatsen commented 5 years ago

I have a uses statement that augments several nodes in exactly the same way. To be clear:

uses foo {
  augment "a" {
    <same>
  }
   augment "b" {
    <same>
  }
  augment "c" {
    <same>
  }
}

Already <same> can be factored out into a grouping, and hence augment can be just a single uses statement, but that grouping is visible to the whole module.

It is understood that "private groupings" (issue #60) would limit scope, but it isn't ideal (e.g., readability).

kwatsen commented 1 month ago

Never mind, this is already in YANG 1.1.