< draft-ietf-netconf-subscribed-notifications-04.txt   draft-ietf-netconf-subscribed-notifications-05.txt >
NETCONF E. Voit NETCONF E. Voit
Internet-Draft Cisco Systems Internet-Draft Cisco Systems
Intended status: Standards Track A. Clemm Intended status: Standards Track A. Clemm
Expires: March 23, 2018 Huawei Expires: April 5, 2018 Huawei
A. Gonzalez Prieto A. Gonzalez Prieto
VMWare VMWare
E. Nilsen-Nygaard E. Nilsen-Nygaard
A. Tripathy A. Tripathy
Cisco Systems Cisco Systems
September 19, 2017 October 2, 2017
Custom Subscription to Event Notifications Custom Subscription to Event Notifications
draft-ietf-netconf-subscribed-notifications-04 draft-ietf-netconf-subscribed-notifications-05
Abstract Abstract
This document defines capabilities and operations for the customized This document defines capabilities and operations for the customized
establishment of subscriptions upon a publisher's event streams. establishment of subscriptions upon a publisher's event streams.
Also defined are delivery mechanisms for instances of the resulting Also defined are delivery mechanisms for instances of the resulting
events. Effectively this allows a subscriber to request and receive events. Effectively this allows a subscriber to request and receive
a continuous, custom influx of publisher generated information. a continuous, custom influx of publisher generated information.
Status of This Memo Status of This Memo
skipping to change at page 1, line 40 skipping to change at page 1, line 40
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 23, 2018. This Internet-Draft will expire on April 5, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 24 skipping to change at page 2, line 24
1.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
1.3. Solution Overview . . . . . . . . . . . . . . . . . . . . 5 1.3. Solution Overview . . . . . . . . . . . . . . . . . . . . 5
2. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1. Event Streams . . . . . . . . . . . . . . . . . . . . . . 6 2.1. Event Streams . . . . . . . . . . . . . . . . . . . . . . 6
2.2. Event Filters . . . . . . . . . . . . . . . . . . . . . . 6 2.2. Event Filters . . . . . . . . . . . . . . . . . . . . . . 6
2.3. Subscription State Model at the Publisher . . . . . . . . 7 2.3. Subscription State Model at the Publisher . . . . . . . . 7
3. Data Model Trees . . . . . . . . . . . . . . . . . . . . . . 8 3. Data Model Trees . . . . . . . . . . . . . . . . . . . . . . 8
4. Dynamic Subscriptions . . . . . . . . . . . . . . . . . . . . 12 4. Dynamic Subscriptions . . . . . . . . . . . . . . . . . . . . 12
4.1. Establishing a Subscription . . . . . . . . . . . . . . . 12 4.1. Establishing a Subscription . . . . . . . . . . . . . . . 12
4.2. Modifying a Subscription . . . . . . . . . . . . . . . . 13 4.2. Modifying a Subscription . . . . . . . . . . . . . . . . 14
4.3. Deleting a Subscription . . . . . . . . . . . . . . . . . 14 4.3. Deleting a Subscription . . . . . . . . . . . . . . . . . 14
4.4. Killing a Subscription . . . . . . . . . . . . . . . . . 14 4.4. Killing a Subscription . . . . . . . . . . . . . . . . . 14
5. Configured Subscriptions . . . . . . . . . . . . . . . . . . 14 5. Configured Subscriptions . . . . . . . . . . . . . . . . . . 15
5.1. Establishing a Configured Subscription . . . . . . . . . 15 5.1. Establishing a Configured Subscription . . . . . . . . . 15
5.2. Modifying a Configured Subscription . . . . . . . . . . . 17 5.2. Modifying a Configured Subscription . . . . . . . . . . . 17
5.3. Deleting a Configured Subscription . . . . . . . . . . . 17 5.3. Deleting a Configured Subscription . . . . . . . . . . . 17
6. Deleting a Configured Subscription . . . . . . . . . . . . . 18 6. Deleting a Configured Subscription . . . . . . . . . . . . . 18
7. Asynchronous Subscribed Content Delivery . . . . . . . . . . 18 7. Asynchronous Subscribed Content Delivery . . . . . . . . . . 18
8. Subscription State Notifications . . . . . . . . . . . . . . 19 8. Subscription State Notifications . . . . . . . . . . . . . . 19
8.1. subscription-started . . . . . . . . . . . . . . . . . . 19 8.1. subscription-started . . . . . . . . . . . . . . . . . . 19
8.2. subscription-modified . . . . . . . . . . . . . . . . . . 19 8.2. subscription-modified . . . . . . . . . . . . . . . . . . 19
8.3. subscription-terminated . . . . . . . . . . . . . . . . . 19 8.3. subscription-terminated . . . . . . . . . . . . . . . . . 20
8.4. subscription-suspended . . . . . . . . . . . . . . . . . 20 8.4. subscription-suspended . . . . . . . . . . . . . . . . . 20
8.5. subscription-resumed . . . . . . . . . . . . . . . . . . 20 8.5. subscription-resumed . . . . . . . . . . . . . . . . . . 20
8.6. subscription-completed . . . . . . . . . . . . . . . . . 20 8.6. subscription-completed . . . . . . . . . . . . . . . . . 20
8.7. replay-completed . . . . . . . . . . . . . . . . . . . . 20 8.7. replay-completed . . . . . . . . . . . . . . . . . . . . 20
9. Administrative Functions . . . . . . . . . . . . . . . . . . 20 9. Administrative Functions . . . . . . . . . . . . . . . . . . 21
9.1. Subscription Monitoring . . . . . . . . . . . . . . . . . 21 9.1. Subscription Monitoring . . . . . . . . . . . . . . . . . 21
9.2. Capability Advertisement . . . . . . . . . . . . . . . . 21 9.2. Capability Advertisement . . . . . . . . . . . . . . . . 21
9.3. Event Stream Discovery . . . . . . . . . . . . . . . . . 21 9.3. Event Stream Discovery . . . . . . . . . . . . . . . . . 22
10. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 22 10. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 22
11. Considerations . . . . . . . . . . . . . . . . . . . . . . . 44 11. Considerations . . . . . . . . . . . . . . . . . . . . . . . 44
11.1. Implementation Considerations . . . . . . . . . . . . . 44 11.1. Implementation Considerations . . . . . . . . . . . . . 44
11.2. Security Considerations . . . . . . . . . . . . . . . . 45 11.2. Security Considerations . . . . . . . . . . . . . . . . 44
12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 46 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 45
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 46 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 45
13.1. Normative References . . . . . . . . . . . . . . . . . . 46 13.1. Normative References . . . . . . . . . . . . . . . . . . 45
13.2. Informative References . . . . . . . . . . . . . . . . . 47 13.2. Informative References . . . . . . . . . . . . . . . . . 46
Appendix A. Changes between revisions . . . . . . . . . . . . . 48 Appendix A. Changes between revisions . . . . . . . . . . . . . 47
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 50 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 49
1. Introduction 1. Introduction
This document defines capabilities and operations for the customized This document defines capabilities and operations for the customized
establishment of subscriptions upon system generated event streams. establishment of subscriptions upon system generated event streams.
Effectively this enables a "Subscribe then Publish" capability where Effectively this enables a "Subscribe then Publish" capability where
the customized information needs of each target receiver are the customized information needs of each target receiver are
understood by the publisher before events are marshalled and pushed. understood by the publisher before events are marshalled and pushed.
The receiver then gets a continuous, custom influx of publisher The receiver then gets a continuous, custom influx of publisher
generated events. generated events.
skipping to change at page 6, line 38 skipping to change at page 6, line 38
device's local Syslog. Beyond these two, additional streams can be device's local Syslog. Beyond these two, additional streams can be
added via model augmentation. added via model augmentation.
As events are raised by a system, they may be assigned to one or more As events are raised by a system, they may be assigned to one or more
streams. The event is distributed to receivers where: (1) a streams. The event is distributed to receivers where: (1) a
subscription includes the identified stream, and (2) subscription subscription includes the identified stream, and (2) subscription
filtering allows the event to traverse. filtering allows the event to traverse.
If access control permissions are in use to secure publisher content, If access control permissions are in use to secure publisher content,
then for notifications to be sent to a receiver, that receiver MUST then for notifications to be sent to a receiver, that receiver MUST
be allowed access to all the events on the stream. If permissions be allowed access to all the events on the stream. If subscriber
change during the lifecycle of a subscription, then events MUST be permissions change during the lifecycle of a subscription, then the
sent or restricted accordingly. This can be done by re-establishing subscription MUST be continued or terminated accordingly.
a subscription with the updated permissions, or by seamlessly
updating the permissions of an existing subscription.
2.2. Event Filters 2.2. Event Filters
A publisher implementation MUST support the ability to perform A publisher implementation MUST support the ability to perform
filtering of events within a stream. Two filtering syntaxes filtering of events within a stream. Two filtering syntaxes
supported are [XPATH] and subtree [RFC6241]. The subsets of these supported are [XPATH] and subtree [RFC6241]. The subsets of these
filtering syntaxes supported are left to each implementation. Events filtering syntaxes supported are left to each implementation. Events
which evaluate to "true", or return a non-null selection as a result which evaluate to "true", or return a non-null selection as a result
of the evaluation by the event filter MUST traverse the filter in of the evaluation by the event filter MUST traverse the filter in
their entirety. A subset of information is never stripped from their entirety. A subset of information is never stripped from
skipping to change at page 8, line 17 skipping to change at page 8, line 13
and resume. and resume.
An equivalent state machine exists for configured subscriptions. An equivalent state machine exists for configured subscriptions.
However the transition between states is via configuration operations However the transition between states is via configuration operations
rather than via RPC. rather than via RPC.
3. Data Model Trees 3. Data Model Trees
module: ietf-subscribed-notifications module: ietf-subscribed-notifications
+--ro streams +--ro streams
| +--ro stream* [stream] | +--ro stream* [name]
| +--ro stream stream | +--ro name stream
| +--ro description string | +--ro description string
| +--ro replay-support? empty | +--ro replay-support? empty {replay}?
| +--ro replay-log-creation-time? yang:date-and-time | +--ro replay-log-creation-time? yang:date-and-time {replay}?
| +--ro replay-log-aged-time? yang:date-and-time | +--ro replay-log-aged-time? yang:date-and-time {replay}?
+--rw filters +--rw filters
| +--rw filter* [identifier] | +--rw event-filter* [identifier]
| +--rw identifier filter-id | +--rw identifier filter-id
| +--rw (filter-type)? | +--rw (filter-spec)?
| +--:(event-filter) | +--:(subtree-filter)
| +--rw event-filter-type event-filter-type | | +--rw subtree-filter?
| +--rw event-filter-contents | +--:(xpath-filter)
| +--rw xpath-filter? yang:xpath1.0
+--rw subscription-config {configured-subscriptions}? +--rw subscription-config {configured-subscriptions}?
| +--rw subscription* [identifier] | +--rw subscription* [identifier]
| +--rw identifier subscription-id | +--rw identifier subscription-id
| +--rw encoding? encoding | +--rw encoding? encoding
| +--rw (target) | +--rw (target)
| | +--:(stream) | | +--:(stream)
| | +--rw (event-filter)? | | +--rw (event-filter)?
| | | +--:(by-reference) | | | +--:(by-reference)
| | | | +--rw filter-ref filter-ref | | | | +--rw event-filter-ref event-filter-ref
| | | +--:(within-subscription) | | | +--:(within-subscription)
| | | +--rw event-filter-type event-filter-type | | | +--rw (filter-spec)?
| | | +--rw event-filter-contents | | | +--:(subtree-filter)
| | +--rw stream stream | | | | +--rw subtree-filter?
| | +--rw replay-start-time? yang:date-and-time {replay}? | | | +--:(xpath-filter)
| +--rw stop-time? yang:date-and-time | | | +--rw xpath-filter? yang:xpath1.0
| | +--rw stream stream
| | +--rw replay-start-time? yang:date-and-time {replay}?
| +--rw stop-time? yang:date-and-time
| +--rw receivers | +--rw receivers
| | +--rw receiver* [address port] | | +--rw receiver* [address port]
| | +--rw address inet:host | | +--rw address inet:host
| | +--rw port inet:port-number | | +--rw port inet:port-number
| | +--rw protocol? transport-protocol | | +--rw protocol? transport-protocol
| +--rw (notification-origin)? | +--rw (notification-origin)?
| +--:(interface-originated) | +--:(interface-originated)
| | +--rw source-interface? if:interface-ref | | +--rw source-interface? if:interface-ref
| +--:(address-originated) | +--:(address-originated)
| +--rw source-vrf? string | +--rw source-vrf? string
| +--rw source-address? inet:ip-address-no-zone | +--rw source-address? inet:ip-address-no-zone
+--ro subscriptions +--ro subscriptions
+--ro subscription* [identifier] +--ro subscription* [identifier]
+--ro identifier subscription-id +--ro identifier subscription-id
+--ro configured-subscription? +--ro configured-subscription? empty {configured-subscriptions}?
| empty {configured-subscriptions}?
+--ro encoding? encoding +--ro encoding? encoding
+--ro (target) +--ro (target)
| +--:(stream) | +--:(stream)
| +--ro (event-filter)? | +--ro (event-filter)?
| | +--:(by-reference) | | +--:(by-reference)
| | | +--ro filter-ref filter-ref | | | +--ro event-filter-ref event-filter-ref
| | +--:(within-subscription) | | +--:(within-subscription)
| | +--ro event-filter-type event-filter-type | | +--ro (filter-spec)?
| | +--ro event-filter-contents | | +--:(subtree-filter)
| | | +--ro subtree-filter?
| | +--:(xpath-filter)
| | +--ro xpath-filter? yang:xpath1.0
| +--ro stream stream | +--ro stream stream
| +--ro replay-start-time? yang:date-and-time {replay}? | +--ro replay-start-time? yang:date-and-time {replay}?
+--ro stop-time? yang:date-and-time +--ro stop-time? yang:date-and-time
+--ro (notification-origin)? +--ro (notification-origin)?
| +--:(interface-originated) | +--:(interface-originated)
| | +--ro source-interface? if:interface-ref | | +--ro source-interface? if:interface-ref
| +--:(address-originated) | +--:(address-originated)
| +--ro source-vrf? string | +--ro source-vrf? string
| +--ro source-address? inet:ip-address-no-zone | +--ro source-address? inet:ip-address-no-zone
+--ro receivers +--ro receivers
+--ro receiver* [address port] +--ro receiver* [address port]
+--ro address inet:host +--ro address inet:host
+--ro port inet:port-number +--ro port inet:port-number
+--ro protocol? transport-protocol +--ro protocol? transport-protocol
+--ro pushed-notifications? yang:counter64 +--ro pushed-notifications? yang:counter64
+--ro excluded-notifications? yang:counter64 +--ro excluded-notifications? yang:counter64
+--ro status subscription-status +--ro status subscription-status
rpcs: rpcs:
+---x establish-subscription +---x establish-subscription
| +---w input | +---w input
| | +---w encoding? encoding | | +---w encoding? encoding
| | +---w (target) | | +---w (target)
| | | +--:(stream) | | | +--:(stream)
| | | +---w (event-filter)? | | | +---w (event-filter)?
| | | | +--:(by-reference) | | | | +--:(by-reference)
| | | | | +---w filter-ref filter-ref | | | | | +---w event-filter-ref event-filter-ref
| | | | +--:(within-subscription) | | | | +--:(within-subscription)
| | | | +---w event-filter-type event-filter-type | | | | +---w (filter-spec)?
| | | | +---w event-filter-contents | | | | +--:(subtree-filter)
| | | +---w stream stream | | | | | +---w subtree-filter?
| | | +---w replay-start-time? yang:date-and-time {replay}? | | | | +--:(xpath-filter)
| | +---w stop-time? yang:date-and-time | | | | +---w xpath-filter? yang:xpath1.0
| | | +---w stream stream
| | | +---w replay-start-time? yang:date-and-time {replay}?
| | +---w stop-time? yang:date-and-time
| +--ro output | +--ro output
| +--ro subscription-result subscription-result | +--ro subscription-result subscription-result
| +--ro (result)? | +--ro (result)?
| +--:(no-success) | +--:(no-success)
| | +--ro filter-failure? string | | +--ro filter-failure? string
| | +--ro replay-start-time-hint? yang:date-and-time | | +--ro replay-start-time-hint? yang:date-and-time
| +--:(success) | +--:(success)
| +--ro identifier subscription-id | +--ro identifier subscription-id
+---x modify-subscription +---x modify-subscription
| +---w input | +---w input
| | +---w identifier? subscription-id | | +---w identifier? subscription-id
| | +---w (target) | | +---w (target)
| | | +--:(stream) | | | +--:(stream)
| | | +---w (event-filter)? | | | +---w (event-filter)?
| | | +--:(by-reference) | | | +--:(by-reference)
| | | | +---w filter-ref filter-ref | | | | +---w event-filter-ref event-filter-ref
| | | +--:(within-subscription) | | | +--:(within-subscription)
| | | +---w event-filter-type event-filter-type | | | +---w (filter-spec)?
| | | +---w event-filter-contents | | | +--:(subtree-filter)
| | +---w stop-time? yang:date-and-time | | | | +---w subtree-filter?
| | | +--:(xpath-filter)
| | | +---w xpath-filter? yang:xpath1.0
| | +---w stop-time? yang:date-and-time
| +--ro output | +--ro output
| +--ro subscription-result subscription-result | +--ro subscription-result subscription-result
| +--ro (result)? | +--ro (result)?
| +--:(no-success) | +--:(no-success)
| +--ro filter-failure? string | +--ro filter-failure? string
+---x delete-subscription +---x delete-subscription
| +---w input | +---w input
| | +---w identifier subscription-id | | +---w identifier subscription-id
| +--ro output | +--ro output
| +--ro subscription-result subscription-result | +--ro subscription-result subscription-result
skipping to change at page 10, line 48 skipping to change at page 11, line 8
| +---w identifier subscription-id | +---w identifier subscription-id
+--ro output +--ro output
+--ro subscription-result subscription-result +--ro subscription-result subscription-result
notifications: notifications:
+---n replay-completed +---n replay-completed
| +--ro identifier subscription-id | +--ro identifier subscription-id
+---n subscription-completed +---n subscription-completed
| +--ro identifier subscription-id | +--ro identifier subscription-id
+---n subscription-started +---n subscription-started
| +--ro identifier subscription-id | +--ro identifier subscription-id
| +--ro encoding? encoding | +--ro encoding? encoding
| +--ro (target) | +--ro (target)
| | +--:(stream) | | +--:(stream)
| | +--ro (event-filter)? | | +--ro (event-filter)?
| | | +--:(by-reference) | | | +--:(by-reference)
| | | | +--ro filter-ref filter-ref | | | | +--ro event-filter-ref event-filter-ref
| | | +--:(within-subscription) | | | +--:(within-subscription)
| | | +--ro event-filter-type event-filter-type | | | +--ro (filter-spec)?
| | | +--ro event-filter-contents | | | +--:(subtree-filter)
| | +--ro stream stream | | | | +--ro subtree-filter?
| | +--ro replay-start-time? yang:date-and-time {replay}? | | | +--:(xpath-filter)
| +--ro stop-time? yang:date-and-time | | | +--ro xpath-filter? yang:xpath1.0
| | +--ro stream stream
| | +--ro replay-start-time? yang:date-and-time {replay}?
| +--ro stop-time? yang:date-and-time
+---n subscription-resumed +---n subscription-resumed
| +--ro identifier subscription-id | +--ro identifier subscription-id
+---n subscription-modified +---n subscription-modified
| +--ro identifier subscription-id | +--ro identifier subscription-id
| +--ro encoding? encoding | +--ro encoding? encoding
| +--ro (target) | +--ro (target)
| | +--:(stream) | | +--:(stream)
| | +--ro (event-filter)? | | +--ro (event-filter)?
| | | +--:(by-reference) | | | +--:(by-reference)
| | | | +--ro filter-ref filter-ref | | | | +--ro event-filter-ref event-filter-ref
| | | +--:(within-subscription) | | | +--:(within-subscription)
| | | +--ro event-filter-type event-filter-type | | | +--ro (filter-spec)?
| | | +--ro event-filter-contents | | | +--:(subtree-filter)
| | +--ro stream stream | | | | +--ro subtree-filter?
| | +--ro replay-start-time? yang:date-and-time {replay}? | | | +--:(xpath-filter)
| +--ro stop-time? yang:date-and-time | | | +--ro xpath-filter? yang:xpath1.0
| | +--ro stream stream
| | +--ro replay-start-time? yang:date-and-time {replay}?
| +--ro stop-time? yang:date-and-time
+---n subscription-terminated +---n subscription-terminated
| +--ro identifier subscription-id | +--ro identifier subscription-id
| +--ro error-id subscription-errors | +--ro error-id subscription-errors
| +--ro filter-failure? string | +--ro filter-failure? string
+---n subscription-suspended +---n subscription-suspended
+--ro identifier subscription-id +--ro identifier subscription-id
+--ro error-id subscription-errors +--ro error-id subscription-errors
+--ro filter-failure? string +--ro filter-failure? string
The top-level decompositions of data model are as follows: The top-level decompositions of data model are as follows:
skipping to change at page 16, line 17 skipping to change at page 16, line 31
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config> <edit-config>
<target> <target>
<running/> <running/>
</target> </target>
<subscription-config <subscription-config
xmlns="urn:ietf:params:xml:ns:yang:"+ xmlns="urn:ietf:params:xml:ns:yang:"+
"ietf-subscribed-notifications:1.0"> "ietf-subscribed-notifications:1.0">
<subscription> <subscription>
<subscription-id>1922</subscription-id> <subscription-id>1922</subscription-id>
<stream>NETCONF</stream> <stream>
<receiver> <name>NETCONF</name>
<receiver>
<address>1.2.3.4</address> <address>1.2.3.4</address>
<port>1234</port> <port>1234</port>
</receiver> </receiver>
</stream>
</subscription> </subscription>
</subscription-config> </subscription-config>
</edit-config> </edit-config>
</rpc> </rpc>
Figure 2: Configured subscription creation via NETCONF Figure 2: Configured subscription creation via NETCONF
if the request is accepted, the publisher would reply: if the request is accepted, the publisher would reply:
<rpc-reply message-id="101" <rpc-reply message-id="101"
skipping to change at page 19, line 5 skipping to change at page 19, line 5
</link-failure> </link-failure>
</notification> </notification>
Figure 6: subscribed content notification Figure 6: subscribed content notification
This [RFC5277] section 4 has the drawback of not including useful This [RFC5277] section 4 has the drawback of not including useful
header information such as subscription-ID. When using this header information such as subscription-ID. When using this
mechanism, it is left up to implementations to determine which events mechanism, it is left up to implementations to determine which events
belong to which subscription. belong to which subscription.
This drawback, along with other useful common headers and the ability In addition [RFC5277] section 4 does not provide a mechanism to for
to bundle multiple event notifications together is being explored JSON encoding of notifications.
within [I-D.notification-messages].
These drawbacks, along with other useful common headers and the
ability to bundle multiple event notifications together is being
explored within [I-D.notification-messages]. When this draft is
supported, it will be possible to support the encoding of YANG
modeled notification messages with JSON via [RFC7951].
8. Subscription State Notifications 8. Subscription State Notifications
In addition to subscribed content, a publisher will send subscription In addition to subscribed content, a publisher will send subscription
state notifications to indicate to receivers that an event related to state notifications to indicate to receivers that an event related to
the subscription management has occurred. the subscription management has occurred.
Subscription state notifications are unlike other notifications in Subscription state notifications are unlike other notifications in
that they are not general-purpose notifications. They cannot be that they are not general-purpose notifications. They cannot be
filtered out, and they are delivered only to directly impacted filtered out, and they are delivered only to directly impacted
skipping to change at page 22, line 11 skipping to change at page 22, line 21
A publisher maintains a list of available event streams as A publisher maintains a list of available event streams as
operational data. This list contains both standardized and vendor- operational data. This list contains both standardized and vendor-
specific event streams. A client can retrieve this list like any specific event streams. A client can retrieve this list like any
other YANG-defined data, for example using the <get> operation when other YANG-defined data, for example using the <get> operation when
using NETCONF. using NETCONF.
10. Data Model 10. Data Model
<CODE BEGINS> file "ietf-subscribed-notifications.yang" <CODE BEGINS> file "ietf-subscribed-notifications.yang"
module ietf-subscribed-notifications { module ietf-subscribed-notifications {
yang-version 1.1;
namespace namespace
"urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"; "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications";
prefix sn; prefix sn;
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
} }
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
skipping to change at page 22, line 50 skipping to change at page 23, line 12
Editor: Einar Nilsen-Nygaard Editor: Einar Nilsen-Nygaard
<mailto:einarnn@cisco.com> <mailto:einarnn@cisco.com>
Editor: Ambika Prasad Tripathy Editor: Ambika Prasad Tripathy
<mailto:ambtripa@cisco.com>"; <mailto:ambtripa@cisco.com>";
description description
"Contains a conceptual YANG specification for subscribing to events "Contains a conceptual YANG specification for subscribing to events
and receiving matching content within notification messages."; and receiving matching content within notification messages.";
revision 2017-09-15 { revision 2017-10-02 {
description description
"Filtering and stream structures updated, replay a feature."; "Filtering and stream structures updated, replay a feature.";
reference reference
"draft-ietf-netconf-subscribed-notifications-04"; "draft-ietf-netconf-subscribed-notifications-05";
} }
/* /*
* FEATURES * FEATURES
*/ */
feature json { feature json {
description description
"This feature indicates that JSON encoding of notifications "This feature indicates that JSON encoding of notifications
is supported."; is supported.";
skipping to change at page 24, line 31 skipping to change at page 24, line 40
"A stream of events mirroring the discrete set entries "A stream of events mirroring the discrete set entries
concurrently being placed into a device's local Syslog."; concurrently being placed into a device's local Syslog.";
} }
identity custom-stream { identity custom-stream {
base stream; base stream;
description description
"A supported stream not defined via an identity in this model"; "A supported stream not defined via an identity in this model";
} }
/* Identities for event filters */
identity event-filter {
description
"Evaluation criteria used as a pass/fail test against events.
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
for its value to be checked against, the event will be filtered
out. For example, if one were to check for 'severity=critical' in
an event where this object does not exist, then the event would
not traverse.";
}
identity subtree-event-filter {
base event-filter;
description
"An RFC-6241 based filter which attempts to select nodes within an
event. After evaluation, the return of a non-empty node set means
that the filter is successfully traversed.";
reference "RFC-6241, #5.1";
}
identity xpath-event-filter {
base event-filter;
description
"A filter applied to an event which follows the syntax specified
in yang:xpath1.0. Success is indicated by either a positive
boolean result, or a non-null node selection.";
reference "XPATH: http://www.w3.org R/1999/REC-xpath-19991116";
}
/* Identities for subscription results */ /* Identities for subscription results */
identity subscription-result { identity subscription-result {
description description
"Base identity for RPC responses and State Change Notifications "Base identity for RPC responses and State Change Notifications
providing information on the creation, modification, deletion of providing information on the creation, modification, deletion of
subscriptions."; subscriptions.";
} }
identity ok { identity ok {
base subscription-result; base subscription-result;
skipping to change at page 30, line 4 skipping to change at page 29, line 29
base error; base error;
} }
description description
"The reason for the failure of an RPC request or the sending "The reason for the failure of an RPC request or the sending
of a subscription suspension or termination notification"; of a subscription suspension or termination notification";
} }
typedef encoding { typedef encoding {
type identityref { type identityref {
base encodings; base encodings;
} }
description description
"Specifies a data encoding, e.g. for a data subscription."; "Specifies a data encoding, e.g. for a data subscription.";
} }
typedef event-filter-type {
type identityref {
base event-filter;
}
description
"Specifies a known type of event filter.";
}
typedef subscription-status { typedef subscription-status {
type identityref { type identityref {
base subscription-status; base subscription-status;
} }
description description
"Specifies the status of a subscription."; "Specifies the status of a subscription.";
} }
typedef transport-protocol { typedef transport-protocol {
type identityref { type identityref {
base transport; base transport;
} }
description description
"Specifies transport protocol used to send notifications to a "Specifies transport protocol used to send notifications to a
receiver."; receiver.";
} }
typedef notification-origin { typedef egressing-from {
type enumeration { type enumeration {
enum "interface-originated" { enum "interface-originated" {
description description
"Notifications will be sent from a specific interface on a "Notifications will be sent from a specific interface on a
publisher"; publisher";
} }
enum "address-originated" { enum "address-originated" {
description description
"Notifications will be sent from a specific address on a "Notifications will be sent from a specific address on a
publisher"; publisher";
skipping to change at page 31, line 4 skipping to change at page 30, line 20
enum "address-originated" { enum "address-originated" {
description description
"Notifications will be sent from a specific address on a "Notifications will be sent from a specific address on a
publisher"; publisher";
} }
} }
description description
"Specifies from where notifications will be sourced when "Specifies from where notifications will be sourced when
being sent by the publisher."; being sent by the publisher.";
} }
typedef stream { typedef stream {
type identityref { type identityref {
base stream; base stream;
} }
description description
"Specifies a system-provided datastream."; "Specifies a system-provided datastream.";
} }
typedef filter-ref { typedef event-filter-ref {
type leafref { type leafref {
path "/sn:filters/sn:filter/sn:identifier"; path "/sn:filters/sn:event-filter/sn:identifier";
} }
description description
"This type is used to reference a filter."; "This type is used to reference an event filter.";
} }
/* /*
* GROUPINGS * GROUPINGS
*/ */
grouping base-filter { grouping event-filter-elements {
description description
"This grouping defines the base for filters for notification "This grouping defines the base for filters for notification
events."; events.";
choice filter-spec {
leaf event-filter-type { description
type event-filter-type; "The content filter specification for this request.";
mandatory true; anydata subtree-filter {
description description
"A filter needs to be a known and understood syntax if it is "Event stream evaluation criteria encoded in a syntax of a
to be interpretable by a device."; supported type of an RFC 6241, Section 6 filter. When
} applied against an event stream and there is a non-empty or
anyxml event-filter-contents { positive result, the event is passed along.";
mandatory true; reference "RFC 6241, Section 6.";
description }
"Event stream evaluation criteria encoded in a syntax of a leaf xpath-filter {
supported type of filter. If the filter is applied type yang:xpath1.0;
against an event stream and there is a non-empty or description
positive result, the event is passed along."; "Event stream evaluation criteria encoded in a syntax of xpath
} 1.0 When applied against an event stream and there is a
non-empty or positive result, the event is passed along.";
reference "http://www.w3.org/TR/1999/REC-xpath-19991116";
}
}
} }
grouping subscription-policy-modifiable { grouping subscription-policy-modifiable {
description description
"This grouping describes all objects which may be changed "This grouping describes all objects which may be changed
in a subscription via an RPC."; in a subscription via an RPC.";
choice target { choice target {
mandatory true; mandatory true;
description description
"A filter must be applied against some source of information. "A filter must be applied against some source of information.
This identifies the target for the filter."; This identifies the target for the filter.";
case stream { case stream {
choice event-filter { choice event-filter {
description description
"A filter can be applied to a subscription. And that filter "A filter can be applied to a subscription. And that filter
will come either referenced from a global list, or be will come either referenced from a global list, or be
provided within the subscription itself."; provided within the subscription itself.";
case by-reference { case by-reference {
description description
"Apply a filter that has been configured separately."; "Apply a filter that has been configured separately.";
leaf filter-ref { leaf event-filter-ref {
type filter-ref; type event-filter-ref;
mandatory true; mandatory true;
description description
"References an existing filter which is to be applied to "References an existing filter which is to be applied to
the subscription."; the subscription.";
} }
} }
case within-subscription { case within-subscription {
description description
"Local definition allows a filter to have the same "Local definition allows a filter to have the same
lifecycle as the subscription."; lifecycle as the subscription.";
uses base-filter; uses event-filter-elements;
} }
} }
} }
} }
leaf stop-time { leaf stop-time {
type yang:date-and-time; type yang:date-and-time;
description description
"Identifies a time after which notification events should not "Identifies a time after which notification events should not
be sent. If stop-time is not present, the notifications will be sent. If stop-time is not present, the notifications will
continue until the subscription is terminated. If continue until the subscription is terminated. If
replay-start-time exists, stop-time must for a subsequent time. replay-start-time exists, stop-time must for a subsequent time.
If replay-start-time doesn't exist, stop-time must for a future If replay-start-time doesn't exist, stop-time must for a future
skipping to change at page 41, line 36 skipping to change at page 41, line 7
/* /*
* DATA NODES * DATA NODES
*/ */
container streams { container streams {
config false; config false;
description description
"This container contains information on the built-in streams "This container contains information on the built-in streams
provided by the publisher."; provided by the publisher.";
list stream { list stream {
key "stream"; key "name";
description description
"Identifies the built-in streams that are supported by the "Identifies the built-in streams that are supported by the
publisher."; publisher.";
leaf stream { leaf name {
type stream; type stream;
description description
"A handle for a sequential set of events, each of which "A handle for a sequential set of events, each of which
is characterized by its own domain and semantics. is characterized by its own domain and semantics.
In case configurable custom streams are supported, In case configurable custom streams are supported,
as indicated by the custom-stream identity, the configuration as indicated by the custom-stream identity, the configuration
of those custom streams is provided separately."; of those custom streams is provided separately.";
} }
leaf description { leaf description {
type string; type string;
mandatory true; mandatory true;
description description
"A description of the event stream, including such information "A description of the event stream, including such information
as the type of events that are sent over this stream."; as the type of events that are sent over this stream.";
} }
leaf replay-support { leaf replay-support {
if-feature "replay";
type empty; type empty;
description description
"Indicates that event replay is available on this stream."; "Indicates that event replay is available on this stream.";
} }
leaf replay-log-creation-time { leaf replay-log-creation-time {
if-feature "replay";
type yang:date-and-time; type yang:date-and-time;
description description
"The timestamp of the creation of the log used to support the "The timestamp of the creation of the log used to support the
replay function on this stream. Note that this might be replay function on this stream. Note that this might be
earlier then the earliest available notification in the log. earlier then the earliest available notification in the log.
This object is updated if the log resets for some reason. This object is updated if the log resets for some reason.
This object MUST be present if replay is supported."; This object MUST be present if replay is supported.";
} }
leaf replay-log-aged-time { leaf replay-log-aged-time {
if-feature "replay";
type yang:date-and-time; type yang:date-and-time;
description description
"The timestamp of the last notification aged out of the log. "The timestamp of the last notification aged out of the log.
This object MUST be present if replay is supported and any This object MUST be present if replay is supported and any
notifications have been aged out of the log."; notifications have been aged out of the log.";
} }
} }
} }
container filters { container filters {
description description
"This container contains a list of configurable filters "This container contains a list of configurable filters
that can be applied to subscriptions. This facilitates that can be applied to subscriptions. This facilitates
the reuse of complex filters once defined."; the reuse of complex filters once defined.";
list filter { list event-filter {
key "identifier"; key "identifier";
description description
"A list of configurable filters that can be applied to "A list of pre-positioned filters that can be applied to
subscriptions."; event subscriptions.";
leaf identifier { leaf identifier {
type filter-id; type filter-id;
description description
"An identifier to differentiate between filters."; "An identifier to differentiate between filters.";
} }
choice filter-type { uses event-filter-elements;
description
"A filter needs to be a single filter of a given type. Mixing
and matching of multiple filters does not occur at the level
of this grouping.";
case event-filter {
uses base-filter;
}
}
} }
} }
container subscription-config { container subscription-config {
if-feature "configured-subscriptions"; if-feature "configured-subscriptions";
description description
"Contains the list of subscriptions that are configured, "Contains the list of subscriptions that are configured,
as opposed to established via RPC or other means."; as opposed to established via RPC or other means.";
list subscription { list subscription {
key "identifier"; key "identifier";
skipping to change at page 48, line 5 skipping to change at page 47, line 20
[RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext
Transfer Protocol Version 2 (HTTP/2)", RFC 7540, Transfer Protocol Version 2 (HTTP/2)", RFC 7540,
DOI 10.17487/RFC7540, May 2015, DOI 10.17487/RFC7540, May 2015,
<https://www.rfc-editor.org/info/rfc7540>. <https://www.rfc-editor.org/info/rfc7540>.
[RFC7923] Voit, E., Clemm, A., and A. Gonzalez Prieto, "Requirements [RFC7923] Voit, E., Clemm, A., and A. Gonzalez Prieto, "Requirements
for Subscription to YANG Datastores", RFC 7923, for Subscription to YANG Datastores", RFC 7923,
DOI 10.17487/RFC7923, June 2016, DOI 10.17487/RFC7923, June 2016,
<https://www.rfc-editor.org/info/rfc7923>. <https://www.rfc-editor.org/info/rfc7923>.
[RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG",
RFC 7951, DOI 10.17487/RFC7951, August 2016,
<https://www.rfc-editor.org/info/rfc7951>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>. <https://www.rfc-editor.org/info/rfc8040>.
Appendix A. Changes between revisions Appendix A. Changes between revisions
(To be removed by RFC editor prior to publication) (To be removed by RFC editor prior to publication)
v09 - v10
o Returned to the explicit filter subtyping of v00
o stream object changed to 'name' from 'stream'
o Cleaned up examples
o Clarified that JSON support needs notification-messages draft.
v03 - v04 v03 - v04
o Moved back to the use of RFC5277 one-way notifications and o Moved back to the use of RFC5277 one-way notifications and
encodings. encodings.
v03 - v04 v03 - v04
o Replay updated o Replay updated
v02 - v03 v02 - v03
 End of changes. 65 change blocks. 
163 lines changed or deleted 163 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/