Re: [yang-doctors] Yangdoctors last call review of draft-ietf-ospf-yang-09

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Mon, 15 January 2018 09:53 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E7E6B127076 for <yang-doctors@ietfa.amsl.com>; Mon, 15 Jan 2018 01:53:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, 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 5mCYVwF89GQY for <yang-doctors@ietfa.amsl.com>; Mon, 15 Jan 2018 01:53:10 -0800 (PST)
Received: from atlas5.jacobs-university.de (atlas5.jacobs-university.de [212.201.44.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 272A2126B6D for <yang-doctors@ietf.org>; Mon, 15 Jan 2018 01:53:10 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id 012843B; Mon, 15 Jan 2018 10:53:08 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas5.jacobs-university.de ([10.70.0.217]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10032) with ESMTP id ko8ISP8rwn_V; Mon, 15 Jan 2018 10:53:06 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas5.jacobs-university.de (Postfix) with ESMTPS; Mon, 15 Jan 2018 10:53:07 +0100 (CET)
Received: from localhost (demetrius1.jacobs-university.de [212.201.44.46]) by hermes.jacobs-university.de (Postfix) with ESMTP id DC1CF2013F; Mon, 15 Jan 2018 10:53:07 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius1.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id mnRzH64wkRhc; Mon, 15 Jan 2018 10:53:07 +0100 (CET)
Received: from elstar.local (unknown [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 5E4FD2013E; Mon, 15 Jan 2018 10:53:07 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id 1E293420FF8C; Mon, 15 Jan 2018 10:53:06 +0100 (CET)
Date: Mon, 15 Jan 2018 10:53:06 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Ladislav Lhotka <lhotka@nic.cz>
Cc: Martin Bjorklund <mbj@tail-f.com>, yang-doctors@ietf.org
Message-ID: <20180115095306.3m657hzwjemogqah@elstar.local>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Ladislav Lhotka <lhotka@nic.cz>, Martin Bjorklund <mbj@tail-f.com>, yang-doctors@ietf.org
References: <87po6fmlkn.fsf@nic.cz> <CABCOCHSFfgjVS58S0po-9yEUZw=cjzG6k_LY8V9NSdy+kHQvLg@mail.gmail.com> <1516006155.5426.3.camel@nic.cz> <20180115.095941.341257692373089671.mbj@tail-f.com> <1516009099.5426.13.camel@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <1516009099.5426.13.camel@nic.cz>
User-Agent: NeoMutt/20171215
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/btFuAiVUyrcTur9aIoglW6oKzho>
Subject: Re: [yang-doctors] Yangdoctors last call review of draft-ietf-ospf-yang-09
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Jan 2018 09:53:14 -0000

On Mon, Jan 15, 2018 at 10:38:19AM +0100, Ladislav Lhotka wrote:
> > 
> > The intention (for better or worse) was that the value would use the
> > prefix used in imports.  This means that if you want to do any kind of
> > comparision of the string value to some known identities, then you
> > must import that module so that there is a prefix defined.  This was
> 
> This is IMO not true. As I already wrote, for using a when expression like
> 
>    when "../type = 'ospf:ospfv3'"
> 
> it is not necessary to import the "ietf-ospf" module and thus have the "ospf"
> prefix defined. If you think it is necessary, then point me to the relevant
> text.

Prefixes assigned to modules using the prefix statement are not
guaranteed to be globally unique. It is possible to have multiple
modules defining the prefix 'ospf', e.g.:

 module ietf-ospf {
   prefix ospf;
 }

 module acme-ospf {
   prefix ospf;
 }

Note that this is not a problem since YANG allows to redefine the
prefix in an import statement in case a prefix clash occurs. Hence,
the 'ospf' prefix in the when statement has to refer to the prefix
that is used in the module where the when statement is defined. And
because of that it is necessary to import a module that defines the
prefix 'ospf'. Any other interpretation would be ambiguous I think.

/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/>