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

"Eric Voit (evoit)" <evoit@cisco.com> Thu, 29 November 2018 21:57 UTC

Return-Path: <evoit@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 DBAD51276D0 for <netconf@ietfa.amsl.com>; Thu, 29 Nov 2018 13:57:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.959
X-Spam-Level:
X-Spam-Status: No, score=-15.959 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-1.459, 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 xQig8ld3TXA7 for <netconf@ietfa.amsl.com>; Thu, 29 Nov 2018 13:57:52 -0800 (PST)
Received: from alln-iport-5.cisco.com (alln-iport-5.cisco.com [173.37.142.92]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C957F126DBF for <netconf@ietf.org>; Thu, 29 Nov 2018 13:57:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=18028; q=dns/txt; s=iport; t=1543528671; x=1544738271; h=from:to:subject:date:message-id:references:in-reply-to: mime-version; bh=m2tc4Kw4OjEooR+QNDsXysqVg+z3VS4wgiA2RxPlJ6E=; b=cbtvo3s9xG6dj90/9vEgV/+0WqOzA3p+ySz1NIC2e3o6v29mQa/+yLBF XYqncLZWv4lEhYN5QI7HUFPL5OcY33DMLNl3j795h644wojrsK/mrdCxG lgJpEye9K0Qae3DkHXWdSbWX8oWUiin/c7yv0MyJzWPRId+i1eVZ+VQH8 M=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AFAADCXwBc/5tdJa1lGgEBAQEBAgEBAQEHAgEBAQGBUQUBAQEBCwGBDXZmgQInCoNvYoc2jAmCDZFvhVWBegsBAYRsAheDGyI0CQ0BAwEBAgEBAm0ohTwBAQEBAgEjClELAgEIEQQBAQ4aAwICAjAUCQgCBAESCIMagR1cCKlVgS+KL4wWF4FAP4NuNYU3gk6CVwKPDpEVCQKRKCCBWo9CiHiBA44sAhEUgScfOCeBLnAVgyeQW0ExjSeBHwEB
X-IronPort-AV: E=Sophos;i="5.56,296,1539648000"; d="scan'208,217";a="205724660"
Received: from rcdn-core-4.cisco.com ([173.37.93.155]) by alln-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2018 21:57:50 +0000
Received: from XCH-RTP-011.cisco.com (xch-rtp-011.cisco.com [64.101.220.151]) by rcdn-core-4.cisco.com (8.15.2/8.15.2) with ESMTPS id wATLvola019267 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 29 Nov 2018 21:57:50 GMT
Received: from xch-rtp-013.cisco.com (64.101.220.153) by XCH-RTP-011.cisco.com (64.101.220.151) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 29 Nov 2018 16:57:49 -0500
Received: from xch-rtp-013.cisco.com ([64.101.220.153]) by XCH-RTP-013.cisco.com ([64.101.220.153]) with mapi id 15.00.1395.000; Thu, 29 Nov 2018 16:57:49 -0500
From: "Eric Voit (evoit)" <evoit@cisco.com>
To: 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: AQHUiC3Du/bbRFCgzEGjM3117QLHTqVnTIUQ
Date: Thu, 29 Nov 2018 21:57:49 +0000
Message-ID: <47f53bf89c404a04a837ea5875b04990@XCH-RTP-013.cisco.com>
References: <CABCOCHRAa91=S2fx7+gZZwZiNq5byC7HSoR4Sm+Ogk7GMKK0Vg@mail.gmail.com> <CABCOCHTEQ9B31S9V6Kv+XuE4ZRNXNx1wQeYeJ06pvJZhb87taA@mail.gmail.com> <CABCOCHSBoXYtUcOPJqNkUvzx2GFX9w5=-N1J66sz4m8S=HFFtg@mail.gmail.com>
In-Reply-To: <CABCOCHSBoXYtUcOPJqNkUvzx2GFX9w5=-N1J66sz4m8S=HFFtg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.118.56.234]
Content-Type: multipart/alternative; boundary="_000_47f53bf89c404a04a837ea5875b04990XCHRTP013ciscocom_"
MIME-Version: 1.0
X-Outbound-SMTP-Client: 64.101.220.151, xch-rtp-011.cisco.com
X-Outbound-Node: rcdn-core-4.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/h_e7puKlPxCxJ4AEBGjsWMesr1o>
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: Thu, 29 Nov 2018 21:57:55 -0000

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