Re: [Netconf] Invalid when-stmts in yang-push

"Reshad Rahman (rrahman)" <rrahman@cisco.com> Mon, 07 January 2019 20:52 UTC

Return-Path: <rrahman@cisco.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 76C4F124D68 for <netconf@ietfa.amsl.com>; Mon, 7 Jan 2019 12:52:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
X-Spam-Status: No, score=-14.501 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, 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, 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 4hx_7NnIAsgQ for <netconf@ietfa.amsl.com>; Mon, 7 Jan 2019 12:52:06 -0800 (PST)
Received: from alln-iport-7.cisco.com (alln-iport-7.cisco.com [173.37.142.94]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E9C9E126DBF for <netconf@ietf.org>; Mon, 7 Jan 2019 12:52:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=25676; q=dns/txt; s=iport; t=1546894326; x=1548103926; h=from:to:subject:date:message-id:references:in-reply-to: mime-version; bh=eh1uyKS+8ibifypaFZxPi13XwtaeYg1rXi9U5GftVKY=; b=lV21Pkhmm8tqiHErN9zudl8f7vackS3s37HC6bqRqw9e0FnS+d4UJL/r cynlI46011kK8cvDcRn+CNtGhBEWyoUo0rbXrXp6NRfpzS72cQgkdCV8A flkaPC2m0PIjECXJajcLHtpjayaDbKONosN/WFJm73pzKHuhDN3uOfGAc E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AOAABWuzNc/49dJa1iGQEBAQEBAQEBAQEBAQcBAQEBAQGBUwIBAQEBAQsBgQ1NKWaBAicKg3VikyOCDZdugXsLAQEshEACF4FtIjYHDQEDAQECAQECbSiFSgEBAQMBIwpRCwIBCA4DAwEBAQ4aAwICAjAUCQgCBAESgyIBgR1cCKc2gS+EAgGGLIw/F4FAP4E4H4IXNYUhFoJSMYImAo9QhmGLKwkCkW8YgWCQD4ligQePLQIRFIEnJgonKIEucBVlAYJBgz4BAoxkATZygSiHDyuBAQGBHgEB
X-IronPort-AV: E=Sophos;i="5.56,451,1539648000"; d="scan'208,217";a="222148311"
Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by alln-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2019 20:52:04 +0000
Received: from XCH-RCD-013.cisco.com (xch-rcd-013.cisco.com [173.37.102.23]) by rcdn-core-7.cisco.com (8.15.2/8.15.2) with ESMTPS id x07Kq4lV031749 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 7 Jan 2019 20:52:04 GMT
Received: from xch-rcd-005.cisco.com (173.37.102.15) by XCH-RCD-013.cisco.com (173.37.102.23) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 7 Jan 2019 14:52:03 -0600
Received: from xch-rcd-005.cisco.com ([173.37.102.15]) by XCH-RCD-005.cisco.com ([173.37.102.15]) with mapi id 15.00.1395.000; Mon, 7 Jan 2019 14:52:03 -0600
From: "Reshad Rahman (rrahman)" <rrahman@cisco.com>
To: Kent Watsen <kwatsen@juniper.net>, "Eric Voit (evoit)" <evoit@cisco.com>, Andy Bierman <andy@yumaworks.com>, Netconf <netconf@ietf.org>, Alexander Clemm <alexander.clemm@huawei.com>
Thread-Topic: [Netconf] Invalid when-stmts in yang-push
Thread-Index: AQHUh2x/zk0bfMMCME+lG5NHch9JpaVmMviAgAF+SoCAAAGdgIA9MKAA//+0GoA=
Date: Mon, 07 Jan 2019 20:52:03 +0000
Message-ID: <A4F20517-7CFB-44F7-A340-B9123B76B30D@cisco.com>
References: <CABCOCHRAa91=S2fx7+gZZwZiNq5byC7HSoR4Sm+Ogk7GMKK0Vg@mail.gmail.com> <CABCOCHTEQ9B31S9V6Kv+XuE4ZRNXNx1wQeYeJ06pvJZhb87taA@mail.gmail.com> <CABCOCHSBoXYtUcOPJqNkUvzx2GFX9w5=-N1J66sz4m8S=HFFtg@mail.gmail.com> <47f53bf89c404a04a837ea5875b04990@XCH-RTP-013.cisco.com> <B01D40F7-31A3-42C7-9F4C-8C4373ED5F1E@juniper.net>
In-Reply-To: <B01D40F7-31A3-42C7-9F4C-8C4373ED5F1E@juniper.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.10.5.181209
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [161.44.212.43]
Content-Type: multipart/alternative; boundary="_000_A4F205177CFB44F7A340B9123B76B30Dciscocom_"
MIME-Version: 1.0
X-Outbound-SMTP-Client: 173.37.102.23, xch-rcd-013.cisco.com
X-Outbound-Node: rcdn-core-7.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/U62RQkIe260TJWnNFrWY1gaFiv0>
Subject: Re: [Netconf] Invalid when-stmts in yang-push
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 07 Jan 2019 20:52:10 -0000

FYI, this is also causing validation of the examples in netconf-notif to fail (doing this as part of YD review).


err : When condition "../ietf-subscribed-notifications:target/ietf-yang-push:datastore" not satisfied. (/ietf-subscribed-notifications:modify-subscription/ietf-yang-push:periodic)

Regards,
Reshad.

From: Netconf <netconf-bounces@ietf.org> on behalf of Kent Watsen <kwatsen@juniper.net>
Date: Monday, January 7, 2019 at 3:24 PM
To: "Eric Voit (evoit)" <evoit@cisco.com>, 'Andy Bierman' <andy@yumaworks.com>, Netconf <netconf@ietf.org>, Alexander Clemm <alexander.clemm@huawei.com>
Subject: Re: [Netconf] Invalid when-stmts in yang-push

Hi Alex,

Have you had a chance to look at this issue yet?  The assigned YANG Doctor says that they immediately stumbled on this error and is waiting for an update with a valid module before proceeding with the review.

PS: All authors should integrate the validation of YANG modules and examples as part of the `xml2rfc` build process.  Also recommended is dynamic generation of the tree diagrams, and execution of the `idnits` tool.  The time it takes to set this up in the beginning is easily recovered over the course of the draft’s lifetime.  Remember, it’s not just your time, but also the time of everyone else that runs into these issues, and then the slow restart times (this thread is an example of that).

Kent // shepherd/chair


On 11/29/18, 4:58 PM, "Netconf on behalf of Eric Voit (evoit)" <netconf-bounces@ietf.org<mailto:netconf-bounces@ietf.org> on behalf of evoit@cisco.com<mailto:evoit@cisco.com>> wrote:

Thanks Andy.   Adding Alex to make the change.

Eric

From: Netconf <netconf-bounces@ietf.org> On Behalf Of Andy Bierman
Sent: Thursday, November 29, 2018 4:52 PM
To: Netconf <netconf@ietf.org>
Subject: Re: [Netconf] Invalid when-stmts in yang-push

Hi,

I think this diff fixes the yang-push module.
It looks like the augment to modify-subscription used the wrong grouping
because the 'datastore' leaf was missing.

365c365
<       when "../sn:target/yp:datastore";
---
>       when "yp:datastore";
572c572
<     when "sn:target/yp:datastore";
---
>     when "yp:datastore";
616c616
<     when "sn:target/yp:datastore";
---
>     when "yp:datastore";
632c632
<       uses selection-filter-objects;
---
>       uses datastore-criteria;
816c816
<     when "sn:target/yp:datastore";
---
>     when "yp:datastore";


Andy



On Wed, Nov 28, 2018 at 3:03 PM Andy Bierman <andy@yumaworks.com<mailto:andy@yumaworks.com>> wrote:

On Wed, Nov 28, 2018 at 2:48 PM Andy Bierman <andy@yumaworks.com<mailto:andy@yumaworks.com>> wrote:
Hi,

During implementation of yang-push-20 our developer found that
the when-stmts for establish-subscription are always false.


E.g. line 365:
    choice update-trigger {
      when "../sn:target/yp:datastore";

The node 'target' is a choice. The node 'datastore' is a case.
Since the when-stmt is looking for data nodes not schema nodes,
the node-set is always empty.


There are 4 occurrences:

Warning: no child node 'ietf-subscribed-notifications:target' found for parent 'ietf-subscribed-notifications:subscriptions'
XPath: ../sn:target/yp:datastore
ietf-yang-push.yang:365.15: warning(1032): no child node available

Warning: no child node 'ietf-subscribed-notifications:target' found for parent 'ietf-subscribed-notifications:input'
XPath: sn:target/yp:datastore
ietf-yang-push.yang:572.10: warning(1032): no child node available

Warning: no child node 'ietf-subscribed-notifications:target' found for parent 'ietf-subscribed-notifications:input'
XPath: sn:target/yp:datastore
ietf-yang-push.yang:616.10: warning(1032): no child node available

Warning: no child node 'ietf-subscribed-notifications:target' found for parent 'ietf-subscribed-notifications:subscription'
XPath: sn:target/yp:datastore
ietf-yang-push.yang:816.10: warning(1032): no child node available



pyang is also reporting these warnings:

ietf-yang-push.yang:365: warning: XPath for "../sn:target/yp:datastore" does not exist
ietf-yang-push.yang:572: warning: XPath for "sn:target/yp:datastore" does not exist
ietf-yang-push.yang:616: warning: XPath for "sn:target/yp:datastore" does not exist
ietf-yang-push.yang:816: warning: XPath for "sn:target/yp:datastore" does not exist


Andy