Subject: First pre-release of -09 Notifications

From: "Sharon Chisholm" <[email-masked]>
Date: Wed, 25 Jul 2007 13:07:01 -0400

Hi

Here is a partial update of the Notification draft with change bars from
-08.  I think in this afternoon's editing session, I'd like to start
with the examples in section 5 since this seems to historically been
tricky to get right.

Sharon Chisholm
Nortel 
Ottawa, Ontario
Canada

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 26 Jul 2007 01:56:13 +0200 (CEST)

Hi,

Here's my list of suggested edits to the draft:

----------------------
3.2.5.1 example:

 <rpc message-id="101"
    xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

   <get>
    <filter type="subtree">
      <eventStreams xmlns="urn:ietf:params:xml:ns:netmod:notification"/>
    </filter>
   </get>
 </rpc>

is missing the netconf top-level node, and should be

 <rpc message-id="101"
      xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
   <get>
    <filter type="subtree">
      <netconf xmlns="urn:ietf:params:xml:ns:netmod:notification">
        <eventStreams/>
      <netconf>
    </filter>
   </get>
 </rpc>

and the reply should be:

<rpc-reply message-id="101"
           xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <data>
   <netconf xmlns="urn:ietf:params:xml:ns:netmod:notification">
     <eventStreams>
        <stream>
           <name>NETCONF</name>
           <description>Default netconf event stream</description>
           <replaySupport>true</replaySupport>
           <replayLogStartTime>2007-07-08T00:00:00Z</replayLogStartTime>
        </stream>
        <stream>
           <name>SNMP</name>
           <description>SNMP notifications</description>
           <replaySupport>false</replaySupport>
        </stream>
        <stream>
          <name>syslog-critical</name>
          <description>Critical and higher severity</description>
          <replaySupport>true</replaySupport>
          <replayLogStartTime>2007-07-01T00:00:00Z</replayLogStartTime>
        </stream>
      </eventStreams>
    </netconf>
  </data>
</rpc-reply>

-----------------------

second example in 5.2:

weird example, since it always evaluates to false.  a better example
might be:

   ( state | config |
     ( fault & ( severity=critical | severity=major |
                 severity = minor | card=Ethernet0)))

   <netconf:rpc netconf:message-id="101"
         xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
      <create-subscription
            xmlns="urn:ietf:params:netconf:capability:notification:1.0">
         <filter netconf:type="xpath"
                xmlns:ex="http://example.com/event/1.0"
                select="/ex:event[
                    ex:eventClass='state' or
                    ex:eventClass='config' or
                    (ex:eventClass='fault' and 
                       (ex:severity='minor' or
                        ex:severity='major' or
                        ex:severity='critical' or
                        ex:reportingEntity/ex:card='Ethernet0'))]/>
     </create-subscription>
   </netconf:rpc>

--------------

At the editing session, we said that maybe it would be good to include
an example XSD which describes how the example <event> is defined.

Here's one such XSD.  Note that I tried to simplify things by using
string types w/o enumeration restrictions.  If we include this, it
must be very clear that this is just an example.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://example.com/event/1.0"
	   xmlns="http://example.com/event/1.0"
	   elementFormDefault="qualified"
	   xmlns:xs="http://www.w3.org/2001/XMLSchema"
	   xmlns:ncEvent="urn:ietf:params:netconf:capability:notification:1.0">

  <xs:complexType name="eventType">
    <xs:complexContent>
      <xs:extension base="ncEvent:NotificationContentType">
	<xs:sequence>
	  <xs:element name="eventClass"/>
	  <xs:element name="reportingEntity">
	    <xs:complexType>
	      <xs:sequence>
		<xs:any namespace="##any" processContents="lax"/>
	      </xs:sequence>
	    </xs:complexType>
	  </xs:element>
	  <xs:choice>
	    <xs:element name="severity"/>
	    <xs:element name="operState"/>
	  </xs:choice>
	</xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name="event"
	      type="eventType"
	      substitutionGroup="ncEvent:notificationContent"/>

</xs:schema>

/martin

--
to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>