Re: [netmod] tree diagrams - flags
Ladislav Lhotka <lhotka@nic.cz> Tue, 21 March 2017 12:02 UTC
Return-Path: <lhotka@nic.cz>
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 43B4B1296DB for <netmod@ietfa.amsl.com>; Tue, 21 Mar 2017 05:02:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7
X-Spam-Level:
X-Spam-Status: No, score=-7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 Tc6JJoBUTOpb for <netmod@ietfa.amsl.com>; Tue, 21 Mar 2017 05:02:00 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 539DE1297A5 for <netmod@ietf.org>; Tue, 21 Mar 2017 05:02:00 -0700 (PDT)
Received: from [IPv6:2001:718:1a02:1:d20:8e4d:8768:16f6] (unknown [IPv6:2001:718:1a02:1:d20:8e4d:8768:16f6]) by mail.nic.cz (Postfix) with ESMTPSA id 7815C60190; Tue, 21 Mar 2017 13:01:58 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1490097718; bh=VbztdLzJ5n0uWcsjco68YEkwrwXaVfEnk322tLYbCDs=; h=From:Date:To; b=rGKJ/Vw6eAHrwCeGulLSv30WZjlmPUyzx7lE6z2beiUC7qwWhc5Wnf1iqZiNTzgZ9 Phk86wRevqa9E+ImUgjwgeXwl0BtmEs30uHDtlC7YJ+cmAhvr9VRVdLYdfXQgEIRSY AM9PWiDLNiE9IceT3tV7oR/1KlUmYZql3ubPGpGw=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <70eb5dec-2b98-5e14-0150-0ee3e55ae99f@cisco.com>
Date: Tue, 21 Mar 2017 13:01:58 +0100
Cc: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>, netmod@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <E8B217D8-9961-49ED-B035-D16CDE957270@nic.cz>
References: <20170321102533.GC35449@elstar.local> <05D066C2-08AA-4140-9399-87654141F821@nic.cz> <70eb5dec-2b98-5e14-0150-0ee3e55ae99f@cisco.com>
To: Robert Wilton <rwilton@cisco.com>
X-Mailer: Apple Mail (2.3259)
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/TlW5RigkmpogIUBPFxr7YWB_ZEs>
Subject: Re: [netmod] tree diagrams - flags
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: Tue, 21 Mar 2017 12:02:03 -0000
> On 21 Mar 2017, at 12:50, Robert Wilton <rwilton@cisco.com> wrote: > > > > On 21/03/2017 10:49, Ladislav Lhotka wrote: >>> On 21 Mar 2017, at 11:25, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote: >>> >>> Hi, >>> >>> if we want to standardize tree diagrams, we may want to take a more >>> critical look at them, in particular the flags (that were created >>> ad-hoc and in resemblance to MIB tree diagrams). pyang --tree-help >>> says: >>> >>> <flags> is one of: >>> rw for configuration data >>> ro for non-configuration data >>> -x for rpcs and actions >>> -n for notifications >>> >>> This is (a) incomlete and (b) somewhat confusing since ct does not >>> equate to readwrite. I am attaching a sample yang file and here is the >>> output pyang 1.7.1 produces: >>> >>> module: tree-sample >>> +--rw config-true-container >>> | +--rw param? string >>> +--ro config-false-container >>> | +--ro value? string >>> +--rw inline-action >>> | +---x action >>> | +---- oops? string >>> | +---w input >>> | | +---w in? string >>> | +--ro output >>> | +--ro out? string >>> +--rw inline-notification >>> +---n notification >>> +---- duration? string >>> >>> rpcs: >>> +---x rpc >>> +---w input >>> | +---w in? string >>> +--ro output >>> | +--ro out? string >>> +--ro oops? string >>> >>> notifications: >>> +---n notification >>> +--ro boom? string >>> >>> I think a better usage of two letter flags would have been this (since >>> it more naturally aligns with what the YANG definition says): >>> >>> <flags> is one of: >>> ct for configuration data >>> cf for non-configuration data >>> x- for rpcs and actions >>> xi for rpc or action input >>> xo for rpc or action output >>> n- for notifications >>> nt for notification tree (this is I think the term 7950 uses) >> Inside notifications and operations, "cf" carries no information and just clutters the output. My suggestion is to use "ct" or just "c" for config=true data and nothing elsewhere. > Do, we also actually need the 'xi', 'xo', or 'nt' at all? Would these be obvious from the paths anyway? Yes, "input" and "output" tells everything. > > I think that having less symbols on the diagram may make it easier to parse, and perhaps less likely for the lines to wrap. +1 > > So I am suggesting perhaps just having: > > <flags> is one of: > c for configuration data > x for rpcs and actions > n for notifications > > module: tree-sample > +--c config-true-container > | +--c param? string > +--- config-false-container > | +-- value? string > +--c inline-action > | +--x- action > | +--x input > | | +--x in? string > | +--x output > | +--x out? string > +--c inline-notification > +--n notification > +--n duration? string > I think the "x" and "n" is only needed next to the name of rpc/action/notification. So my version would be: <flags> is one of: c for configuration data x for rpcs and actions n for notifications module: tree-sample +--c config-true-container | +--c param? string +--- config-false-container | +--- value? string +--c inline-action | +--x action | +--- input | | +--- in? string | +--- output | +--- out? string +--c inline-notification +--n notification +--- duration? string Lada > etc. > > Rob > > >> >> Lada >> >>> module: tree-sample >>> +--ct config-true-container >>> | +--ct param? string >>> +--cf config-false-container >>> | +--cf value? string >>> +--ct inline-action >>> | +--x- action >>> | +--xi input >>> | | +--xi in? string >>> | +--xo output >>> | +--xo out? string >>> +--ct inline-notification >>> +--n- notification >>> +--nt duration? string >>> >>> rpcs: >>> +--x- rpc >>> +--xi input >>> | +--xi in? string >>> +--ro output >>> +--xo out? string >>> >>> notifications: >>> +--n- notification >>> +--nt boom? string >>> >>> (And I think the oops leafs should have triggered an error.) >>> >>> /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/> >>> <tree-sample.yang>_______________________________________________ >>> netmod mailing list >>> netmod@ietf.org >>> https://www.ietf.org/mailman/listinfo/netmod >> -- >> Ladislav Lhotka, CZ.NIC Labs >> PGP Key ID: 0xB8F92B08A9F76C67 >> >> >> >> >> >> _______________________________________________ >> netmod mailing list >> netmod@ietf.org >> https://www.ietf.org/mailman/listinfo/netmod >> . -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: 0xB8F92B08A9F76C67
- Re: [netmod] tree diagrams - flags Martin Bjorklund
- Re: [netmod] tree diagrams - flags Thomas Morin
- [netmod] tree diagrams - flags Juergen Schoenwaelder
- Re: [netmod] tree diagrams - flags Ladislav Lhotka
- Re: [netmod] tree diagrams - flags Juergen Schoenwaelder
- Re: [netmod] tree diagrams - flags Robert Wilton
- Re: [netmod] tree diagrams - flags Ladislav Lhotka
- Re: [netmod] tree diagrams - flags Dale R. Worley
- Re: [netmod] tree diagrams - flags Martin Bjorklund
- Re: [netmod] tree diagrams - flags Juergen Schoenwaelder
- Re: [netmod] tree diagrams - flags Ladislav Lhotka
- Re: [netmod] tree diagrams - flags Juergen Schoenwaelder
- Re: [netmod] tree diagrams - flags Phil Shafer
- Re: [netmod] tree diagrams - flags Dale R. Worley
- Re: [netmod] tree diagrams - flags Phil Shafer
- Re: [netmod] tree diagrams - flags Martin Bjorklund
- Re: [netmod] tree diagrams - flags Dale R. Worley