Re: [netmod] tree diagrams - flags
Robert Wilton <rwilton@cisco.com> Tue, 21 March 2017 11:50 UTC
Return-Path: <rwilton@cisco.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 E4F74129722 for <netmod@ietfa.amsl.com>; Tue, 21 Mar 2017 04:50:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.522
X-Spam-Level:
X-Spam-Status: No, score=-14.522 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 KkSu-X6ud33h for <netmod@ietfa.amsl.com>; Tue, 21 Mar 2017 04:50:53 -0700 (PDT)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4110D129486 for <netmod@ietf.org>; Tue, 21 Mar 2017 04:50:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4323; q=dns/txt; s=iport; t=1490097052; x=1491306652; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=tFZnOemfEH/cShKl1VIttdoWepyc5zro1tx/CZ0QdAs=; b=YiP23dlwBNgqvZf56KczrTLoEpqBpalhzVma8z+JNwMvEfLCfO2O8Pvn dJps830RNJ2rMUkTGLbGQwMRbQBZL4xuXzpYUfHPPaDtjVK5Mdyqlpqod gnH6CoevMnQbPCvHjtoJTy203R9f1jTUHIO3/MTr2oGchszy+eOZfslJP c=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BnAQCZEtFY/xbLJq1bAxkBAQEBAQEBAQEBAQcBAQEBAYQyKmCNcnOQSx+VRIIOHwuFLkoCg04YAQIBAQEBAQEBayiFFQEBAQECAQEBNi8HCw4CCxAILhsMMAYBDAYCAQGJeAgOrGCKUQEBAQEBAQEBAQEBAQEBAQEBAQEBAR0FhkmCBQiCYoR1CxuFHgWcTpJGileGVotMiBIfOIEEIxYIFxVBhldANYlBAQEB
X-IronPort-AV: E=Sophos;i="5.36,198,1486425600"; d="scan'208";a="693138834"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2017 11:50:50 +0000
Received: from [10.63.23.130] (dhcp-ensft1-uk-vla370-10-63-23-130.cisco.com [10.63.23.130]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id v2LBooqm007508; Tue, 21 Mar 2017 11:50:50 GMT
To: Ladislav Lhotka <lhotka@nic.cz>, Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
References: <20170321102533.GC35449@elstar.local> <05D066C2-08AA-4140-9399-87654141F821@nic.cz>
Cc: netmod@ietf.org
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <70eb5dec-2b98-5e14-0150-0ee3e55ae99f@cisco.com>
Date: Tue, 21 Mar 2017 11:50:49 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1
MIME-Version: 1.0
In-Reply-To: <05D066C2-08AA-4140-9399-87654141F821@nic.cz>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/nJWvRJ9hcUMeNGUV77BIq96B-eI>
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 11:50:55 -0000
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? I think that having less symbols on the diagram may make it easier to parse, and perhaps less likely for the lines to wrap. 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 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 > . >
- 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