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:
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

On Tue, Dec 19, 2017 at 07:51:05PM +0000, Alexander Clemm 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

-----Original Message-----
From: netmod [mailto:[email protected]] On Behalf Of Juergen
Schoenwaelder
Sent: Tuesday, December 19, 2017 11:15 AM
To: Xufeng Liu<[email protected]>
Cc: NETMOD WG<[email protected]>
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

On Tue, Dec 19, 2017 at 11:45:06AM -0500, Xufeng Liu 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.

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

Thanks,

- Xufeng
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod
--
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/>

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to