netmod-wg / yang-next

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

allow 'case' as a substatement to 'grouping' #86

Open kwatsen opened 5 years ago

kwatsen commented 5 years ago

Sometimes there is a need to augment the same case statement into multiple choice statements.

Ideally the case statement itself could also be defined in the grouping statement.

Currently, one must define the same case statement in each augment and then use a grouping to define the descendent nodes...

abierman commented 2 weeks ago

Do not support since this is a complex change to implement and there is a simple work-around.

kwatsen commented 19 minutes ago

But you agree with the use-case, so importance med?

The "simple" workaround, I suppose, is to copy/paste the case statement, which isn't DRY.

Maybe YANG could have a preprocessing language like C macros?