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

Ladislav Lhotka <lhotka@nic.cz> Mon, 15 January 2018 10:10 UTC

Return-Path: <lhotka@nic.cz>
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 1525512DA06 for <yang-doctors@ietfa.amsl.com>; Mon, 15 Jan 2018 02:10:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.01
X-Spam-Level:
X-Spam-Status: No, score=-7.01 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, T_RP_MATCHES_RCVD=-0.01] 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 zVk_HnKbvCwY for <yang-doctors@ietfa.amsl.com>; Mon, 15 Jan 2018 02:10:18 -0800 (PST)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 994BB12DA0A for <yang-doctors@ietf.org>; Mon, 15 Jan 2018 02:10:16 -0800 (PST)
Received: from birdie (unknown [IPv6:2001:1488:fffe:6:68c6:92ff:fe01:2298]) by mail.nic.cz (Postfix) with ESMTPSA id 3FA9963F6A; Mon, 15 Jan 2018 11:10:13 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1516011013; bh=4ncPXzOr+o+QUBJVoYuuzDuh/9jIexZDVQ/rIy02A64=; h=From:To:Date; b=wbi9GxP+WHYOpUWn9gHWRbWAoum4lDHCoSNjQK5hkzAbywTuKDEg2ebOKP4XanaAP JG//6Ip2o82sOQcLE7P1BKKe+g1AGtnr2V7fl4CwiPHIJ0Fm/wYiOflRg+/rf1PMAM xc5abe3cXvuPHmQoOvj3oeebehBCZWZ6jWuPvhR4=
Message-ID: <1516011013.5426.25.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Cc: Martin Bjorklund <mbj@tail-f.com>, yang-doctors@ietf.org
Date: Mon, 15 Jan 2018 11:10:13 +0100
In-Reply-To: <20180115095306.3m657hzwjemogqah@elstar.local>
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>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.26.4
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/YlVLow_fHLTlRaYGkBWYH-PXiUU>
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:10:20 -0000

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.
> 
> /js
> 
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67