Re: [netmod] [Technical Errata Reported] RFC7950 (5157)

Robert Wilton <rwilton@cisco.com> Tue, 24 October 2017 09:03 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 D669913DBC8 for <netmod@ietfa.amsl.com>; Tue, 24 Oct 2017 02:03:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.499
X-Spam-Level:
X-Spam-Status: No, score=-14.499 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, 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 LMzodZIFQZWI for <netmod@ietfa.amsl.com>; Tue, 24 Oct 2017 02:03:07 -0700 (PDT)
Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 603C413C2F9 for <netmod@ietf.org>; Tue, 24 Oct 2017 02:03:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=8851; q=dns/txt; s=iport; t=1508835786; x=1510045386; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to; bh=h/umZ5uDijfHNgIPkPNNzlPnaquXZczcCcN9Hf0H/hE=; b=QTilhCkaD2oLK6fT05TaTxJg3zWabGohamG6e60BweiXdYVLrwWLqDZH +Sz/dM/81C7cv27ufznleOiyK6Apx0Pfp9+XdGskzkhYYQ8W4x2XCsVdi ls0QaQ2OWrZexvP+EL4exlkdnbouKFvjbYcg7UGXxdtJfjlSQNp5wwSOg w=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CCAQAHAe9Z/xbLJq1bGQEBAQEBAQEBAQEBBwEBAQEBhTEng3qLE5AnJpB4hUKCEQqFOwKFHBcBAgEBAQEBAQFrKIUeAQUjVhAJAhgnAwICRhEGAQwGAgEBF4oFimGdZ4InJosAAQEBAQEBAQEBAQEBAQEBAQEBAQEBHYMug1eCEguCdoE8hl2CYQWKJIcskB2UdYQJh2OHOI4ah2WBOSABNoFbNCEIHRVJgmSCXAwQgWg/Nos3AQEB
X-IronPort-AV: E=Sophos;i="5.43,427,1503360000"; d="scan'208,217";a="658276929"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2017 09:03:04 +0000
Received: from [10.63.23.81] (dhcp-ensft1-uk-vla370-10-63-23-81.cisco.com [10.63.23.81]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id v9O933JD001909; Tue, 24 Oct 2017 09:03:04 GMT
To: Andy Bierman <andy@yumaworks.com>, Vladimir Vassilev <vladimir@transpacket.com>
Cc: "netmod@ietf.org" <netmod@ietf.org>
References: <67172aec-686f-90ba-0fc8-1ce2bc3dcdb4@cisco.com> <CABCOCHRP2ooSG1BGWehD8BsCDF-pX97Q++=WftOxGvf=S57GAQ@mail.gmail.com> <6d43c6fb-ae11-df39-0dd4-766f7b25ac82@transpacket.com> <20171023.133559.470792369996870413.mbj@tail-f.com> <ca6baac5-b30a-de80-24e0-8463f01ec67f@transpacket.com> <CABCOCHRv-1JCq9GSP1KMCnm4fOi4TS_M9hUpNRt0Kn-PLdguww@mail.gmail.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <228b6545-0310-8e62-d80b-e9888fc0ba5a@cisco.com>
Date: Tue, 24 Oct 2017 10:03:03 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <CABCOCHRv-1JCq9GSP1KMCnm4fOi4TS_M9hUpNRt0Kn-PLdguww@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------FBF7E99435D85940D06469C2"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/fv1VFQ1b1bGL_KJfAx-iqvm0adg>
Subject: Re: [netmod] [Technical Errata Reported] RFC7950 (5157)
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, 24 Oct 2017 09:03:10 -0000


On 24/10/2017 02:42, Andy Bierman wrote:
>
>
> On Mon, Oct 23, 2017 at 4:57 AM, Vladimir Vassilev 
> <vladimir@transpacket.com <mailto:vladimir@transpacket.com>> wrote:
>
>     On 10/23/2017 01:35 PM, Martin Bjorklund wrote:
>
>         Vladimir Vassilev <vladimir@transpacket.com
>         <mailto:vladimir@transpacket.com>> wrote:
>
>             Hello,
>
>             I would like to use the occasion of this Errata report to
>             point out
>             some additional issues with the instance-identifier type
>             definition.
>
>             IMO the instance-identifier built-in type has 2 additional
>             problems
>             that can be addressed with alternative and significantly
>             more radical
>             errata or fixed in a new version of YANG.:
>
>             Problem 1: The obvious limitation inherited from Xpath 1.0
>             - inability
>             to escape single or double quote characters. In Xpath
>             world this
>             limitation is worked around by use of concat() which is
>             not available
>             in the YANG 1.1 instance-identifier definition. 2 examples
>             of this
>             limitation:
>
>             1. It is impossible to create value of type
>             instance-identifier
>             referencing nodes in lists with key string values
>             containing both a
>             single and a double quote characters e.g.
>             ...<interface><name>"It's
>             valid string!"</name></interface>.
>
>             2. Another example of the same problem would be a leaf of type
>             instance-identifier referencing another leaf of type
>             instance-identifier. With 2 references it works provided
>             one is
>             encoded with single quotes and the other with double but it is
>             impossible to create third e.g.
>
>             YANG:
>
>                  list id-list {
>                    key "id";
>
>                    leaf id {
>                        type instance-identifier;
>                    }
>                  }
>
>
>
>
> Although the instance-identifier is problematic, it is rarely used at all,
> let alone using it as a list key.
>
> The XPath mixed-quotes problem is well-known, and the suggested
> solution seems to be use the "concat" function
>
>    /foo/bar[name=concat("It's a", ' "valid" string')]
>
> Not very user friendly, is it?

I suspect that this is unlikely to be popular, but I think that it would 
be nice if there was a plan to move away from XPath, and define a YANG 
specific equivalent instead.  Broadly it could follow the same format as 
XPath but be defined against a YANG data tree, and bind to YANG's 
types.  We could get rid of the bits of XPath that aren't really helpful 
or meaningful for YANG, and add in some new functionality/fixes that are 
helpful to solve the YANG specific problems related to path expressions.

Rob