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

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Mon, 15 January 2018 10:20 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 AB2B812DA13 for <yang-doctors@ietfa.amsl.com>; Mon, 15 Jan 2018 02:20:18 -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 Xoo469lMGBqy for <yang-doctors@ietfa.amsl.com>; Mon, 15 Jan 2018 02:20:17 -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 D197012DA27 for <yang-doctors@ietf.org>; Mon, 15 Jan 2018 02:20:12 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id 99A5F3B; Mon, 15 Jan 2018 11:20:11 +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 rkHFlY6u3kix; Mon, 15 Jan 2018 11:20:09 +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 11:20:11 +0100 (CET)
Received: from localhost (demetrius2.jacobs-university.de [212.201.44.47]) by hermes.jacobs-university.de (Postfix) with ESMTP id 767672013F; Mon, 15 Jan 2018 11:20:11 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius2.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id 4XdXaHMU1VDi; Mon, 15 Jan 2018 11:20:11 +0100 (CET)
Received: from elstar.local (unknown [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id ECB642013E; Mon, 15 Jan 2018 11:20:10 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id E1B5B42100E0; Mon, 15 Jan 2018 11:20:09 +0100 (CET)
Date: Mon, 15 Jan 2018 11:20:09 +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: <20180115102009.aai3jetqsx3tgevw@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> <20180115095306.3m657hzwjemogqah@elstar.local> <1516011013.5426.25.camel@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <1516011013.5426.25.camel@nic.cz>
User-Agent: NeoMutt/20171215
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/aJxAddOv7-EB7KjiPJJFTFsfW3E>
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 10:20:19 -0000

On Mon, Jan 15, 2018 at 11:10:13AM +0100, Ladislav Lhotka wrote:
> On Mon, 2018-01-15 at 10:53 +0100, Juergen Schoenwaelder wrote:
> > 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
> 
> In my example, the prefix is used inside an XPath string, and XPath 1.0 doesn't
> allow for adding any structure or semantics to the string type. So even if RFC
> 7950 stated that such an import was necessary (which it doesn't), it would be an
> improper use of XPath.
> 
> YANG can define the string value of a node instance in the conceptual data tree
> but a literal XPath string is just that.
> 
> Lada
> 
> 
> > because of that it is necessary to import a module that defines the
> > prefix 'ospf'. Any other interpretation would be ambiguous I think.

Fine, so this construction should be avoided since it is ambiguous.

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