Re: [netmod] [Netconf] YANG library bis model

Robert Wilton <rwilton@cisco.com> Fri, 26 January 2018 09:55 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 CC48812E04A; Fri, 26 Jan 2018 01:55:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.511
X-Spam-Level:
X-Spam-Status: No, score=-14.511 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, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, 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 rK-XZzgcGiFi; Fri, 26 Jan 2018 01:55:36 -0800 (PST)
Received: from aer-iport-3.cisco.com (aer-iport-3.cisco.com [173.38.203.53]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3B2E012D892; Fri, 26 Jan 2018 01:55:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2147; q=dns/txt; s=iport; t=1516960536; x=1518170136; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=VPl0w2MwOd04gBwMZmxqdWZN0JpNnpZRxauaupJwBxY=; b=loyBrxFULDNKUgaqf4BPorpLR1NzBH873EQQXkIl+beYDRkAy3zSdbXe X71fQPWiA5yRKSsUUEOF9S/eH7bZHGCKsm7HMV5/Z27/HBX4aEdkV2T5t +snGjnZ+SqbAjpPdrZ4bz5SeFFTvNo43AzdoEci6Cv3EFDf57GcR5rpIa c=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0B2AQBT+mpa/xbLJq1dGQEBAQEBAQEBAQEBAQcBAQEBAYQodCeDXYsYj1Inl1mCAgoYC4RJTwKCcxQBAQEBAQEBAQJrKIUjAQEBAwEBASEECwEFNhALCxgCAiYCAicwBgEMBgIBAYopCBCyS4FtOopZAQEBAQEBAQEBAQEBAQEBAQEBARoFgQ+DQ4NsghEMgnmDLwEBAoFXgy+CZQWSPIdWigGVZowsh3yPTIgTgTw2IoFQMxoIGxU9giqEWEE3izwsgh0BAQE
X-IronPort-AV: E=Sophos;i="5.46,415,1511827200"; d="scan'208";a="1615223"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jan 2018 09:55:34 +0000
Received: from [10.63.23.78] (dhcp-ensft1-uk-vla370-10-63-23-78.cisco.com [10.63.23.78]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id w0Q9tYln005892; Fri, 26 Jan 2018 09:55:34 GMT
To: Michal Vaško <mvasko@cesnet.cz>, netmod <netmod@ietf.org>, netconf@ietf.org
References: <4f1c-5a6af180-b-5fc7eb00@241510494>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <14c97065-5e5b-2670-6b7b-ee1eb01a8fa1@cisco.com>
Date: Fri, 26 Jan 2018 09:55:33 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2
MIME-Version: 1.0
In-Reply-To: <4f1c-5a6af180-b-5fc7eb00@241510494>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/RKtmwYqI8XkB-U8wYBHuUcaCnMw>
Subject: Re: [netmod] [Netconf] YANG library bis model
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: Fri, 26 Jan 2018 09:55:39 -0000

Hi Michal,

Thanks for raising this.

On 26/01/2018 09:14, Michal Vaško wrote:
> Hello,
>
> we have tried implementing the YANG module ietf-yang-library@2018-01-17.yang from draft-ietf-netconf-rfc7895 and have encountered a problem. I am not completely certain that the issue is with the model and not our XPath evaluator, but based on the definitions I have found I believe the model is wrong.
>
>     module: ietf-yang-library
>       +--ro yang-library
>          +--ro module-set* [name]
>             +--ro module* [name]
>                +--ro name         yang:yang-identifier
>                +--ro deviation* [module]
>                   +--ro module    -> ../../name
>
> In the tree diagram (I have removed irrelevant parts) it can be seen that there is a "deviation" leafref that should point from one "module" list instance to another identifying the deviation module. So, the supposed evaluation should take the following steps: we start with leaf "module" we take ".." path so we get the "deviation" list. Then we take another ".." and we end up with all the "module" list instances. Finally, we try to find "name" leaf in all these instances of the "module" list.
>
> However, our evaluator and some I have found online (all behaving according to XPath definition, I think) proceed differently. At the point of going one step up (parent node) into what es expected to be all the "module" list instances, the context node actually becomes only the *specific module list instance* we have started from, so when looking for the "name" leaf only the name of this list instance is taken into consideration. Needless to say, the evaluation never finds a matching "name" leaf because "module/name" and "module/deviation/module" should never match in one "module" list instance and so the validation always fails.
It looks like the leafref should be "../../../module/name".

Does that fix the issue for you?

Thanks,
Rob


> Kind regards,
> Michal Vasko
>
> _______________________________________________
> Netconf mailing list
> Netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
> .
>