Re: [netmod] YANG tree diagram uses

Martin Bjorklund <mbj@tail-f.com> Tue, 30 January 2018 15:04 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 B114A12EB94 for <netmod@ietfa.amsl.com>; Tue, 30 Jan 2018 07:04:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=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 oByY13qay5kz for <netmod@ietfa.amsl.com>; Tue, 30 Jan 2018 07:04:10 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id ED16F12D9FF for <netmod@ietf.org>; Tue, 30 Jan 2018 07:00:57 -0800 (PST)
Received: from localhost (unknown [173.38.220.56]) by mail.tail-f.com (Postfix) with ESMTPSA id 225671AE018A; Tue, 30 Jan 2018 16:00:57 +0100 (CET)
Date: Tue, 30 Jan 2018 16:00:56 +0100
Message-Id: <20180130.160056.1269600856222747465.mbj@tail-f.com>
To: mvasko@cesnet.cz
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <4f1c-5a703c80-79-5fc7eb00@206654228>
References: <4f1c-5a703c80-79-5fc7eb00@206654228>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Kn6buffqcm9uEEKg061zgmRf0d4>
Subject: Re: [netmod] YANG tree diagram uses
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, 30 Jan 2018 15:04:13 -0000

Michal Vaško <mvasko@cesnet.cz> wrote:
> Hi,
> 
> we have encountered some problem while implementing a feature from
> draft-ietf-netmod-yang-tree-diagrams-05, specifically not resolving
> groupings and printing uses names instead (Section 2.2).
> 
> We have 2 example models, A and B. A defines a container and a
> grouping. B defines an augment that adds uses into the container from
> A and resolves to the grouping from model A.
> 
> grouping A:g;
> A:c {
>   B:uses A:g;
> }
> 
> Now, if printing model A with the augment not resolving uses we
> currently print
> 
> +--rw c
>    +---u B:A:g;

pyang prints this as well, but it is more "by accident".   It looks
quite odd.

It wouldn't be correct to write

    +---u B:g;

since 'g' isn't defined in B. 
   
OTOH,

    +---u A:g;

is correct in the sense that "A:g" is the "name of the grouping", and
that is what the current document says should be printed.  Granted,
this doesn't show the whole picture, but maybe this is good enough.

It might be wise to not print a grouping like this in order to avoid
confusion.


/martin


> 
> since the uses is foreign. We could not decide what the "correct"
> output should be and it is likely left to various interpretations but
> we were wondering what some of you think. Should it perhaps be only
> "B:g" since the grouping becomes local? But what if the grouping would
> be from a third model, are 2 prefixes okay? Thanks for your opinions.
> 
> Regards,
> Michal
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>