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

From: Andy Bierman <[email-masked]>
Date: Wed, 28 Nov 2018 14:48:06 -0800

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

---

From: Andy Bierman <[email-masked]>
Date: Wed, 28 Nov 2018 15:03:47 -0800

> 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

---

From: Andy Bierman <[email-masked]>
Date: Thu, 29 Nov 2018 13:52:03 -0800

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

---

From: "Eric Voit (evoit)" <[email-masked]>
Date: Thu, 29 Nov 2018 21:57:49 +0000

Thanks Andy.   Adding Alex to make the change.

Eric

From: Netconf <[email-masked]> On Behalf Of Andy Bierman
Sent: Thursday, November 29, 2018 4:52 PM
To: Netconf <[email-masked]>
Subject: Re: [Netconf] Invalid when-stmts in yang-push

Hi,

365c365
572c572
616c616
632c632
816c816

Andy

On Wed, Nov 28, 2018 at 3:03 PM Andy Bierman <[email-masked]<mailto:[email-masked]>> wrote:

On Wed, Nov 28, 2018 at 2:48 PM Andy Bierman <[email-masked]<mailto:[email-masked]>> wrote:
Hi,

E.g. line 365:
    choice update-trigger {

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

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