Subject: [Netconf] some issues ,like subtree filtering(RFC5277 & RFC6241 )

From: [email-masked]
Date: Sat, 1 Nov 2014 12:32:12 +0800

RFC5277 editors:

On RFC5277, The fifth section does not provide definition, just provides 
some simple examples to illustrate the various
   methods of filtering content on an event notification subscription.
 
I want to know, about subtree filtering whether there is a correlation 
between RFC6241 (Chapter 6)and RFC5277 (Chapter 5).
In my opinion, the two are in conflict.And I am confused.

Here are some specific questions.
1.RFC5277,Chapter 5
notification example defines like this:
event container
  |-----eventClass         leaf enum
  |-----reportingEntity    anyxml
  |-----choice
           |-------severity  leaf enum
           |-------operState leaf enum/boolean
 
The filtering criteria evaluation is as follows:( state | config | ( fault 
& ( card=Ethernet0))) 
subscription like this:
<netconf:rpc netconf:message-id="101"
xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
<create-subscription
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<filter netconf:type="subtree">
   <event xmlns="http://example.com/event/1.0">
      <eventClass>state</eventClass>
   </event>
   <event xmlns="http://example.com/event/1.0">
      <eventClass>config</eventClass>
   </event>
   <event xmlns="http://example.com/event/1.0">
      <eventClass>fault</eventClass>
      <reportingEntity>
         <card>Ethernet0</card>
      </reportingEntity>
    </event>
</filter>
</create-subscription>
</netconf:rpc>

If some service-reported notifications like these:
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
   <eventTime>2007-07-08T00:10:00Z</eventTime>
   <event xmlns="http://example.com/event/1.0">
      <eventClass>state</eventClass>
      <reportingEntity>
         <card>Ethernet1</card>
      </reportingEntity>
      <severity>major</severity>
</event>
</notification>

<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
   <eventTime>2007-07-08T00:10:00Z</eventTime>
   <event xmlns="http://example.com/event/1.0">
      <eventClass>fault</eventClass>
      <reportingEntity>
         <card>Ethernet0</card>
      </reportingEntity>
      <severity>major</severity>
</event>
</notification>

In accordance with RFC6241 rules, the second notification 
"<severity>major</severity>" should be skipped.
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
   <eventTime>2007-07-08T00:10:00Z</eventTime>
   <event xmlns="http://example.com/event/1.0">
      <eventClass>state</eventClass>
      <reportingEntity>
         <card>Ethernet1</card>
      </reportingEntity>
      <severity>major</severity>
</event>
</notification>

<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
   <eventTime>2007-07-08T00:10:00Z</eventTime>
   <event xmlns="http://example.com/event/1.0">
      <eventClass>fault</eventClass>
      <reportingEntity>
         <card>Ethernet0</card>
      </reportingEntity>
</event>
</notification>

As previous implementations, "filter" statement is only used as judgment 
to meet the requirements of the rules,it does not act on output.

2.subscription like this:
<netconf:rpc netconf:message-id="101"
xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
<create-subscription
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<filter netconf:type="subtree">
   <event xmlns="http://example.com/event/1.0">
      <eventClass/>
   </event>
</filter>
</create-subscription>
</netconf:rpc>

In accordance with RFC6241 rules, the expected output like this:
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
   <eventTime>2007-07-08T00:10:00Z</eventTime>
   <event xmlns="http://example.com/event/1.0">
      <eventClass>fault</eventClass>
</event>
</notification>

Is it reasonable?

--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s).  If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited.  If you have received this mail in error, please delete it and notify us immediately.
--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s).  If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited.  If you have received this mail in error, please delete it and notify us immediately.