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

From: Martin Bjorklund <[email-masked]>
Date: Mon, 03 Nov 2014 09:03:40 +0100 (CET)

[email-masked] wrote:
>  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.

See RFC 5277, Section 3.6:

   If a filter element is specified to look for data of a particular
   value, and the data item is not present within a particular event
   notification for its value to be checked against, the notification
   will be filtered out.

The idea is that if the filter would select *any* node in an event,
then the event is sent, in its entirety.  Thus, the filter acts a
boolean switch, whether to send the event or not.

/martin

> 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.

---

From: Qin Wu <[email-masked]>
Date: Mon, 3 Nov 2014 08:47:06 +0000

You seems to give an example on sending event notification in response to create subscription.
But that is not the example described in RFC5277 or RFC6241.
Also I fail to understand your following statement
“
"filter" statement is only used as judgment to meet the requirements of the rules,it does not act on output.
”

Regards!
-Qin
发件人: Netconf [mailto:[email-masked]] 代表 [email-masked]
发送时间: 2014年11月1日 12:32
收件人: [email-masked]; [email-masked]; [email-masked]; [email-masked]
抄送: [email-masked]; [email-masked]
主题: [Netconf] some issues ,like subtree filtering(RFC5277 & RFC6241 )

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.

The filtering criteria evaluation is as follows:( state | config | ( fault & ( card=Ethernet0)))
subscription like this:

<notification

In accordance with RFC6241 rules, the second notification "<severity>major</severity>" should be skipped.
<notification

<notification

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

Is it reasonable?