Subject: [netmod] Augmentation to Groupings

From: Xufeng Liu <[email-masked]>
Date: Tue, 19 Dec 2017 11:45:06 -0500

During the discussions of TE tunnel and topology models, we have found that
it is desirable to have the capability of augmenting a grouping.

In our case, there are multiple technology specific models augmenting a
base generic model. In the base model, some groupings are used multiple
times, and each augmentation model needs to add more schema nodes to the
grouping structure. For now, we have to specify an “augment” statement for
each location where the grouping is used. Such an “augment” statement is
repeated many times. It would be convenient and cleaner if we could augment
the grouping.

We’d like to hear opinions on the feasibility of such a capability.

Thanks,

- Xufeng

---

From: Jeff Tantsura <[email-masked]>
Date: Tue, 19 Dec 2017 10:07:15 -0800

+1
Very much needed capability 

Regards,
Jeff

> On Dec 19, 2017, at 08:45, Xufeng Liu <[email-masked]> wrote:
> 
> During the discussions of TE tunnel and topology models, we have found that it is desirable to have the capability of augmenting a grouping.
> 
> In our case, there are multiple technology specific models augmenting a base generic model. In the base model, some groupings are used multiple times, and each augmentation model needs to add more schema nodes to the grouping structure. For now, we have to specify an “augment” statement for each location where the grouping is used. Such an “augment” statement is repeated many times. It would be convenient and cleaner if we could augment the grouping.
> 
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

---

From: Alexander Clemm <[email-masked]>
Date: Tue, 19 Dec 2017 18:10:50 +0000

+1

I would like to see such a capability as well.  As mentioned, specifically when groupings are used in multiple places, augmentation becomes really unwieldy without an option to simply augment the grouping instead.  It also gets harder to read; to some degree it negates the benefits from ntroducing groupings in the first place.

--- Alex

From: netmod [mailto:[email-masked]] On Behalf Of Xufeng Liu
Sent: Tuesday, December 19, 2017 8:45 AM
To: NETMOD WG <[email-masked]>
Subject: [netmod] Augmentation to Groupings

Thanks,

- Xufeng

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 19 Dec 2017 20:15:28 +0100

The current approach may be verbose but it protects users of groupings
from unwanted and uncontrolled side effects. Augmenting a grouping as
suggested affects _all_ uses of a grouping; this can be tricky in
situations where groupings are widely used.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: Alexander Clemm <[email-masked]>
Date: Tue, 19 Dec 2017 19:51:05 +0000

IMHO it would be worth a try.  If you wanted to only augment _some_ uses of a grouping, you could still do the same as today.  Also, I would expect augmentations to only affect servers that support the module defining the augmentation.  If verbosity were not an issue, why were groupings introduced in the first place?
--- Alex

> -----Original Message-----
> From: netmod [mailto:[email-masked]] On Behalf Of Juergen
> Schoenwaelder
> Sent: Tuesday, December 19, 2017 11:15 AM
> To: Xufeng Liu <[email-masked]>
> Cc: NETMOD WG <[email-masked]>
> Subject: Re: [netmod] Augmentation to Groupings
> 
> The current approach may be verbose but it protects users of groupings from
> unwanted and uncontrolled side effects. Augmenting a grouping as
> suggested affects _all_ uses of a grouping; this can be tricky in situations
> where groupings are widely used.
> 
> /js
> 
> > During the discussions of TE tunnel and topology models, we have found
> > that it is desirable to have the capability of augmenting a grouping.
> >
> > In our case, there are multiple technology specific models augmenting
> > a base generic model. In the base model, some groupings are used
> > multiple times, and each augmentation model needs to add more schema
> > nodes to the grouping structure. For now, we have to specify an
> > “augment” statement for each location where the grouping is used. Such
> > an “augment” statement is repeated many times. It would be convenient
> > and cleaner if we could augment the grouping.
> >

---

From: Andy Bierman <[email-masked]>
Date: Tue, 19 Dec 2017 12:00:30 -0800

Hi,

I do not want YANG to have augment for groupings because there is
no way to control all possible uses-stmts and make sure the augmentation
is only used where intended.  This seems no different than OO code.
A new class name is required for the derived class. In YANG a new grouping
is required and specific uses-stmts have to be updated to use the new
grouping.

Andy

On Tue, Dec 19, 2017 at 11:51 AM, Alexander Clemm <
[email-masked]> wrote:

> IMHO it would be worth a try.  If you wanted to only augment _some_ uses
> of a grouping, you could still do the same as today.  Also, I would expect
> augmentations to only affect servers that support the module defining the
> augmentation.  If verbosity were not an issue, why were groupings
> introduced in the first place?
> --- Alex
>
> from

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 19 Dec 2017 21:16:47 +0100

The question is not why we have groupings, the question is why
augmentations are restricted to schema node identifiers. I provided an
answer for the later, namely explicit control of augmentation effects.

It is of course OK to disagree with the design. I am just trying to
explain that this was an explicit design decision when YANG was
designed.

/js

---

From: "Xufeng Liu" <[email-masked]>
Date: Wed, 20 Dec 2017 09:41:13 -0500

The restrictions and scopes might be defined, hopefully. It would also be ok to add new name.

Thanks,

- Xufeng

From: Andy Bierman [mailto:[email-masked]] 
Sent: Tuesday, December 19, 2017 3:01 PM
To: Alexander Clemm <[email-masked]>
Cc: Juergen Schoenwaelder <[email-masked]>; Xufeng Liu <[email-masked]>; NETMOD WG <[email-masked]>
Subject: Re: [netmod] Augmentation to Groupings

Hi,

is required and specific uses-stmts have to be updated to use the new grouping.

Andy

On Tue, Dec 19, 2017 at 11:51 AM, Alexander Clemm <[email-masked] <mailto:[email-masked]> > wrote:

> From: netmod [mailto:[email-masked] <mailto:[email-masked]> ] On Behalf Of Juergen
> Schoenwaelder
> To: Xufeng Liu <[email-masked] <mailto:[email-masked]> >
> Cc: NETMOD WG <[email-masked] <mailto:[email-masked]> >
> > [email-masked] <mailto:[email-masked]> 
> [email-masked] <mailto:[email-masked]> 
_______________________________________________
netmod mailing list
[email-masked] <mailto:[email-masked]> 
https://www.ietf.org/mailman/listinfo/netmod

---

From: Robert Wilton <[email-masked]>
Date: Fri, 22 Dec 2017 14:33:15 +0000

Some YANG models make very heavy usage of groupings, and in many cases 
where I have seen them used extensively that makes the YANG model far 
less readable.  So one solution here may be to use less groupings. :-)

I agree with the point that others have made that allowing a grouping to 
be augmented globally is probably not a good idea because it could end 
up modifying arbitrary YANG modules.

A couple of other potential solutions could be:

1) Consider a mechanism where a single augment statement can augment 
multiple paths in the schema tree (i.e. reducing repetition of the added 
data nodes, but still keeping the explicitness).
2) Allowing augmentation to a grouping, but have that augmentation only 
apply to "uses" statement within the same YANG module file. This 
approach would seem to have some corner cases that would need to be 
carefully considered (e.g. sub-modules, or if a grouping uses another 
grouping).  It might also be hard to instinctively know or describe 
where the grouping would apply.

Perhaps this issue should be listed on the YANG.next issue tracker, to 
be considered in a future revision of YANG?

Thanks,
Rob

On 19/12/2017 20:16, Juergen Schoenwaelder wrote:
>>> To: Xufeng Liu<[email-masked]>
>>> Cc: NETMOD WG<[email-masked]>
>>> Fax:   +49 421 200 3103<http://www.jacobs-university.de/>
>>>