Subject: [Netconf] Question on notification filtering with RFC5277

From: "Beauville, Yves (Nokia - BE/Antwerp)" <[email-masked]>
Date: Wed, 16 Jan 2019 09:39:03 +0000

Hello,

Can anyone help me with the following?

I am managing a NETCONF server that implements RFC5277 (NETCONF Event 
Notifications)
and RFC6470 (NETCONF Base Notifications).

I would like to know if it is possible to create a notification 
subscription
to receive notifications of type 'netconf-config-change' for a SPECIFIC 
SUBTREE
of the data model implemented by the server.

Let's say that in addition to RFC5277 and RFC6470, the server implements 
the
following dummy YANG module:

      module example-foo {
        yang-version 1.1;
        namespace "urn:example:foo";
        prefix "foo";

        container container-a {
          // some data
          }

        container container-b {
          // some data
          }

      }

I would like to receive notifications of type 'netconf-config-change', but
only for changes happening in 'container-b'.

First, I need to filter notifications of type 'netconf-config-change'. 
Something like:

         <create-subscription
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
           <filter type="xpath"
xmlns:ncn="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"
              select="/ncn:netconf-config-change"/>
         </create-subscription>

The 'netconf-config-change' notification contains a list of edits 
defined as follows:

      notification netconf-config-change {
        list edit {
          leaf target {
            type instance-identifier;

Question: Is it possible to refine the above filter to only subscribe 
for notifications
having a 'target' in 'container-b' of the 'example-foo' YANG module?

Thanks
Yves Beauville