RFC 5277
RFC 5277
Chisholm
Request for Comments: 5277 Nortel
Category: Standards Track H. Trevino
Cisco
July 2008
Abstract
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Definition of Terms . . . . . . . . . . . . . . . . . . . 3
1.2. Motivation . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3. Event Notifications in NETCONF . . . . . . . . . . . . . . 5
2. Notification-Related Operations . . . . . . . . . . . . . . . 5
2.1. Subscribing to Receive Event Notifications . . . . . . . . 5
2.1.1. <create-subscription> . . . . . . . . . . . . . . . . 6
2.2. Sending Event Notifications . . . . . . . . . . . . . . . 9
2.2.1. <notification> . . . . . . . . . . . . . . . . . . . . 9
2.3. Terminating the Subscription . . . . . . . . . . . . . . . 9
3. Supporting Concepts . . . . . . . . . . . . . . . . . . . . . 10
3.1. Capabilities Exchange . . . . . . . . . . . . . . . . . . 10
3.1.1. Capability Identifier . . . . . . . . . . . . . . . . 10
3.1.2. Capability Example . . . . . . . . . . . . . . . . . . 10
3.2. Event Streams . . . . . . . . . . . . . . . . . . . . . . 10
3.2.1. Event Stream Definition . . . . . . . . . . . . . . . 12
3.2.2. Event Stream Content Format . . . . . . . . . . . . . 12
3.2.3. Default Event Stream . . . . . . . . . . . . . . . . . 12
3.2.4. Event Stream Sources . . . . . . . . . . . . . . . . . 12
3.2.5. Event Stream Discovery . . . . . . . . . . . . . . . . 12
3.3. Notification Replay . . . . . . . . . . . . . . . . . . . 15
3.3.1. Overview . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.2. Creating a Subscription with Replay . . . . . . . . . 16
3.4. Notification Management Schema . . . . . . . . . . . . . . 16
3.5. Subscriptions Data . . . . . . . . . . . . . . . . . . . . 20
3.6. Filter Mechanics . . . . . . . . . . . . . . . . . . . . . 20
3.6.1. Filtering . . . . . . . . . . . . . . . . . . . . . . 20
3.7. Message Flow . . . . . . . . . . . . . . . . . . . . . . . 20
4. XML Schema for Event Notifications . . . . . . . . . . . . . . 22
5. Filtering Examples . . . . . . . . . . . . . . . . . . . . . . 26
5.1. Subtree Filtering . . . . . . . . . . . . . . . . . . . . 28
5.2. XPATH Filters . . . . . . . . . . . . . . . . . . . . . . 29
6. Interleave Capability . . . . . . . . . . . . . . . . . . . . 30
6.1. Description . . . . . . . . . . . . . . . . . . . . . . . 30
6.2. Dependencies . . . . . . . . . . . . . . . . . . . . . . . 30
6.3. Capability Identifier . . . . . . . . . . . . . . . . . . 30
6.4. New Operations . . . . . . . . . . . . . . . . . . . . . . 31
6.5. Modifications to Existing Operations . . . . . . . . . . . 31
7. Security Considerations . . . . . . . . . . . . . . . . . . . 31
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 33
10. Normative References . . . . . . . . . . . . . . . . . . . . . 33
1. Introduction
Layer Example
+-------------+ +-------------------------------------------+
| Content | | Configuration data |
+-------------+ +-------------------------------------------+
| |
+-------------+ +-------------------------------------------+
| Operations | |<get-config>, <edit-config>, <notification>|
+-------------+ +-------------------------------------------+
| | |
+-------------+ +-----------------------------+ |
| RPC | | <rpc>, <rpc-reply> | |
+-------------+ +-----------------------------+ |
| | |
+-------------+ +-------------------------------------------+
| Transport | | BEEP, SSH, SSL, console |
| Protocol | | |
+-------------+ +-------------------------------------------+
Figure 1
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].
1.2. Motivation
2. Notification-Related Operations
2.1.1. <create-subscription>
Description:
Parameters:
Stream:
Filter:
Start Time:
Stop Time:
Positive Response:
If the NETCONF server can satisfy the request, the server sends an
<ok> element.
Negative Response:
Tag: missing-element
Error-type: protocol
Severity: error
Tag: operation-failed
Error-type: protocol
Severity: error
Error-info: none
Tag: bad-element
Error-type: protocol
Severity: error
Tag: bad-element
Error-type: protocol
Severity: error
<netconf:rpc 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">
</create-subscription>
</netconf:rpc>
Once the subscription has been set up, the NETCONF server sends the
event notifications asynchronously over the connection.
2.2.1. <notification>
Description:
Parameters:
eventTime
The time the event was generated by the event source. This
parameter is of type dateTime and compliant to [RFC3339].
Implementations must support time zones.
Response:
3. Supporting Concepts
"urn:ietf:params:netconf:capability:notification:1.0"
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>
urn:ietf:params:xml:ns:netconf:base:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:startup:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:notification:1.0
</capability>
</capabilities>
<session-id>4</session-id>
</hello>
At some point after the NETCONF server receives the internal event
from a stream, it is converted to an appropriate XML encoding by the
server, and a <notification> element is ready to send to all NETCONF
sessions subscribed to that stream.
+----+
| c1 |----+ available streams
+----+ | +---------+
+----+ | |central |-> stream 1
| c2 | +--->|event |-> stream 2 filter +-------+
+----+ | |processor|-> NETCONF stream ----->|NETCONF|
... | | |-> stream n |server |
System | +---------+ +-------+
Components| | /\
... | | ||
+----+ | | (------------) ||
| cn |----+ | (notification) ||
+----+ +-----> ( logging ) ||
( service ) ||
(------------) ||
||
||
\/
+-------+
|NETCONF|
|client |
+-------+
Figure 2
<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">
<streams/>
</netconf>
</filter>
</get>
</rpc>
<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">
<streams>
<stream>
<name>NETCONF</name>
<description>default NETCONF event stream
</description>
<replaySupport>true</replaySupport>
<replayLogCreationTime>
2007-07-08T00:00:00Z
</replayLogCreationTime>
</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>
<replayLogCreationTime>
2007-07-01T00:00:00Z
</replayLogCreationTime>
</stream>
</streams>
</netconf>
</data>
</rpc-reply>
A NETCONF client may request from the NETCONF server the list of
event streams available to this session and then issue a <create-
subscription> request with the desired event stream name. Omitting
the event stream name from the <create-subscription> request results
in subscription to the default NETCONF event stream.
3.3.1. Overview
Note that <startTime> and <stopTime> are associated with the time an
event was generated by the event source.
This Schema is used to learn about the event streams supported on the
system. It also contains the definition of the <replayComplete> and
<notificationComplete> notifications, which are sent to indicate that
an event replay has sent all applicable notifications and that the
subscription has terminated, respectively.
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<xs:import namespace="urn:ietf:params:xml:ns:netconf:base:1.0"
schemaLocation="netconf.xsd"/>
<xs:import namespace=
"urn:ietf:params:xml:ns:netconf:notification:1.0"
schemaLocation="notification.xsd"/>
<xs:complexType name="Netconf">
<xs:sequence>
<xs:element name="streams" >
<xs:annotation>
<xs:documentation>
The list of event streams supported by the
system. When a query is issued, the returned
set of streams is determined based on user
privileges.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="stream">
<xs:annotation>
<xs:documentation>
Stream name, description, and other information.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="name"
type="ncEvent:streamNameType">
<xs:annotation>
<xs:documentation>
The name of the event stream. If this is
the default NETCONF stream, this must have
the value "NETCONF".
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="description"
type="xs:string">
<xs:annotation>
<xs:documentation>
A description of the event stream, including
such information as the type of events that
are sent over this stream.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="replaySupport"
type="xs:boolean">
<xs:annotation>
<xs:documentation>
An indication of whether or not event replay
is available on this stream.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="replayLogCreationTime"
type="xs:dateTime" minOccurs="0">
<xs:annotation>
<xs:documentation>
The timestamp of the creation of the log
used to support the replay function on
this stream.
Note that this might be earlier then
the earliest available
notification in the log. This object
is updated if the log resets
for some reason. This
object MUST be present if replay is
supported.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="replayLogAgedTime"
type="xs:dateTime" minOccurs="0">
<xs:annotation>
<xs:documentation>
The timestamp of the last notification
aged out of the log. This
object MUST be present if replay is
supported and any notifications
have been aged out of the log.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReplayCompleteNotificationType">
<xs:complexContent>
<xs:extension base="ncEvent:NotificationContentType"/>
</xs:complexContent>
</xs:complexType>
<xs:element name="replayComplete"
type="manageEvent:ReplayCompleteNotificationType"
substitutionGroup="ncEvent:notificationContent">
<xs:annotation>
<xs:documentation>
This notification is sent to signal the end of a replay
portion of a subscription.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="NotificationCompleteNotificationType">
<xs:complexContent>
<xs:extension base="ncEvent:NotificationContentType"/>
</xs:complexContent>
</xs:complexType>
<xs:element name="notificationComplete"
type="manageEvent:NotificationCompleteNotificationType"
substitutionGroup="ncEvent:notificationContent">
<xs:annotation>
<xs:documentation>
This notification is sent to signal the end of a
</xs:schema>
For subtree filtering, a non-empty node set means that the filter
matches. For XPath filtering, the mechanisms defined in [XPATH]
should be used to convert the returned value to boolean.
3.6.1. Filtering
C S
| |
| capability exchange |
|-------------------------->|
|<------------------------->|
| |
| <create-subscription> | (startTime)
|-------------------------->|
|<--------------------------|
| <rpc-reply> |
| |
| <notification> |
|<--------------------------|
| |
| <notification> |
|<--------------------------|
| <notification> | (replayComplete)
|<--------------------------|
| |
| |
| |
| <notification> |
|<--------------------------|
| |
| |
| <notification> |
|<--------------------------|
| |
| |
Figure 3
C S
| |
| capability exchange |
|-------------------------->|
|<------------------------->|
| |
| <create-subscription> | (startTime,
|-------------------------->| stopTime)
|<--------------------------|
| <rpc-reply> |
| |
| <notification> |
|<--------------------------|
| |
| <notification> |
|<--------------------------|
| <notification> | (replayComplete)
|<--------------------------|
| <notification> |(notificationComplete)
|<--------------------------|
| |
| |
| |
| <rpc> |
|-------------------------->|
|<--------------------------|
| <rpc-reply> |
| |
Figure 4
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd">
<xs:annotation>
<xs:documentation>
This import accesses the xml: attribute groups for the
xml:lang as declared on the error-message element.
</xs:documentation>
</xs:annotation>
</xs:import>
<xs:complexType name="createSubscriptionType">
<xs:complexContent>
<xs:extension base="netconf:rpcOperationType">
<xs:sequence>
<xs:element name="stream"
type="streamNameType" minOccurs="0">
<xs:annotation>
<xs:documentation>
An optional parameter that indicates
which stream of events is of interest.
If not present, then events in the
default NETCONF stream will be sent.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="filter"
type="netconf:filterInlineType"
minOccurs="0">
<xs:annotation>
<xs:documentation>
An optional parameter that indicates
which subset of all possible events
is of interest. The format of this
parameter is the same as that of the
filter parameter in the NETCONF
protocol operations. If not
present, all events not precluded
by other parameters will be sent.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="startTime" type="xs:dateTime"
minOccurs="0" >
<xs:annotation>
<xs:documentation>
A parameter used to trigger the replay
feature indicating that the replay
should start at the time specified. If
start time is not present, this is not a
replay subscription.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="stopTime" type="xs:dateTime"
minOccurs="0" >
<xs:annotation>
<xs:documentation>
An optional parameter used with the
optional replay feature to indicate the
newest notifications of interest. If
stop time is not present, the
notifications will continue until the
subscription is terminated. Must be
used with startTime.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="streamNameType">
<xs:annotation>
<xs:documentation>
The name of an event stream.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:element name="create-subscription"
type="createSubscriptionType"
substitutionGroup="netconf:rpcOperation">
<xs:annotation>
<xs:documentation>
The command to create a notification subscription. It
takes as argument the name of the notification stream
and filter. Both of those options
limit the content of the subscription. In addition,
there are two time-related parameters, startTime and
stopTime, which can be used to select the time interval
of interest to the notification replay feature.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="notificationContent"
type="NotificationContentType" abstract="true"/>
<xs:complexType name="NotificationType">
<xs:sequence>
<xs:element name="eventTime" type="xs:dateTime">
<xs:annotation>
<xs:documentation>
The time the event was generated by the event source.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="notificationContent"/>
</xs:sequence>
</xs:complexType>
5. Filtering Examples
<xs:import namespace=
"urn:ietf:params:xml:ns:netconf:notification:1.0"
schemaLocation="notification.xsd"/>
<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>
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2007-07-08T00:01:00Z</eventTime>
<event xmlns="http://example.com/event/1.0">
<eventClass>fault</eventClass>
<reportingEntity>
<card>Ethernet0</card>
</reportingEntity>
<severity>major</severity>
</event>
</notification>
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2007-07-08T00:02:00Z</eventTime>
<event xmlns="http://example.com/event/1.0">
<eventClass>fault</eventClass>
<reportingEntity>
<card>Ethernet2</card>
</reportingEntity>
<severity>critical</severity>
</event>
</notification>
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2007-07-08T00:04:00Z</eventTime>
<event xmlns="http://example.com/event/1.0">
<eventClass>fault</eventClass>
<reportingEntity>
<card>ATM1</card>
</reportingEntity>
<severity>minor</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>state</eventClass>
<reportingEntity>
<card>Ethernet0</card>
</reportingEntity>
<operState>enabled</operState>
</event>
</notification>
<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>fault</eventClass>
<severity>critical</severity>
</event>
<event xmlns="http://example.com/event/1.0">
<eventClass>fault</eventClass>
<severity>major</severity>
</event>
<event xmlns="http://example.com/event/1.0">
<eventClass>fault</eventClass>
<severity>minor</severity>
</event>
</filter>
</create-subscription>
</netconf:rpc>
<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>
<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="xpath"
xmlns:ex="http://example.com/event/1.0"
select="/ex:event[ex:eventClass=’fault’ and
(ex:severity=’minor’ or ex:severity=’major’
or ex:severity=’critical’)]"/>
</create-subscription>
</netconf:rpc>
<netconf:rpc 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="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:card=’Ethernet0’))]"/>
</create-subscription>
</netconf:rpc>
6. Interleave Capability
6.1. Description
6.2. Dependencies
urn:ietf:params:netconf:capability:interleave:1.0
None.
Tag: operation-failed
Error-type: protocol
Severity: error
Error-info: none
7. Security Considerations
The access control framework and the choice of transport will have a
major impact on the security of the solution.
The <notification> elements are never sent before the transport layer
and the NETCONF layer, including capabilities exchange, have been
established and the manager has been identified and authenticated.
o <create-subscription> invocation
o <notification> content
<get>, and the content that different users can access may vary.
This different access is reflected in the <notification> that
different users are able to subscribe to.
8. IANA Considerations
This document registers three URIs for the NETCONF XML namespace in
the IETF XML registry [RFC3688].
Following the format in RFC 3688, IANA has made the following
registration. Note that the capability URNs are also compliant to
section 10.3 of [NETCONF].
+--------------------+----------------------------------------------+
| Index | Capability Identifier |
+--------------------+----------------------------------------------+
| :notification | urn:ietf:params:netconf:capability: |
| | notification:1.0 |
| | |
| :interleave | urn:ietf:params:netconf:capability: |
| | interleave:1.0 |
+--------------------+----------------------------------------------+
URI: urn:ietf:params:xml:ns:netmod:notification
URI: urn:ietf:params:xml:ns:netconf:notification:1.0
9. Acknowledgements
Thanks to Gilbert Gagnon, Greg Wilbur, and Kim Curran for providing
their input into the early work on this document. In addition, the
editors would like to acknowledge input at the Vancouver editing
session from the following people: Orly Nicklass, James Balestriere,
Yoshifumi Atarashi, Glenn Waters, Alexander Clemm, Dave Harrington,
Dave Partain, Ray Atarashi, David Perkins, and the following
additional people from the Montreal editing session: Balazs Lengyel,
Phil Shafer, Rob Enns, Andy Bierman, Dan Romascanu, Bert Wijnen,
Simon Leinen, Juergen Schoenwaelder, Hideki Okita, Vincent Cridlig,
Martin Bjorklund, Olivier Festor, Radu State, Brian Trammell, and
William Chow. We would also like to thank Li Yan for his numerous
reviews, as well as Suresh Krishnan for his gen-art review of the
document.
[RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the
Internet: Timestamps", RFC 3339, July 2002.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
January 2004.
Authors’ Addresses
Sharon Chisholm
Nortel
3500 Carling Ave
Nepean, Ontario K2H 8E9
Canada
EMail: schishol@nortel.com
Hector Trevino
Cisco
Suite 400
9155 E. Nichols Ave
Englewood, CO 80112
USA
EMail: htrevino@cisco.com
Intellectual Property
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.