Re: [netmod] submodules the hidden benefits

2020-08-05 Thread Mahesh Jethanandani
A contrarian view:

I find the use of sub-modules helpful when I want to use separate files to 
maintain part of the module that is logically separate, while 
maintaining/restricting the use of them to a single namespace.

The fact that tools have a problem with trying to compile a sub-module can be 
addressed in the tools themselves.

> On Aug 5, 2020, at 2:44 PM, Reshad Rahman (rrahman) 
>  wrote:
> 
> Indeed
> https://github.com/netmod-wg/yang-next/issues/26
> 
> On 2020-08-05, 5:22 PM, "netmod on behalf of Vladimir Vassilev" 
>  
> wrote:
> 
>On 05/08/2020 18.48, Juergen Schoenwaelder wrote:
> 
>> I personally meanwhile believe that sub-modules add complexity with
>> little extra value but this view surely is not shared by others.
> 
>+1. IMO removing sub-modules from YANG 2.0 should be on the list of 
>proposed changes.
> 
>/Vladimir
> 
>___
>netmod mailing list
>netmod@ietf.org
>https://www.ietf.org/mailman/listinfo/netmod
> 
> ___
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] submodules the hidden benefits

2020-08-05 Thread Reshad Rahman (rrahman)
Indeed
https://github.com/netmod-wg/yang-next/issues/26

On 2020-08-05, 5:22 PM, "netmod on behalf of Vladimir Vassilev" 
 wrote:

On 05/08/2020 18.48, Juergen Schoenwaelder wrote:

> I personally meanwhile believe that sub-modules add complexity with
> little extra value but this view surely is not shared by others.

+1. IMO removing sub-modules from YANG 2.0 should be on the list of 
proposed changes.

/Vladimir

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] submodules the hidden benefits

2020-08-05 Thread Vladimir Vassilev

On 05/08/2020 18.48, Juergen Schoenwaelder wrote:


I personally meanwhile believe that sub-modules add complexity with
little extra value but this view surely is not shared by others.


+1. IMO removing sub-modules from YANG 2.0 should be on the list of 
proposed changes.


/Vladimir

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] submodules the hidden benefits

2020-08-05 Thread Andy Bierman
On Wed, Aug 5, 2020 at 9:20 AM tom petch  wrote:

> Looking at an I-D with endless submodules, I am left thinking
>
> Costs
>
> greater in size
> more complex to understand
> harder to review
> more likely to have undetected errors
>
>
How about "confusion due to false sense of modularity"?
People often think submodules work like modules (but they don't).
There think a submodule should "compile" when validated on its own
(that used to be true in YANG 1.0 but not in YANG 1.1).  They think
mix-and-match
include submodule revisions can be selected by the server vendor just like
importing
modules (but that does not work).




> Benefits
>
>
>
> What am I missing?  I have only ever seen one such module in the IETF that
> I can recall and it is draft-ietf-idr-bgp-model and AFAICT it would be
> smaller, simpler, easier to understand if it were done with grouping
> instead of submodule.
>
> Tom Petch
>
>
Andy


> ___
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>
___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] submodules the hidden benefits

2020-08-05 Thread Juergen Schoenwaelder
As a data point, RFC 7407 uses sub-modules. The sub-modules more or
less reflect SNMPv3's modular architecture, the different transports
are for example separated out as sub-modules. I guess we also used
sub-modules back then because we wanted to see how this works in an
IETF context (RFC 7407 was approved/published 6 years ago, we were
still learning how to use YANG at that time).

I personally meanwhile believe that sub-modules add complexity with
little extra value but this view surely is not shared by others.
Anyway, people using them should have a good reason for using them.
Since SNMPv3 has a great modular architecture, it makes sense to
structure the YANG modules accordingly and instead of having many
ietf-snmp- modules, sub-modules came in handy to have everything
in a single namespace. For technologies that do not have a modular
architecture that can be followed, creating modular sub-modules is
likely not worth the effort.

/js

PS: I am not sure that sub-modules are necessarily harder to
review. For the crypto YANG modules, we have several intertwined
modules, they are likely as complex to review as if they were all
sub-modules sharing a single namespace - or a single module with
all definitions in one big module.

On Wed, Aug 05, 2020 at 04:20:17PM +, tom petch wrote:
> Looking at an I-D with endless submodules, I am left thinking
> 
> Costs
> 
> greater in size
> more complex to understand
> harder to review
> more likely to have undetected errors
> 
> Benefits
> 
> 
> 
> What am I missing?  I have only ever seen one such module in the IETF that I 
> can recall and it is draft-ietf-idr-bgp-model and AFAICT it would be smaller, 
> simpler, easier to understand if it were done with grouping instead of 
> submodule.
> 
> Tom Petch
> 
> ___
> netmod mailing list
> netmod@ietf.org
> 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 

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


[netmod] submodules the hidden benefits

2020-08-05 Thread tom petch
Looking at an I-D with endless submodules, I am left thinking

Costs

greater in size
more complex to understand
harder to review
more likely to have undetected errors

Benefits



What am I missing?  I have only ever seen one such module in the IETF that I 
can recall and it is draft-ietf-idr-bgp-model and AFAICT it would be smaller, 
simpler, easier to understand if it were done with grouping instead of 
submodule.

Tom Petch

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod