Subject: [netmod] YANG library update and new YANG guideline issue

From: Andy Bierman <[email-masked]>
Date: Wed, 8 Jun 2016 17:25:52 -0700

Hi,

We have been asked to make the YANG library module consistent
wrt/ use of a container parent for a list.  We decided to remove the
submodules container parent from the child submodule.
The submodule list and deviation list will now be consistent.

Benoit has asked for a YANG guideline in rfc6087bis on this issue.
I added the issue with an example to github
https://github.com/netmod-wg/rfc6087bis/issues/35

Please comment if you prefer
  (A) guideline is be consistent throughout module (whichever choice)
  (B) guideline is for use of a container parent
  (C) guideline is to not use a container parent
  (D) something else

thanks,
Andy, Martin, and Kent

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 9 Jun 2016 13:08:36 +0200

> On 09 Jun 2016, at 02:25, Andy Bierman <[email-masked]> wrote:
> 
> Hi,
> 
> 

I prefer (C).

Lada

> 
> 
> 
> thanks,
> Andy, Martin, and Kent
> 
> 
> 
> 
> 
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 09 Jun 2016 13:14:49 +0200 (CEST)

> >   (C) guideline is to not use a container parent

If the question is: "should I always wrap every list with a container
that contains only the list?", then my answer would be "no".

I guess that means that I prefer (C) as well.

(There might be exceptions, e.g., if the list otherwise would be on
the top-level; such as in ietf-interfaces.)

/martin

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 9 Jun 2016 13:57:33 +0200

> >   (C) guideline is to not use a container parent

Is there a reasoning as well? Or just a question of style and taste?

/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: Ladislav Lhotka <[email-masked]>
Date: Thu, 9 Jun 2016 14:08:41 +0200

> On 09 Jun 2016, at 13:57, Juergen Schoenwaelder <[email-masked]> wrote:
> 

In JSON encoding (and CBOR as well), the containers make no sense at all and just add clutter. They are a workaround for the lack of list-like structures in XML.

Lada

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 09 Jun 2016 14:18:14 +0200 (CEST)

Ladislav Lhotka <[email-masked]> wrote:
>  
> > On 09 Jun 2016, at 13:57, Juergen Schoenwaelder
> > <[email-masked]> wrote:
> > 
> In JSON encoding (and CBOR as well), the containers make no sense at
> all and just add clutter. They are a workaround for the lack of
> list-like structures in XML.

I prefer if the data models are designed w/o worrying too much about
specific encodings or specific protocol issues.  With YANG 1.1, we're
trying to move slowly in the direction of being more
encoding/protocol-neutral.  This will fail as soon as data models are
designed with some specific encoding / protocol in mind.  Such issues
need be handled by fixing the encoding / protocol.  Another example is
that some people prefer (B) b/c then you can delete all entries in a
list over NETCONF (by deleting the container).

I prefer (C) b/c I think that you should be careful with
NP-containers, and only use them when they have some structural
meaning.  It's like your filesystem; you don't put all files in a
single dir, and you don't have one dir per file.  You try to keep some
meaningful structure.

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 9 Jun 2016 14:45:36 +0200

> On 09 Jun 2016, at 14:18, Martin Bjorklund <[email-masked]> wrote:
> 

I suspect in this case the preference will be  strongly correlated to the preferred encoding.
YANG does have lists (unlike XML schema languages), so having a (leaf-)list as the only child of a NP container doesn't make much sense either.  

> list over NETCONF (by deleting the container).

This should be fixed in NETCONF.

> single dir, and you don't have one dir per file.  You try to keep some

Agreed, but the list wrappers have a structural meaning only in the XML encoding.

Lada

---

From: Alex Campbell <[email-masked]>
Date: Thu, 9 Jun 2016 21:17:35 +0000

My preference is not to add schema nodes that are not useful.

If it is foreseen that other nodes will be added in the container then the container is fine; otherwise I see no reason to have one.

________________________________
From: netmod <[email-masked]> on behalf of Andy Bierman <[email-masked]>
Sent: Thursday, 9 June 2016 12:25 p.m.
To: [email-masked]
Subject: [netmod] YANG library update and new YANG guideline issue

Hi,

thanks,
Andy, Martin, and Kent