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

Andy Bierman <andy@yumaworks.com> Thu, 29 November 2018 21:52 UTC

Return-Path: <andy@yumaworks.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 2F3EE130DD8 for <netconf@ietfa.amsl.com>; Thu, 29 Nov 2018 13:52:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.359
X-Spam-Level:
X-Spam-Status: No, score=-3.359 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-1.459, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 W0_uef0QD9qx for <netconf@ietfa.amsl.com>; Thu, 29 Nov 2018 13:52:17 -0800 (PST)
Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2465A126DBF for <netconf@ietf.org>; Thu, 29 Nov 2018 13:52:17 -0800 (PST)
Received: by mail-lf1-x12c.google.com with SMTP id p86so2621565lfg.5 for <netconf@ietf.org>; Thu, 29 Nov 2018 13:52:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=KiY69rIXCXzKRMg3JlU/qgQnPsy4EROj1fKEyUUDr3Y=; b=zAsGygADGF6JDvClGZ7jptf7n8G8pEoa8SENtQljJDuN/hkGRHbJig36mkYIl9yPhr BUDiZnn+ZHQ65o/ar/r9ohL0s1L8wpxwPj6EA3/2afpX6TnNfvn+gLCmE5s5+TEDLnOZ BhGIsZTDcSm6fs69bf9hfFoUgWJaZBuv+d/DAiPIZvVBqswLjFySwqlOkAviYTg5Fgo8 pjMt6riiVBZ9SEWeGRE7yVfvnHEl6nSBYEcDIlRSUV3aarfQ3Tk9Xk9f9yoBeEG0+y6E JKVeniz2xtY48rmo6KSTD2lrziUfl3wEiFu0hUy8HNr/FtWh6VEUBbPVJJsvdR+ZMNoE 3k7g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=KiY69rIXCXzKRMg3JlU/qgQnPsy4EROj1fKEyUUDr3Y=; b=p9ADfe0s0GtUF7aCL5r/pJZylX4XxfrcNv7AMbl27BtNr6J4SeeSwqDq+xgV5jPc6j ws2yQETy3XOZ/Jx60dYbIVM1Wil/tXpUf3VZXSUo8hoXYLfVBfijIBzZbgoqPERdaz50 keBrWeYk8XNQMeUfZ3F7L+cUZIjjlZKVX4yv5juYUlfAKS4HAjsRHxma0NT14t83qEu1 cnh24JYswnByMNGljolGmgdYXnFDsAXuPWwtM3+eEvKmPYnCF5yASLi3oUC7nEFwcoKc gnlRMtcJnnsyl0L4AhA4xEJTl7/rwKVntu8NUaRL26RxHD8L6bM5lnNtcONH/bJiz41W PgrA==
X-Gm-Message-State: AA+aEWZAzKp2ARqen7daUbBE1PcG4RONHWWhuGy5PaXll4OA+4b5AM6d 3BwFg5IhwhPijssH5KB2ke3XwC8iA3q5iNpGvtEPX6X3oD0=
X-Google-Smtp-Source: AFSGD/UN/bYF2RlwrM5fkgg+JQprblmHOWTnJnoml5ayzHKTGca0w5pLcNMVmzrgIEyWUYwJyz/hGHXCv9V3Ki7ihuI=
X-Received: by 2002:a19:d58e:: with SMTP id m136mr2253447lfg.70.1543528334556; Thu, 29 Nov 2018 13:52:14 -0800 (PST)
MIME-Version: 1.0
References: <CABCOCHRAa91=S2fx7+gZZwZiNq5byC7HSoR4Sm+Ogk7GMKK0Vg@mail.gmail.com> <CABCOCHTEQ9B31S9V6Kv+XuE4ZRNXNx1wQeYeJ06pvJZhb87taA@mail.gmail.com>
In-Reply-To: <CABCOCHTEQ9B31S9V6Kv+XuE4ZRNXNx1wQeYeJ06pvJZhb87taA@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 29 Nov 2018 13:52:03 -0800
Message-ID: <CABCOCHSBoXYtUcOPJqNkUvzx2GFX9w5=-N1J66sz4m8S=HFFtg@mail.gmail.com>
To: Netconf <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000151937057bd4b26d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/eNG4QBOVzvicD4kvbQ6TAx2tHBU>
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:52:20 -0000

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> wrote:

>
>
> On Wed, Nov 28, 2018 at 2:48 PM Andy Bierman <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
>
>