Re: [netmod] Proposal to enhance the YANG tree output

Martin Bjorklund <mbj@tail-f.com> Wed, 20 September 2017 06:38 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CD1F3132F2C for <netmod@ietfa.amsl.com>; Tue, 19 Sep 2017 23:38:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XtdLvrq5Up4A for <netmod@ietfa.amsl.com>; Tue, 19 Sep 2017 23:38:46 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id B188A1326ED for <netmod@ietf.org>; Tue, 19 Sep 2017 23:38:46 -0700 (PDT)
Received: from localhost (h-40-225.A165.priv.bahnhof.se [94.254.40.225]) by mail.tail-f.com (Postfix) with ESMTPSA id CF2BA1AE0383; Wed, 20 Sep 2017 08:38:45 +0200 (CEST)
Date: Wed, 20 Sep 2017 08:40:16 +0200
Message-Id: <20170920.084016.1173553333008898354.mbj@tail-f.com>
To: lberger@labn.net
Cc: rwilton@cisco.com, netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <cc7c1cad-f394-c3c9-187f-77b7ac8824f2@labn.net>
References: <20170919.154728.285206235172744617.mbj@tail-f.com> <4f17fbca-6282-6b27-b390-9b85779e96da@cisco.com> <cc7c1cad-f394-c3c9-187f-77b7ac8824f2@labn.net>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="utf-8"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/EbLuUlnbyeTIrOTvZ1n1f2Cirbk>
Subject: Re: [netmod] Proposal to enhance the YANG tree output
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Sep 2017 06:38:48 -0000

Lou Berger <lberger@labn.net> wrote:
> 
> 
> On 9/19/2017 9:55 AM, Robert Wilton wrote:
> >
> > On 19/09/2017 14:47, Martin Bjorklund wrote:
> >> Robert Wilton <rwilton@cisco.com> wrote:
> >>> On 19/09/2017 14:28, Lou Berger wrote:
> >>>> On 9/19/2017 7:29 AM, Martin Bjorklund wrote:
> >>>>> Lou Berger <lberger@labn.net> wrote:
> >>>>>> Martin,
> >>>>>>
> >>>>>> Speaking as a contributor:
> >>>>>>
> >>>>>>
> >>>>>> On 9/15/2017 7:40 AM, Martin Bjorklund wrote:
> >>>>>>> Robert Wilton <rwilton@cisco.com> wrote:
> >>>>>>>> On 15/09/2017 11:21, Ladislav Lhotka wrote:
> >>>>>>>>> Andy Bierman píše v Čt 14. 09. 2017 v 08:43 -0700:
> >>>>>>>>>> Hi,
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> Actually I liked the early pyang output that was concise and easy to
> >>>>>>>>>> remember.
> >>>>>>>>>> The current format gets very cluttered and there are too many little
> >>>>>>>>>> symbols
> >>>>>>>>>> to remember them all.
> >>>>>>>>> I agree.
> >>>>>>> Me too.  The current draft adds three new magic symbols: "mp" "@" and
> >>>>>>> "/".
> >>>>>>>
> >>>>>>> "mp" is for a mount point, and it can be generated directly from the
> >>>>>>> YANG modules.
> >>>>>>>
> >>>>>>> Directly under a "mp", "/" and "@" are used to indicate that a node is
> >>>>>>> mounted
> >>>>>>> or available through a parent reference, respectively.
> >>>>>>>
> >>>>>>> I actually question the usability of "/" and "@".
> >>>>>> I agree that / and @ are something new, and enabled by schema mount.
> >>>>>> There have been repeated comments in the RTG WG that there needs to be
> >>>>>> some way for vendors to convey what they have implemented with Schema
> >>>>>> mount
> >>>>> If that's the requirement, using the tree diagram is probably not the
> >>>>> best way.  The tree diagram is intended to provide an overview of a
> >>>>> given (set of) YANG module(s).
> >>>>>
> >>>>> A perhaps better way to convey the information is to create a file
> >>>>> with an instantiated /schema-mounts tree.
> >>>> using what syntax?  JSON and XML really isn't that easy for the
> >>>> (human)
> >>>> reader to parse.
> >>> Perhaps there needs to be multiple versions of the generated tree
> >>> output?
> >>>
> >>> 1) A normative tree diagram that shows the structure of the model.
> >>> 2) A subsequent example that demonstrates what it looks like with the
> >>> schema mounted modules.  Within the confines of a text document, the
> >>> tree format still seems like a reasonable way to illustrate this, and
> >>> I would say it is preferable to the verbosity of JSON or XML.
> >>>
> >>> I note that RFC 8022 includes an overview tree model in section 4 with
> >>> some branches pruned, and then the complete representation in an
> >>> appendix, which seems like a pragmatic approach.
> >> Sure, but the question is about what special symbols we define.  Do we
> >> need the extra symbols "/" and "@", and do we agree on what they mean?
> > If we agree that tree style output is OK to illustrate the use of schema 
> > mount, then I think that draft-ietf-netmod-yang-tree-diagrams could 
> > define them, but indicate that they are only used to illustrate how 
> > schema mount is used, and would not be seen in a regular YANG tree 
> > diagram illustrating the structure of a YANG module.  
> 
> This seems like a reasonable compromise to me, and not a major change to
> the draft.
> 
> Martin, what do you think?

This is not a compromise.  Either the tree document defines the
symbols or it doesn't.  The draft already says:

  Module trees may be included in a document as a whole, by one or
  more sections, or even subsets of nodes.

and

  At times when the composition of the nodes within a module schema
  are not important in the context of the presented tree, peer nodes
  and their children can be collapsed using the notation '...' in
  place of the text lines used to represent the summarized nodes.

so the usage in 8022 is already covered.


> > The alternative 
> > might be that the RFCs that uses them defines what '/' and '@' mean for 
> > that specific example.
> >
> > As for what the precise definition of '/' and '@' should be, I'm not 
> > sure.  I think that you and Lou have a better handle on that ;-)

Since Lou and I have different opinions on this, it would be very
useful to hear what others think.


/martin