idnits 2.17.1 draft-ietf-netconf-subscribed-notifications-24.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 1336 has weird spacing: '... reason ide...' == Line 1371 has weird spacing: '... reason ide...' == Line 1387 has weird spacing: '...--ro id sub...' == Line 1402 has weird spacing: '...--ro id sub...' == Line 1423 has weird spacing: '...--ro id sub...' == (3 more instances...) == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 29, 2019) is 1823 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) -- Possible downref: Non-RFC (?) normative reference: ref. 'XPATH' -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) -- Obsolete informational reference (is this intentional?): RFC 7540 (Obsoleted by RFC 9113) Summary: 1 error (**), 0 flaws (~~), 8 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NETCONF E. Voit 3 Internet-Draft Cisco Systems 4 Intended status: Standards Track A. Clemm 5 Expires: October 31, 2019 Huawei 6 A. Gonzalez Prieto 7 Microsoft 8 E. Nilsen-Nygaard 9 A. Tripathy 10 Cisco Systems 11 April 29, 2019 13 Subscription to YANG Event Notifications 14 draft-ietf-netconf-subscribed-notifications-24 16 Abstract 18 This document defines a YANG data model and associated mechanisms 19 enabling subscriber-specific subscriptions to a publisher's event 20 streams. Applying these elements allows a subscriber to request for 21 and receive a continuous, custom feed of publisher generated 22 information. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at https://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on October 31, 2019. 41 Copyright Notice 43 Copyright (c) 2019 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (https://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 This document may contain material from IETF Documents or IETF 57 Contributions published or made publicly available before November 58 10, 2008. The person(s) controlling the copyright in some of this 59 material may not have granted the IETF Trust the right to allow 60 modifications of such material outside the IETF Standards Process. 61 Without obtaining an adequate license from the person(s) controlling 62 the copyright in such materials, this document may not be modified 63 outside the IETF Standards Process, and derivative works of it may 64 not be created outside the IETF Standards Process, except to format 65 it for publication as an RFC or to translate it into languages other 66 than English. 68 Table of Contents 70 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 71 1.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . 3 72 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 73 1.3. Solution Overview . . . . . . . . . . . . . . . . . . . . 5 74 1.4. Relationship to RFC 5277 . . . . . . . . . . . . . . . . 6 75 2. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 7 76 2.1. Event Streams . . . . . . . . . . . . . . . . . . . . . . 7 77 2.2. Event Stream Filters . . . . . . . . . . . . . . . . . . 8 78 2.3. QoS . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 79 2.4. Dynamic Subscriptions . . . . . . . . . . . . . . . . . . 9 80 2.5. Configured Subscriptions . . . . . . . . . . . . . . . . 17 81 2.6. Event Record Delivery . . . . . . . . . . . . . . . . . . 25 82 2.7. Subscription state change notifications . . . . . . . . . 26 83 2.8. Subscription Monitoring . . . . . . . . . . . . . . . . . 31 84 2.9. Advertisement . . . . . . . . . . . . . . . . . . . . . . 32 85 3. YANG Data Model Trees . . . . . . . . . . . . . . . . . . . . 32 86 3.1. Event Streams Container . . . . . . . . . . . . . . . . . 32 87 3.2. Filters Container . . . . . . . . . . . . . . . . . . . . 33 88 3.3. Subscriptions Container . . . . . . . . . . . . . . . . . 33 89 4. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 35 90 5. Considerations . . . . . . . . . . . . . . . . . . . . . . . 62 91 5.1. IANA Considerations . . . . . . . . . . . . . . . . . . . 62 92 5.2. Implementation Considerations . . . . . . . . . . . . . . 63 93 5.3. Transport Requirements . . . . . . . . . . . . . . . . . 64 94 5.4. Security Considerations . . . . . . . . . . . . . . . . . 64 95 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 68 96 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 68 97 7.1. Normative References . . . . . . . . . . . . . . . . . . 68 98 7.2. Informative References . . . . . . . . . . . . . . . . . 70 99 Appendix A. Example Configured Transport Augmentation . . . . . 71 100 Appendix B. Changes between revisions . . . . . . . . . . . . . 72 101 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 78 103 1. Introduction 105 This document defines a YANG data model and associated mechanisms 106 enabling subscriber-specific subscriptions to a publisher's event 107 streams. Effectively this enables a 'subscribe then publish' 108 capability where the customized information needs and access 109 permissions of each target receiver are understood by the publisher 110 before subscribed event records are marshaled and pushed. The 111 receiver then gets a continuous, custom feed of publisher generated 112 information. 114 While the functionality defined in this document is transport- 115 agnostic, transports like NETCONF [RFC6241] or RESTCONF [RFC8040] can 116 be used to configure or dynamically signal subscriptions, and there 117 are bindings defined for subscribed event record delivery for NETCONF 118 within [I-D.draft-ietf-netconf-netconf-event-notifications], and for 119 RESTCONF within [I-D.draft-ietf-netconf-restconf-notif]. 121 The YANG model in this document conforms to the Network Management 122 Datastore Architecture defined in [RFC8342]. 124 1.1. Motivation 126 Various limitations in [RFC5277] are discussed in [RFC7923]. 127 Resolving these issues is the primary motivation for this work. Key 128 capabilities supported by this document include: 130 o multiple subscriptions on a single transport session 132 o support for dynamic and configured subscriptions 134 o modification of an existing subscription in progress 136 o per-subscription operational counters 138 o negotiation of subscription parameters (through the use of hints 139 returned as part of declined subscription requests) 141 o subscription state change notifications (e.g., publisher driven 142 suspension, parameter modification) 144 o independence from transport 146 1.2. Terminology 148 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 149 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 150 "OPTIONAL" in this document are to be interpreted as described in BCP 151 14 [RFC2119] [RFC8174] when, and only when, they appear in all 152 capitals, as shown here. 154 Client: defined in [RFC8342]. 156 Configuration: defined in [RFC8342]. 158 Configuration datastore: defined in [RFC8342]. 160 Configured subscription: A subscription installed via configuration 161 into a configuration datastore. 163 Dynamic subscription: A subscription created dynamically by a 164 subscriber via a remote procedure call. 166 Event: An occurrence of something that may be of interest. Examples 167 include a configuration change, a fault, a change in status, crossing 168 a threshold, or an external input to the system. 170 Event occurrence time: a timestamp matching the time an originating 171 process identified as when an event happened. 173 Event record: A set of information detailing an event. 175 Event stream: A continuous, chronologically ordered set of events 176 aggregated under some context. 178 Event stream filter: Evaluation criteria which may be applied against 179 event records within an event stream. Event records pass the filter 180 when specified criteria are met. 182 Notification message: Information intended for a receiver indicating 183 that one or more events have occurred. 185 Publisher: An entity responsible for streaming notification messages 186 per the terms of a subscription. 188 Receiver: A target to which a publisher pushes subscribed event 189 records. For dynamic subscriptions, the receiver and subscriber are 190 the same entity. 192 Subscriber: A client able to request and negotiate a contract for the 193 generation and push of event records from a publisher. For dynamic 194 subscriptions, the receiver and subscriber are the same entity. 196 Subscription: A contract with a publisher, stipulating which 197 information one or more receivers wish to have pushed from the 198 publisher without the need for further solicitation. 200 All YANG tree diagrams used in this document follow the notation 201 defined in [RFC8340]. 203 1.3. Solution Overview 205 This document describes a transport agnostic mechanism for 206 subscribing to and receiving content from an event stream within a 207 publisher. This mechanism is through the use of a subscription. 209 Two types of subscriptions are supported: 211 1. Dynamic subscriptions, where a subscriber initiates a 212 subscription negotiation with a publisher via an RPC. If the 213 publisher is able to serve this request, it accepts it, and then 214 starts pushing notification messages back to the subscriber. If 215 the publisher is not able to serve it as requested, then an error 216 response is returned. This response MAY include hints at 217 subscription parameters that, had they been present, may have 218 enabled the dynamic subscription request to be accepted. 220 2. Configured subscriptions, which allow the management of 221 subscriptions via a configuration so that a publisher can send 222 notification messages to a receiver. Support for configured 223 subscriptions is optional, with its availability advertised via a 224 YANG feature. 226 Additional characteristics differentiating configured from dynamic 227 subscriptions include: 229 o The lifetime of a dynamic subscription is bound by the transport 230 session used to establish it. For connection-oriented stateful 231 transports like NETCONF, the loss of the transport session will 232 result in the immediate termination of any associated dynamic 233 subscriptions. For connectionless or stateless transports like 234 HTTP, a lack of receipt acknowledgment of a sequential set of 235 notification messages and/or keep-alives can be used to trigger a 236 termination of a dynamic subscription. Contrast this to the 237 lifetime of a configured subscription. This lifetime is driven by 238 relevant configuration being present within the publisher's 239 applied configuration. Being tied to configuration operations 240 implies configured subscriptions can be configured to persist 241 across reboots, and implies a configured subscription can persist 242 even when its publisher is fully disconnected from any network. 244 o Configured subscriptions can be modified by any configuration 245 client with write permission on the configuration of the 246 subscription. Dynamic subscriptions can only be modified via an 247 RPC request made by the original subscriber, or a change to 248 configuration data referenced by the subscription. 250 Note that there is no mixing-and-matching of dynamic and configured 251 operations on a single subscription. Specifically, a configured 252 subscription cannot be modified or deleted using RPCs defined in this 253 document. Similarly, a dynamic subscription cannot be directly 254 modified or deleted by configuration operations. It is however 255 possible to perform a configuration operation which indirectly 256 impacts a dynamic subscription. By changing value of a pre- 257 configured filter referenced by an existing dynamic subscription, the 258 selected event records passed to a receiver might change. 260 Also note that transport specific transport drafts based on this 261 specification MUST detail the life cycle of dynamic subscriptions, as 262 well as the lifecycle of configured subscriptions (if supported). 264 A publisher MAY terminate a dynamic subscription at any time. 265 Similarly, it MAY decide to temporarily suspend the sending of 266 notification messages for any dynamic subscription, or for one or 267 more receivers of a configured subscription. Such termination or 268 suspension is driven by internal considerations of the publisher. 270 1.4. Relationship to RFC 5277 272 This document is intended to provide a superset of the subscription 273 capabilities initially defined within [RFC5277]. Especially when 274 extending an existing [RFC5277] implementation, it is important to 275 understand what has been reused and what has been replaced. Key 276 relationships between these two documents include: 278 o this document defines a transport independent capability, 279 [RFC5277] is specific to NETCONF. 281 o the data model in this document is used instead of the data model 282 in Section 3.4 of [RFC5277] for the new operations. 284 o the RPC operations in this draft replace the operation "create- 285 subscription" defined in [RFC5277], section 4. 287 o the message of [RFC5277], Section 4 is used. 289 o the included contents of the "NETCONF" event stream are identical 290 between this document and [RFC5277]. 292 o a publisher MAY implement both the Notification Management Schema 293 and RPCs defined in [RFC5277] and this new document concurrently. 295 o unlike [RFC5277], this document enables a single transport session 296 to intermix notification messages and RPCs for different 297 subscriptions. 299 o A subscription "stop-time" can be specified as part of a 300 notification replay. This supports an analogous capability to the 301 stopTime parameter of [RFC5277]. However in this specification, a 302 "stop-time" parameter can also be applied without replay. 304 2. Solution 306 Per the overview provided in Section 1.3, this section details the 307 overall context, state machines, and subsystems which may be 308 assembled to allow the subscription of events from a publisher. 310 2.1. Event Streams 312 An event stream is a named entity on a publisher which exposes a 313 continuously updating set of YANG encoded event records. An event 314 record is an instantiation of a "notification" YANG statement. If 315 the "notification" is defined as a child to a data node, the 316 instantiation includes the hierarchy of nodes that identifies the 317 data node in the datastore (see Section 7.16.2 of [RFC7950]). Each 318 event stream is available for subscription. It is out of the scope 319 of this document to identify a) how event streams are defined (other 320 than the NETCONF stream), b) how event records are defined/generated, 321 and c) how event records are assigned to event streams. 323 There is only one reserved event stream name within this document: 324 "NETCONF". The "NETCONF" event stream contains all NETCONF event 325 record information supported by the publisher, except where an event 326 record has explicitly been excluded from the stream. Beyond the 327 "NETCONF" stream, implementations MAY define additional event 328 streams. 330 As YANG encoded event records are created by a system, they may be 331 assigned to one or more streams. The event record is distributed to 332 a subscription's receiver(s) where: (1) a subscription includes the 333 identified stream, and (2) subscription filtering does not exclude 334 the event record from that receiver. 336 Access control permissions may be used to silently exclude event 337 records from within an event stream for which the receiver has no 338 read access. As an example of how this might be accomplished, see 339 [RFC8341] section 3.4.6. Note that per Section 2.7 of this document, 340 subscription state change notifications are never filtered out. 342 If no access control permissions are in place for event records on an 343 event stream, then a receiver MUST be allowed access to all the event 344 records. If subscriber permissions change during the lifecycle of a 345 subscription and event stream access is no longer permitted, then the 346 subscription MUST be terminated. 348 Event records MUST NOT be delivered to a receiver in a different 349 order than they were placed onto an event stream. 351 2.2. Event Stream Filters 353 This document defines an extensible filtering mechanism. The filter 354 itself is a boolean test which is placed on the content of an event 355 record. A 'false' filtering result causes the event record to be 356 excluded from delivery to a receiver. A filter never results in 357 information being stripped from within an event record prior to that 358 event record being encapsulated within a notification message. The 359 two optional event stream filtering syntaxes supported are [XPATH] 360 and subtree [RFC6241]. 362 If no event stream filter is provided within a subscription, all 363 event records on an event stream are to be sent. 365 2.3. QoS 367 This document provides for several QoS parameters. These parameters 368 indicate the treatment of a subscription relative to other traffic 369 between publisher and receiver. Included are: 371 o A "dscp" marking to differentiate prioritization of notification 372 messages during network transit. 374 o A "weighting" so that bandwidth proportional to this weighting can 375 be allocated to this subscription relative to other subscriptions. 377 o a "dependency" upon another subscription. 379 If the publisher supports the "dscp" feature, then a subscription 380 with a "dscp" leaf MUST result in a corresponding [RFC2474] DSCP 381 marking being placed within the IP header of any resulting 382 notification messages and subscription state change notifications. 383 Where TCP is used, a publisher which supports the "dscp" feature 384 SHOULD ensure that a subscription's notification messages are 385 returned within a single TCP transport session where all traffic 386 shares the subscription's "dscp" leaf value. Where this cannot be 387 guaranteed, any "establish subscription" RPC request SHOULD be 388 rejected with a "dscp-unavailable" error 390 For the "weighting" parameter, when concurrently dequeuing 391 notification messages from multiple subscriptions to a receiver, the 392 publisher MUST allocate bandwidth to each subscription proportionally 393 to the weights assigned to those subscriptions. "Weighting" is an 394 optional capability of the publisher; support for it is identified 395 via the "qos" feature. 397 If a subscription has the "dependency" parameter set, then any 398 buffered notification messages containing event records selected by 399 the parent subscription MUST be dequeued prior to the notification 400 messages of the dependent subscription. If notification messages 401 have dependencies on each other, the notification message queued the 402 longest MUST go first. If a "dependency" included within an RPC 403 references a subscription which does not exist or is no longer 404 accessible to that subscriber, that "dependency" MUST be silently 405 removed. "Dependency" is an optional capability of the publisher; 406 support for it is identified via the "qos" feature. 408 2.4. Dynamic Subscriptions 410 Dynamic subscriptions are managed via protocol operations (in the 411 form of [RFC7950], Section 7.14 RPCs) made against targets located 412 within the publisher. These RPCs have been designed extensibly so 413 that they may be augmented for subscription targets beyond event 414 streams. For examples of such augmentations, see the RPC 415 augmentations within [I-D.ietf-netconf-yang-push]'s YANG model. 417 2.4.1. Dynamic Subscription State Model 419 Below is the publisher's state machine for a dynamic subscription. 420 Each state is shown in its own box. It is important to note that 421 such a subscription doesn't exist at the publisher until an 422 "establish-subscription" RPC is accepted. The mere request by a 423 subscriber to establish a subscription is insufficient for that 424 subscription to be externally visible. Start and end states are 425 depicted to reflect subscription creation and deletion events. 427 ......... 428 : start : 429 :.......: 430 | 431 establish-subscription 432 | 433 | .-------modify-subscription--------. 434 v v | 435 .-----------. .-----------. 436 .--------. | receiver |--insufficient CPU, b/w-->| receiver | 437 modify- '| active | | suspended | 438 subscription | |<----CPU, b/w sufficient--| | 439 ---------->'-----------' '-----------' 440 | | 441 delete/kill-subscription delete/kill- 442 | subscription 443 v | 444 ......... | 445 : end :<---------------------------------' 446 :.......: 448 Figure 1: Publisher's state for a dynamic subscription 450 Of interest in this state machine are the following: 452 o Successful "establish-subscription" or "modify-subscription" RPCs 453 put the subscription into the active state. 455 o Failed "modify-subscription" RPCs will leave the subscription in 456 its previous state, with no visible change to any streaming 457 updates. 459 o A "delete-subscription" or "kill-subscription" RPC will end the 460 subscription, as will the reaching of a "stop-time". 462 o A publisher may choose to suspend a subscription when there is 463 insufficient CPU or bandwidth available to service the 464 subscription. This is notified to a subscriber with a 465 "subscription-suspended" subscription state change notification. 467 o A suspended subscription may be modified by the subscriber (for 468 example in an attempt to use fewer resources). Successful 469 modification returns the subscription to the active state. 471 o Even without a "modify-subscription" request, a publisher may 472 return a subscription to the active state should the resource 473 constraints become sufficient again. This is announced to the 474 subscriber via the "subscription-resumed" subscription state 475 change notification. 477 2.4.2. Establishing a Dynamic Subscription 479 The "establish-subscription" RPC allows a subscriber to request the 480 creation of a subscription. 482 The input parameters of the operation are: 484 o A "stream" name which identifies the targeted event stream against 485 which the subscription is applied. 487 o An event stream filter which may reduce the set of event records 488 pushed. 490 o Where the transport used by the RPC supports multiple encodings, 491 an optional "encoding" for the event records pushed. If no 492 "encoding" is included, the encoding of the RPC MUST be used. 494 o An optional "stop-time" for the subscription. If no "stop-time" 495 is present, notification messages will continue to be sent until 496 the subscription is terminated. 498 o An optional "replay-start-time" for the subscription. The 499 "replay-start-time" MUST be in the past and indicates that the 500 subscription is requesting a replay of previously generated 501 information from the event stream. For more on replay, see 502 Section 2.4.2.1. Where there is no "replay-start-time", the 503 subscription starts immediately. 505 If the publisher can satisfy the "establish-subscription" request, it 506 replies with an identifier for the subscription, and then immediately 507 starts streaming notification messages. 509 Below is a tree diagram for "establish-subscription". All objects 510 contained in this tree are described within the included YANG model 511 within Section 4. 513 +---x establish-subscription 514 +---w input 515 | +---w (target) 516 | | +--:(stream) 517 | | +---w (stream-filter)? 518 | | | +--:(by-reference) 519 | | | | +---w stream-filter-name 520 | | | | stream-filter-ref 521 | | | +--:(within-subscription) 522 | | | +---w (filter-spec)? 523 | | | +--:(stream-subtree-filter) 524 | | | | +---w stream-subtree-filter? 525 | | | | {subtree}? 526 | | | +--:(stream-xpath-filter) 527 | | | +---w stream-xpath-filter? 528 | | | yang:xpath1.0 {xpath}? 529 | | +---w stream stream-ref 530 | | +---w replay-start-time? 531 | | yang:date-and-time {replay}? 532 | +---w stop-time? 533 | | yang:date-and-time 534 | +---w dscp? inet:dscp 535 | | {dscp}? 536 | +---w weighting? uint8 537 | | {qos}? 538 | +---w dependency? 539 | | subscription-id {qos}? 540 | +---w encoding? encoding 541 +--ro output 542 +--ro id subscription-id 543 +--ro replay-start-time-revision? yang:date-and-time 544 {replay}? 546 Figure 2: establish-subscription RPC tree diagram 548 A publisher MAY reject the "establish-subscription" RPC for many 549 reasons as described in Section 2.4.6. The contents of the resulting 550 RPC error response MAY include details on input parameters which if 551 considered in a subsequent "establish-subscription" RPC, may result 552 in a successful subscription establishment. Any such hints MUST be 553 transported within a yang-data "establish-subscription-stream-error- 554 info" container included within the RPC error response. 556 yang-data establish-subscription-stream-error-info 557 +--ro establish-subscription-stream-error-info 558 +--ro reason? identityref 559 +--ro filter-failure-hint? string 561 Figure 3: establish-subscription RPC yang-data tree diagram 563 2.4.2.1. Requesting a replay of event records 565 Replay provides the ability to establish a subscription which is also 566 capable of passing recently generated event records. In other words, 567 as the subscription initializes itself, it sends any event records 568 within the target event stream which meet the filter criteria, which 569 have an event time which is after the "replay-start-time", and which 570 have an event time before the "stop-time" should this "stop-time" 571 exist. The end of these historical event records is identified via a 572 "replay-completed" subscription state change notification. Any event 573 records generated since the subscription establishment may then 574 follow. For a particular subscription, all event records will be 575 delivered in the order they are placed into the event stream. 577 Replay is an optional feature which is dependent on an event stream 578 supporting some form of logging. This document puts no restrictions 579 on the size or form of the log, where it resides within the 580 publisher, or when event record entries in the log are purged. 582 The inclusion of a "replay-start-time" within an "establish- 583 subscription" RPC indicates a replay request. If the "replay-start- 584 time" contains a value that is earlier than what a publisher's 585 retained history supports, then if the subscription is accepted, the 586 actual publisher's revised start time MUST be set in the returned 587 "replay-start-time-revision" object. 589 A "stop-time" parameter may be included in a replay subscription. 590 For a replay subscription, the "stop-time" MAY be earlier than the 591 current time, but MUST be later than the "replay-start-time". 593 If the given "replay-start-time" is later than the time marked within 594 any event records retained within the replay buffer, then the 595 publisher MUST send a "replay-completed" notification immediately 596 after a successful establish-subscription RPC response. 598 If an event stream supports replay, the "replay-support" leaf is 599 present in the "/streams/stream" list entry for the event stream. An 600 event stream that does support replay is not expected to have an 601 unlimited supply of saved notifications available to accommodate any 602 given replay request. To assess the timeframe available for replay, 603 subscribers can read the leafs "replay-log-creation-time" and 604 "replay-log-aged-time". See Figure 18 for the YANG tree, and 605 Section 4 for the YANG model describing these elements. The actual 606 size of the replay log at any given time is a publisher specific 607 matter. Control parameters for the replay log are outside the scope 608 of this document. 610 2.4.3. Modifying a Dynamic Subscription 612 The "modify-subscription" operation permits changing the terms of an 613 existing dynamic subscription. Dynamic subscriptions can be modified 614 any number of times. Dynamic subscriptions can only be modified via 615 this RPC using a transport session connecting to the subscriber. If 616 the publisher accepts the requested modifications, it acknowledges 617 success to the subscriber, then immediately starts sending event 618 records based on the new terms. 620 Subscriptions created by configuration cannot be modified via this 621 RPC. However configuration may be used to modify objects referenced 622 by the subscription (such as a referenced filter). 624 Below is a tree diagram for "modify-subscription". All objects 625 contained in this tree are described within the included YANG model 626 within Section 4. 628 +---x modify-subscription 629 +---w input 630 +---w id 631 | subscription-id 632 +---w (target) 633 | +--:(stream) 634 | +---w (stream-filter)? 635 | +--:(by-reference) 636 | | +---w stream-filter-name 637 | | stream-filter-ref 638 | +--:(within-subscription) 639 | +---w (filter-spec)? 640 | +--:(stream-subtree-filter) 641 | | +---w stream-subtree-filter? 642 | | {subtree}? 643 | +--:(stream-xpath-filter) 644 | +---w stream-xpath-filter? 645 | yang:xpath1.0 {xpath}? 646 +---w stop-time? 647 yang:date-and-time 649 Figure 4: modify-subscription RPC tree diagram 651 If the publisher accepts the requested modifications on a currently 652 suspended subscription, the subscription will immediately be resumed 653 (i.e., the modified subscription is returned to the active state.) 654 The publisher MAY immediately suspend this newly modified 655 subscription through the "subscription-suspended" notification before 656 any event records are sent. 658 If the publisher rejects the RPC request, the subscription remains as 659 prior to the request. That is, the request has no impact whatsoever. 660 Rejection of the RPC for any reason is indicated by via RPC error as 661 described in Section 2.4.6. The contents of such a rejected RPC MAY 662 include hints on inputs which (if considered) may result in a 663 successfully modified subscription. These hints MUST be transported 664 within a yang-data "modify-subscription-stream-error-info" container 665 inserted into the RPC error response. 667 Below is a tree diagram for "modify-subscription-RPC-yang-data". All 668 objects contained in this tree are described within the included YANG 669 model within Section 4. 671 yang-data modify-subscription-stream-error-info 672 +--ro modify-subscription-stream-error-info 673 +--ro reason? identityref 674 +--ro filter-failure-hint? string 676 Figure 5: modify-subscription RPC yang-data tree diagram 678 2.4.4. Deleting a Dynamic Subscription 680 The "delete-subscription" operation permits canceling an existing 681 subscription. If the publisher accepts the request, and the 682 publisher has indicated success, the publisher MUST NOT send any more 683 notification messages for this subscription. 685 Below is a tree diagram for "delete-subscription". All objects 686 contained in this tree are described within the included YANG model 687 within Section 4. 689 +---x delete-subscription 690 +---w input 691 +---w id subscription-id 693 Figure 6: delete-subscription RPC tree diagram 695 Dynamic subscriptions can only be deleted via this RPC using a 696 transport session connecting to the subscriber. Configured 697 subscriptions cannot be deleted using RPCs. 699 2.4.5. Killing a Dynamic Subscription 701 The "kill-subscription" operation permits an operator to end a 702 dynamic subscription which is not associated with the transport 703 session used for the RPC. A publisher MUST terminate any dynamic 704 subscription identified by the "id" parameter in the RPC request, if 705 such a subscription exists. 707 Configured subscriptions cannot be killed using this RPC. Instead, 708 configured subscriptions are deleted as part of regular configuration 709 operations. Publishers MUST reject any RPC attempt to kill a 710 configured subscription. 712 Below is a tree diagram for "kill-subscription". All objects 713 contained in this tree are described within the included YANG model 714 within Section 4. 716 +---x kill-subscription 717 +---w input 718 +---w id subscription-id 720 Figure 7: kill-subscription RPC tree diagram 722 2.4.6. RPC Failures 724 Whenever an RPC is unsuccessful, the publisher returns relevant 725 information as part of the RPC error response. Transport level error 726 processing MUST be done before RPC error processing described in this 727 section. In all cases, RPC error information returned will use 728 existing transport layer RPC structures, such as those seen with 729 NETCONF in [RFC6241] Appendix A, or with RESTCONF in [RFC8040] 730 Section 7.1. These structures MUST be able to encode subscription 731 specific errors identified below and defined within this document's 732 YANG model. 734 As a result of this mixture, how subscription errors are encoded 735 within an RPC error response is transport dependent. Following are 736 valid errors which can occur for each RPC: 738 establish-subscription modify-subscription 739 ---------------------- ------------------- 740 dscp-unavailable filter-unsupported 741 encoding-unsupported insufficient-resources 742 filter-unsupported no-such-subscription 743 insufficient-resources 744 replay-unsupported 746 delete-subscription kill-subscription 747 ---------------------- ---------------------- 748 no-such-subscription no-such-subscription 750 To see a NETCONF based example of an error response from above, see 751 [I-D.draft-ietf-netconf-netconf-event-notifications], Figure 10. 753 There is one final set of transport independent RPC error elements 754 included in the YANG model. These are three yang-data structures 755 which enable the publisher to provide to the receiver that error 756 information which does not fit into existing transport layer RPC 757 structures. These three yang-data structures are: 759 1. "establish-subscription-stream-error-info": This MUST be returned 760 with the leaf "reason" populated if an RPC error reason has not 761 been placed elsewhere within the transport portion of a failed 762 "establish-subscription" RPC response. This MUST be sent if 763 hints on how to overcome the RPC error are included. 765 2. "modify-subscription-stream-error-info": This MUST be returned 766 with the leaf "reason" populated if an RPC error reason has not 767 been placed elsewhere within the transport portion of a failed 768 "modify-subscription" RPC response. This MUST be sent if hints 769 on how to overcome the RPC error are included. 771 3. "delete-subscription-error-info": This MUST be returned with the 772 leaf "reason" populated if an RPC error reason has not been 773 placed elsewhere within the transport portion of a failed 774 "delete-subscription" or "kill-subscription" RPC response. 776 2.5. Configured Subscriptions 778 A configured subscription is a subscription installed via 779 configuration. Configured subscriptions may be modified by any 780 configuration client with the proper permissions. Subscriptions can 781 be modified or terminated via configuration at any point of their 782 lifetime. Multiple configured subscriptions MUST be supportable over 783 a single transport session. 785 Configured subscriptions have several characteristics distinguishing 786 them from dynamic subscriptions: 788 o persistence across publisher reboots, 790 o persistence even when transport is unavailable, and 792 o an ability to send notification messages to more than one receiver 793 (note that receivers are unaware of the existence of any other 794 receivers.) 796 On the publisher, supporting configured subscriptions is optional and 797 advertised using the "configured" feature. On a receiver of a 798 configured subscription, support for dynamic subscriptions is 799 optional. However if replaying missed event records is required for 800 a configured subscription, support for dynamic subscription is highly 801 recommended. In this case, a separate dynamic subscription can be 802 established to retransmit the missing event records. 804 In addition to the subscription parameters available to dynamic 805 subscriptions described in Section 2.4.2, the following additional 806 parameters are also available to configured subscriptions: 808 o A "transport" which identifies the transport protocol to use to 809 connect with all subscription receivers. 811 o One or more receivers, each intended as the destination for event 812 records. Note that each individual receiver is identifiable by 813 its "name". 815 o Optional parameters to identify where traffic should egress a 816 publisher: 818 * A "source-interface" which identifies the egress interface to 819 use from the publisher. Publisher support for this is optional 820 and advertised using the "interface-designation" feature. 822 * A "source-address" address, which identifies the IP address to 823 stamp on notification messages destined for the receiver. 825 * A "source-vrf" which identifies the VRF on which to reach 826 receivers. This VRF is a network instance as defined within 827 [I-D.draft-ietf-rtgwg-ni-model]. Publisher support for VRFs is 828 optional and advertised using the "supports-vrf" feature. 830 If none of the above parameters are set, notification messages 831 MUST egress the publisher's default interface. 833 A tree diagram describing these parameters is shown in Figure 20 834 within Section 3.3. All parameters are described within the YANG 835 model in Section 4. 837 2.5.1. Configured Subscription State Model 839 Below is the state machine for a configured subscription on the 840 publisher. This state machine describes the three states (valid, 841 invalid, and concluded), as well as the transitions between these 842 states. Start and end states are depicted to reflect configured 843 subscription creation and deletion events. The creation or 844 modification of a configured subscription initiates an evaluation by 845 the publisher to determine if the subscription is in valid or invalid 846 states. The publisher uses its own criteria in making this 847 determination. If in the valid state, the subscription becomes 848 operational. See (1) in the diagram below. 850 ......... 851 : start :-. 852 :.......: | 853 create .---modify-----.----------------------------------. 854 | | | | 855 V V .-------. ....... .---------. 856 .----[evaluate]--no--->|invalid|-delete->: end :<-delete-|concluded| 857 | '-------' :.....: '---------' 858 |-[evaluate]--no-(2). ^ ^ ^ 859 | ^ | | | | 860 yes | '->unsupportable delete stop-time 861 | modify (subscription- (subscription- (subscription- 862 | | terminated*) terminated*) concluded*) 863 | | | | | 864 (1) | (3) (4) (5) 865 | .---------------------------------------------------------------. 866 '-->| valid | 867 '---------------------------------------------------------------' 869 Legend: 870 dotted boxes: subscription added or removed via configuration 871 dashed boxes: states for a subscription 872 [evaluate]: decision point on whether the subscription is supportable 873 (*): resulting subscription state change notification 875 Figure 8: Publisher state model for a configured subscription 877 A subscription in the valid state may move to the invalid state in 878 one of two ways. First, it may be modified in a way which fails a 879 re-evaluation. See (2) in the diagram. Second, the publisher might 880 determine that the subscription is no longer supportable. This could 881 be for reasons of an unexpected but sustained increase in an event 882 stream's event records, degraded CPU capacity, a more complex 883 referenced filter, or other higher priority subscriptions which have 884 usurped resources. See (3) in the diagram. No matter the case, a 885 "subscription-terminated" notification is sent to any receivers in an 886 active or suspended state. A subscription in the valid state may 887 also transition to the concluded state via (5) if a configured stop 888 time has been reached. In this case, a "subscription-concluded" 889 notification is sent to any receivers in active or suspended states. 890 Finally, a subscription may be deleted by configuration (4). 892 When a subscription is in the valid state, a publisher will attempt 893 to connect with all receivers of a configured subscription and 894 deliver notification messages. Below is the state machine for each 895 receiver of a configured subscription. This receiver state machine 896 is fully contained within the state machine of the configured 897 subscription, and is only relevant when the configured subscription 898 is in the valid state. 900 .-----------------------------------------------------------------. 901 | valid | 902 | .----------. .------------. | 903 | | receiver |---timeout---------------->| receiver | | 904 | |connecting|<----------------reset--(c)|disconnected| | 905 | | |<-transport '------------' | 906 | '----------' loss,reset------------------------------. | 907 | (a) | | | 908 | subscription- (b) (b) | 909 | started* .--------. .---------. | 910 | '----->| |(d)-insufficient CPU,------->| | | 911 | |receiver| buffer overflow |receiver | | 912 | subscription-| active | |suspended| | 913 | modified* | |<----CPU, b/w sufficient,-(e)| | | 914 | '---->'--------' subscription-modified* '---------' | 915 '-----------------------------------------------------------------' 917 Legend: 918 dashed boxes which include the word 'receiver' show the possible 919 states for an individual receiver of a valid configured subscription. 920 * indicates a subscription state change notification 922 Figure 9: Receiver state for a configured subscription on a Publisher 924 When a configured subscription first moves to the valid state, the 925 "state" leaf of each receiver is initialized to the connecting state. 926 If transport connectivity is not available to any receiver and there 927 are any notification messages to deliver, a transport session is 928 established (e.g., through [RFC8071]). Individual receivers are 929 moved to the active state when a "subscription-started" subscription 930 state change notification is successfully passed to that receiver 931 (a). Event records are only sent to active receivers. Receivers of 932 a configured subscription remain active if both transport 933 connectivity can be verified to the receiver, and event records are 934 not being dropped due to a publisher buffer overflow. The result is 935 that a receiver will remain active on the publisher as long as events 936 aren't being lost, or the receiver cannot be reached. In addition, a 937 configured subscription's receiver MUST be moved to the connecting 938 state if the receiver is reset via the "reset" action (b), (c). For 939 more on reset, see Section 2.5.5. If transport connectivity cannot 940 be achieved while in the connecting state, the receiver MAY be moved 941 to the disconnected state. 943 A configured subscription's receiver MUST be moved to the suspended 944 state if there is transport connectivity between the publisher and 945 receiver, but notification messages are failing to be delivered due 946 to publisher buffer overflow, or notification messages are not able 947 to be generated for that receiver due to insufficient CPU (d). This 948 is indicated to the receiver by the "subscription-suspended" 949 subscription state change notification. 951 A configured subscription receiver MUST be returned to the active 952 state from the suspended state when notification messages are able to 953 be generated, bandwidth is sufficient to handle the notification 954 messages, and a receiver has successfully been sent a "subscription- 955 resumed" or "subscription-modified" subscription state change 956 notification (e). The choice as to which of these two subscription 957 state change notifications is sent is determined by whether the 958 subscription was modified during the period of suspension. 960 Modification of a configured subscription is possible at any time. A 961 "subscription-modified" subscription state change notification will 962 be sent to all active receivers, immediately followed by notification 963 messages conforming to the new parameters. Suspended receivers will 964 also be informed of the modification. However this notification will 965 await the end of the suspension for that receiver (e). 967 The mechanisms described above are mirrored in the RPCs and 968 notifications within the document. It should be noted that these 969 RPCs and notifications have been designed to be extensible and allow 970 subscriptions into targets other than event streams. For instance, 971 the YANG module defined in Section 5 of [I-D.ietf-netconf-yang-push] 972 augments "/sn:modify-subscription/sn:input/sn:target". 974 2.5.2. Creating a Configured Subscription 976 Configured subscriptions are established using configuration 977 operations against the top-level "subscriptions" subtree. 979 Because there is no explicit association with an existing transport 980 session, configuration operations MUST include additional parameters 981 beyond those of dynamic subscriptions. These parameters identify 982 each receiver, how to connect with that receiver, and possibly 983 whether the notification messages need to come from a specific egress 984 interface on the publisher. Receiver specific transport connectivity 985 parameters MUST be configured via transport specific augmentations to 986 this specification. See Section 2.5.7 for details. 988 After a subscription is successfully established, the publisher 989 immediately sends a "subscription-started" subscription state change 990 notification to each receiver. It is quite possible that upon 991 configuration, reboot, or even steady-state operations, a transport 992 session may not be currently available to the receiver. In this 993 case, when there is something to transport for an active 994 subscription, transport specific call-home operations will be used to 995 establish the connection. When transport connectivity is available, 996 notification messages may then be pushed. 998 With active configured subscriptions, it is allowable to buffer event 999 records even after a "subscription-started" has been sent. However 1000 if events are lost (rather than just delayed) due to replay buffer 1001 overflow, a new "subscription-started" must be sent. This new 1002 "subscription-started" indicates an event record discontinuity. 1004 To see an example of subscription creation using configuration 1005 operations over NETCONF, see Appendix A of 1006 [I-D.draft-ietf-netconf-netconf-event-notifications]. 1008 2.5.3. Modifying a Configured Subscription 1010 Configured subscriptions can be modified using configuration 1011 operations against the top-level "subscriptions" subtree. 1013 If the modification involves adding receivers, added receivers are 1014 placed in the connecting state. If a receiver is removed, the 1015 subscription state change notification "subscription-terminated" is 1016 sent to that receiver if that receiver is active or suspended. 1018 If the modification involves changing the policies for the 1019 subscription, the publisher sends to currently active receivers a 1020 "subscription-modified" notification. For any suspended receivers, a 1021 "subscription-modified" notification will be delayed until the 1022 receiver is resumed. (Note: in this case, the "subscription- 1023 modified" notification informs the receiver that the subscription has 1024 been resumed, so no additional "subscription-resumed" need be sent. 1025 Also note that if multiple modifications have occurred during the 1026 suspension, only the "subscription-modified" notification describing 1027 the latest one need be sent to the receiver.) 1029 2.5.4. Deleting a Configured Subscription 1031 Subscriptions can be deleted through configuration against the top- 1032 level "subscriptions" subtree. 1034 Immediately after a subscription is successfully deleted, the 1035 publisher sends to all receivers of that subscription a subscription 1036 state change notification stating the subscription has ended (i.e., 1037 "subscription-terminated"). 1039 2.5.5. Resetting a Configured Subscription Receiver 1041 It is possible that a configured subscription to a receiver needs to 1042 be reset. This is accomplished via the "reset" action within the 1043 YANG model at "/subscriptions/subscription/receivers/receiver/reset". 1044 This action may be useful in cases where a publisher has timed out 1045 trying to reach a receiver. When such a reset occurs, a transport 1046 session will be initiated if necessary, and a new "subscription- 1047 started" notification will be sent. This action does not have any 1048 effect on transport connectivity if the needed connectivity already 1049 exists. 1051 2.5.6. Replay for a Configured Subscription 1053 It is possible to do replay on a configured subscription. This is 1054 supported via the configuration of the "configured-replay" object on 1055 the subscription. The setting of this object enables the streaming 1056 of the buffered event records for the subscribed event stream. All 1057 buffered event records which have been retained since the last 1058 publisher restart will be sent to each configured receiver. 1060 Replay of events records created since restart is useful. It allows 1061 event records generated before transport connectivity establishment 1062 to be passed to a receiver. Setting the restart time as the earliest 1063 configured replay time precludes possibility of resending of event 1064 records logged prior to publisher restart. It also ensures the same 1065 records will be sent to each configured receiver, regardless of the 1066 speed of transport connectivity establishment to each receiver. 1067 Finally, establishing restart as the earliest potential time for 1068 event records to be included within notification messages, a well- 1069 understood timeframe for replay is defined. 1071 As a result, when any configured subscription receivers become 1072 active, buffered event records will be sent immediately after the 1073 "subscription-started" notification. If the publisher knows the last 1074 event record sent to a receiver, and the publisher has not rebooted, 1075 the next event record on the event stream which meets filtering 1076 criteria will be the leading event record sent. Otherwise, the 1077 leading event record will be the first event record meeting filtering 1078 criteria subsequent to the latest of three different times: the 1079 "replay-log-creation-time", "replay-log-aged-time", or the most 1080 recent publisher boot time. The "replay-log-creation-time" and 1081 "replay-log-aged-time" are discussed in Section 2.4.2.1. The most 1082 recent publisher boot time ensures that duplicate event records are 1083 not replayed from a previous time the publisher was booted. 1085 It is quite possible that a receiver might want to retrieve event 1086 records from an event stream prior to the latest boot. If such 1087 records exist where there is a configured replay, the publisher MUST 1088 send the time of the event record immediately preceding the "replay- 1089 start-time" within the "replay-previous-event-time" leaf. Through 1090 the existence of the "replay-previous-event-time", the receiver will 1091 know that earlier events prior to reboot exist. In addition, if the 1092 subscriber was previously receiving event records with the same 1093 subscription "id", the receiver can determine if there was a timegap 1094 where records generated on the publisher were not successully 1095 received. And with this information, the receiver may choose to 1096 dynamically subscribe to retrieve any event records placed into the 1097 event stream before the most recent boot time. 1099 All other replay functionality remains the same as with dynamic 1100 subscriptions as described in Section 2.4.2.1. 1102 2.5.7. Transport Connectivity for a Configured Subscription 1104 This specification is transport independent. However supporting a 1105 configured subscription will often require the establishment of 1106 transport connectivity. And the parameters used for this transport 1107 connectivity establishment are transport specific. As a result, the 1108 YANG model defined within Section 4 is not able to directly define 1109 and expose these transport parameters. 1111 It is necessary for an implementation to support the connection 1112 establishment process. To support this function, the YANG model does 1113 include a node where transport specific parameters for a particular 1114 receiver may be augmented. This node is 1115 "/subscriptions/subscription/receivers/receiver". By augmenting 1116 transport parameters from this node, system developers are able to 1117 incorporate the YANG objects necessary to support the transport 1118 connectivity establishment process. 1120 The result of this is the following requirement. A publisher 1121 supporting the feature "configured" MUST also support least one YANG 1122 model which augments transport connectivity parameters on 1123 "/subscriptions/subscription/receivers/receiver". For an example of 1124 such an augmentation, see Appendix A. 1126 2.6. Event Record Delivery 1128 Whether dynamic or configured, once a subscription has been set up, 1129 the publisher streams event records via notification messages per the 1130 terms of the subscription. For dynamic subscriptions, notification 1131 messages are sent over the session used to establish the 1132 subscription. For configured subscriptions, notification messages 1133 are sent over the connections specified by the transport and each 1134 receiver of a configured subscription. 1136 A notification message is sent to a receiver when an event record is 1137 not blocked by either the specified filter criteria or receiver 1138 permissions. This notification message MUST include an "eventTime" 1139 object as defined per [RFC5277] Section 4. This "eventTime" MUST be 1140 at the top level of YANG structured event record. 1142 The following example within [RFC7950] section 7.16.3 is an example 1143 of a compliant message: 1145 1147 2007-09-01T10:00:00Z 1148 1149 so-1/2/3.0 1150 up 1151 down 1152 1153 1155 Figure 10: subscribed notification message 1157 When a dynamic subscription has been started or modified, with 1158 "establish-subscription" or "modify-subscription" respectively, event 1159 records matching the newly applied filter criteria MUST NOT be sent 1160 until after the RPC reply has been sent. 1162 When a configured subscription has been started or modified, event 1163 records matching the newly applied filter criteria MUST NOT be sent 1164 until after the "subscription-started" or "subscription-modified" 1165 notifications has been sent, respectively. 1167 2.7. Subscription state change notifications 1169 In addition to sending event records to receivers, a publisher MUST 1170 also send subscription state change notifications when events related 1171 to subscription management have occurred. 1173 Subscription state change notifications are unlike other 1174 notifications in that they are never included in any event stream. 1175 Instead, they are inserted (as defined in this section) within the 1176 sequence of notification messages sent to a particular receiver. 1177 subscription state change notifications cannot be dropped or filtered 1178 out, they cannot be stored in replay buffers, and they are delivered 1179 only to impacted receivers of a subscription. The identification of 1180 subscription state change notifications is easy to separate from 1181 other notification messages through the use of the YANG extension 1182 "subscription-state-notif". This extension tags a notification as a 1183 subscription state change notification. 1185 The complete set of subscription state change notifications is 1186 described in the following subsections. 1188 2.7.1. subscription-started 1190 This notification indicates that a configured subscription has 1191 started, and event records may be sent. Included in this 1192 subscription state change notification are all the parameters of the 1193 subscription, except for the receiver(s) transport connection 1194 information and origin information indicating where notification 1195 messages will egress the publisher. Note that if a referenced filter 1196 from the "filters" container has been used within the subscription, 1197 the notification still provides the contents of that referenced 1198 filter under the "within-subscription" subtree. 1200 Note that for dynamic subscriptions, no "subscription-started" 1201 notifications are ever sent. 1203 Below is a tree diagram for "subscription-started". All objects 1204 contained in this tree are described within the included YANG model 1205 within Section 4. 1207 +---n subscription-started {configured}? 1208 +--ro id 1209 | subscription-id 1210 +--ro (target) 1211 | +--:(stream) 1212 | +--ro (stream-filter)? 1213 | | +--:(by-reference) 1214 | | | +--ro stream-filter-name 1215 | | | stream-filter-ref 1216 | | +--:(within-subscription) 1217 | | +--ro (filter-spec)? 1218 | | +--:(stream-subtree-filter) 1219 | | | +--ro stream-subtree-filter? 1220 | | | {subtree}? 1221 | | +--:(stream-xpath-filter) 1222 | | +--ro stream-xpath-filter? yang:xpath1.0 1223 | | {xpath}? 1224 | +--ro stream stream-ref 1225 | +--ro replay-start-time? 1226 | | yang:date-and-time {replay}? 1227 | +--ro replay-previous-event-time? 1228 | yang:date-and-time {replay}? 1229 +--ro stop-time? 1230 | yang:date-and-time 1231 +--ro dscp? inet:dscp 1232 | {dscp}? 1233 +--ro weighting? uint8 {qos}? 1234 +--ro dependency? 1235 | subscription-id {qos}? 1236 +--ro transport? transport 1237 | {configured}? 1238 +--ro encoding? encoding 1239 +--ro purpose? string 1240 {configured}? 1242 Figure 11: subscription-started notification tree diagram 1244 2.7.2. subscription-modified 1246 This notification indicates that a subscription has been modified by 1247 configuration operations. It is delivered directly after the last 1248 event records processed using the previous subscription parameters, 1249 and before any event records processed after the modification. 1251 Below is a tree diagram for "subscription-modified". All objects 1252 contained in this tree are described within the included YANG model 1253 within Section 4. 1255 +---n subscription-modified 1256 +--ro id 1257 | subscription-id 1258 +--ro (target) 1259 | +--:(stream) 1260 | +--ro (stream-filter)? 1261 | | +--:(by-reference) 1262 | | | +--ro stream-filter-name 1263 | | | stream-filter-ref 1264 | | +--:(within-subscription) 1265 | | +--ro (filter-spec)? 1266 | | +--:(stream-subtree-filter) 1267 | | | +--ro stream-subtree-filter? 1268 | | | {subtree}? 1269 | | +--:(stream-xpath-filter) 1270 | | +--ro stream-xpath-filter? yang:xpath1.0 1271 | | {xpath}? 1272 | +--ro stream stream-ref 1273 | +--ro replay-start-time? 1274 | yang:date-and-time {replay}? 1275 +--ro stop-time? 1276 | yang:date-and-time 1277 +--ro dscp? inet:dscp 1278 | {dscp}? 1279 +--ro weighting? uint8 {qos}? 1280 +--ro dependency? 1281 | subscription-id {qos}? 1282 +--ro transport? transport 1283 | {configured}? 1284 +--ro encoding? encoding 1285 +--ro purpose? string 1286 {configured}? 1288 Figure 12: subscription-modified notification tree diagram 1290 A publisher most often sends this notification directly after the 1291 modification of any configuration parameters impacting a configured 1292 subscription. But it may also be sent at two other times: 1294 1. Where a configured subscription has been modified during the 1295 suspension of a receiver, the notification will be delayed until 1296 the receiver's suspension is lifted. In this situation, the 1297 notification indicates that the subscription has been both 1298 modified and resumed. 1300 2. A "subscription-modified" subscription state change notification 1301 MUST be sent if the contents of the filter identified by the 1302 subscription's "stream-filter-ref" leaf has changed. This state 1303 change notification is to be sent for a filter change impacting 1304 any active receiver of a configured or dynamic subscription. 1306 2.7.3. subscription-terminated 1308 This notification indicates that no further event records for this 1309 subscription should be expected from the publisher. A publisher may 1310 terminate the sending event records to a receiver for the following 1311 reasons: 1313 1. Configuration which removes a configured subscription, or a 1314 "kill-subscription" RPC which ends a dynamic subscription. These 1315 are identified via the reason "no-such-subscription". 1317 2. A referenced filter is no longer accessible. This is identified 1318 by "filter-unavailable". 1320 3. The event stream referenced by a subscription is no longer 1321 accessible by the receiver. This is identified by "stream- 1322 unavailable". 1324 4. A suspended subscription has exceeded some timeout. This is 1325 identified by "suspension-timeout". 1327 Each of the reasons above correspond one-to-one with a "reason" 1328 identityref specified within the YANG model. 1330 Below is a tree diagram for "subscription-terminated". All objects 1331 contained in this tree are described within the included YANG model 1332 within Section 4. 1334 +---n subscription-terminated 1335 +--ro id subscription-id 1336 +--ro reason identityref 1338 Figure 13: subscription-terminated notification tree diagram 1340 Note: this subscription state change notification MUST be sent to a 1341 dynamic subscription's receiver when the subscription ends 1342 unexpectedly. The cases when this might happen are when a "kill- 1343 subscription" RPC is successful, or when some other event not 1344 including the reaching the subscription's "stop-time" results in a 1345 publisher choosing to end the subscription. 1347 2.7.4. subscription-suspended 1349 This notification indicates that a publisher has suspended the 1350 sending of event records to a receiver, and also indicates the 1351 possible loss of events. Suspension happens when capacity 1352 constraints stop a publisher from serving a valid subscription. The 1353 two conditions where is this possible are: 1355 1. "insufficient-resources" when a publisher is unable to produce 1356 the requested event stream of notification messages, and 1358 2. "unsupportable-volume" when the bandwidth needed to get generated 1359 notification messages to a receiver exceeds a threshold. 1361 These conditions are encoded within the "reason" object. No further 1362 notification will be sent until the subscription resumes or is 1363 terminated. 1365 Below is a tree diagram for "subscription-suspended". All objects 1366 contained in this tree are described within the included YANG model 1367 within Section 4. 1369 +---n subscription-suspended 1370 +--ro id subscription-id 1371 +--ro reason identityref 1373 Figure 14: subscription-suspended notification tree diagram 1375 2.7.5. subscription-resumed 1377 This notification indicates that a previously suspended subscription 1378 has been resumed under the unmodified terms previously in place. 1379 Subscribed event records generated after the issuance of this 1380 subscription state change notification may now be sent. 1382 Below is the tree diagram for "subscription-resumed". All objects 1383 contained in this tree are described within the included YANG model 1384 within Section 4. 1386 +---n subscription-resumed 1387 +--ro id subscription-id 1389 Figure 15: subscription-resumed notification tree diagram 1391 2.7.6. subscription-completed 1393 This notification indicates that a subscription that includes a 1394 "stop-time" has successfully finished passing event records upon the 1395 reaching of that time. 1397 Below is a tree diagram for "subscription-completed". All objects 1398 contained in this tree are described within the included YANG model 1399 within Section 4. 1401 +---n subscription-completed {configured}? 1402 +--ro id subscription-id 1404 Figure 16: subscription-completed notification tree diagram 1406 2.7.7. replay-completed 1408 This notification indicates that all of the event records prior to 1409 the current time have been passed to a receiver. It is sent before 1410 any notification message containing an event record with a timestamp 1411 later than (1) the "stop-time" or (2) the subscription's start time. 1413 If a subscription contains no "stop-time", or has a "stop-time" that 1414 has not been reached, then after the "replay-completed" notification 1415 has been sent, additional event records will be sent in sequence as 1416 they arise naturally on the publisher. 1418 Below is a tree diagram for "replay-completed". All objects 1419 contained in this tree are described within the included YANG model 1420 within Section 4. 1422 +---n replay-completed {replay}? 1423 +--ro id subscription-id 1425 Figure 17: replay-completed notification tree diagram 1427 2.8. Subscription Monitoring 1429 In the operational state datastore, the container "subscriptions" 1430 maintains the state of all dynamic subscriptions, as well as all 1431 configured subscriptions. Using datastore retrieval operations, or 1432 subscribing to the "subscriptions" container 1433 [I-D.ietf-netconf-yang-push] allows the state of subscriptions and 1434 their connectivity to receivers to be monitored. 1436 Each subscription in the operational state datastore is represented 1437 as a list element. Included in this list are event counters for each 1438 receiver, the state of each receiver, as well as the subscription 1439 parameters currently in effect. The appearance of the leaf 1440 "configured-subscription-state" indicates that a particular 1441 subscription came into being via configuration. This leaf also 1442 indicates if the current state of that subscription is valid, 1443 invalid, and concluded. 1445 To understand the flow of event records within a subscription, there 1446 are two counters available for each receiver. The first counter is 1447 "sent-event-records" which shows the quantity of events actually 1448 identified for sending to a receiver. The second counter is 1449 "excluded-event-records" which shows event records not sent to 1450 receiver. "excluded-event-records" shows the combined results of 1451 both access control and per-subscription filtering. For configured 1452 subscriptions, counters are reset whenever the subscription is 1453 evaluated to valid (see (1) in Figure 8). 1455 Dynamic subscriptions are removed from the operational state 1456 datastore once they expire (reaching stop-time) or when they are 1457 terminated. While many subscription objects are shown as 1458 configurable, dynamic subscriptions are only included within the 1459 operational state datastore and as a result are not configurable. 1461 2.9. Advertisement 1463 Publishers supporting this document MUST indicate support of the YANG 1464 model "ietf-subscribed-notifications" within the YANG library of the 1465 publisher. In addition if supported, the optional features "encode- 1466 xml", "encode-json", "configured" "supports-vrf", "qos", "xpath", 1467 "subtree", "interface-designation", "dscp", and "replay" MUST be 1468 indicated. 1470 3. YANG Data Model Trees 1472 This section contains tree diagrams for nodes defined in Section 4. 1473 For tree diagrams of subscription state change notifications, see 1474 Section 2.7. For the tree diagrams for the RPCs, see Section 2.4. 1476 3.1. Event Streams Container 1478 A publisher maintains a list of available event streams as 1479 operational data. This list contains both standardized and vendor- 1480 specific event streams. This enables subscribers to discover what 1481 streams a publisher supports. 1483 +--ro streams 1484 +--ro stream* [name] 1485 +--ro name string 1486 +--ro description string 1487 +--ro replay-support? empty {replay}? 1488 +--ro replay-log-creation-time yang:date-and-time 1489 | {replay}? 1490 +--ro replay-log-aged-time? yang:date-and-time 1491 {replay}? 1493 Figure 18: Stream Container tree diagram 1495 Above is a tree diagram for the "streams" container. All objects 1496 contained in this tree are described within the included YANG model 1497 within Section 4. 1499 3.2. Filters Container 1501 The "filters" container maintains a list of all subscription filters 1502 that persist outside the life-cycle of a single subscription. This 1503 enables pre-defined filters which may be referenced by more than one 1504 subscription. 1506 +--rw filters 1507 +--rw stream-filter* [name] 1508 +--rw name string 1509 +--rw (filter-spec)? 1510 +--:(stream-subtree-filter) 1511 | +--rw stream-subtree-filter? {subtree}? 1512 +--:(stream-xpath-filter) 1513 +--rw stream-xpath-filter? yang:xpath1.0 {xpath}? 1515 Figure 19: Filter Container tree diagram 1517 Above is a tree diagram for the filters container. All objects 1518 contained in this tree are described within the included YANG model 1519 within Section 4. 1521 3.3. Subscriptions Container 1523 The "subscriptions" container maintains a list of all subscriptions 1524 on a publisher, both configured and dynamic. It can be used to 1525 retrieve information about the subscriptions which a publisher is 1526 serving. 1528 +--rw subscriptions 1529 +--rw subscription* [id] 1530 +--rw id 1531 | subscription-id 1532 +--rw (target) 1533 | +--:(stream) 1534 | +--rw (stream-filter)? 1535 | | +--:(by-reference) 1536 | | | +--rw stream-filter-name 1537 | | | stream-filter-ref 1538 | | +--:(within-subscription) 1539 | | +--rw (filter-spec)? 1540 | | +--:(stream-subtree-filter) 1541 | | | +--rw stream-subtree-filter? 1542 | | | {subtree}? 1543 | | +--:(stream-xpath-filter) 1544 | | +--rw stream-xpath-filter? 1545 | | yang:xpath1.0 {xpath}? 1546 | +--rw stream stream-ref 1547 | +--ro replay-start-time? 1548 | | yang:date-and-time {replay}? 1549 | +--rw configured-replay? empty 1550 | {configured,replay}? 1551 +--rw stop-time? 1552 | yang:date-and-time 1553 +--rw dscp? inet:dscp 1554 | {dscp}? 1555 +--rw weighting? uint8 {qos}? 1556 +--rw dependency? 1557 | subscription-id {qos}? 1558 +--rw transport? transport 1559 | {configured}? 1560 +--rw encoding? encoding 1561 +--rw purpose? string 1562 | {configured}? 1563 +--rw (notification-message-origin)? {configured}? 1564 | +--:(interface-originated) 1565 | | +--rw source-interface? 1566 | | if:interface-ref {interface-designation}? 1567 | +--:(address-originated) 1568 | +--rw source-vrf? 1569 | | -> /ni:network-instances/network-instance/name 1570 | | {supports-vrf}? 1571 | +--rw source-address? 1572 | inet:ip-address-no-zone 1573 +--ro configured-subscription-state? enumeration 1574 | {configured}? 1575 +--rw receivers 1576 +--rw receiver* [name] 1577 +--rw name string 1578 +--ro sent-event-records? 1579 | yang:zero-based-counter64 1580 +--ro excluded-event-records? 1581 | yang:zero-based-counter64 1582 +--ro state enumeration 1583 +---x reset {configured}? 1584 +--ro output 1585 +--ro time yang:date-and-time 1587 Figure 20: Subscriptions tree diagram 1589 Above is a tree diagram for the subscriptions container. All objects 1590 contained in this tree are described within the included YANG model 1591 within Section 4. 1593 4. Data Model 1595 This module imports typedefs from [RFC6991], [RFC8343], and 1596 [RFC8040], and it references [I-D.draft-ietf-rtgwg-ni-model], 1597 [XPATH], [RFC6241], [RFC7049], [RFC7540], [RFC7951] , [RFC7950] and 1598 [RFC8259]. 1600 [ note to the RFC Editor - please replace XXXX within this YANG model 1601 with the number of this document, and XXXY with the number of 1602 [I-D.draft-ietf-rtgwg-ni-model] ] 1604 [ note to the RFC Editor - please replace the two dates within the 1605 YANG module with the date of publication ] 1607 file "ietf-subscribed-notifications@2019-04-05.yang" 1608 module ietf-subscribed-notifications { 1609 yang-version 1.1; 1610 namespace 1611 "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"; 1613 prefix sn; 1615 import ietf-inet-types { 1616 prefix inet; 1617 reference 1618 "RFC 6991: Common YANG Data Types"; 1619 } 1620 import ietf-interfaces { 1621 prefix if; 1622 reference 1623 "RFC 8343: A YANG Data Model for Interface Management"; 1625 } 1626 import ietf-netconf-acm { 1627 prefix nacm; 1628 reference 1629 "RFC 8341: Network Configuration Access Control Model"; 1630 } 1631 import ietf-network-instance { 1632 prefix ni; 1633 reference 1634 "draft-ietf-rtgwg-ni-model-12: YANG Model for Network Instances"; 1635 } 1636 import ietf-restconf { 1637 prefix rc; 1638 reference 1639 "RFC 8040: RESTCONF Protocol"; 1640 } 1641 import ietf-yang-types { 1642 prefix yang; 1643 reference 1644 "RFC 6991: Common YANG Data Types"; 1645 } 1647 organization "IETF NETCONF (Network Configuration) Working Group"; 1648 contact 1649 "WG Web: 1650 WG List: 1652 Author: Alexander Clemm 1653 1655 Author: Eric Voit 1656 1658 Author: Alberto Gonzalez Prieto 1659 1661 Author: Einar Nilsen-Nygaard 1662 1664 Author: Ambika Prasad Tripathy 1665 "; 1667 description 1668 "Contains a YANG specification for subscribing to event records 1669 and receiving matching content within notification messages. 1671 Copyright (c) 2018 IETF Trust and the persons identified as authors 1672 of the code. All rights reserved. 1674 Redistribution and use in source and binary forms, with or without 1675 modification, is permitted pursuant to, and subject to the license 1676 terms contained in, the Simplified BSD License set forth in Section 1677 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents 1678 (https://trustee.ietf.org/license-info). 1680 This version of this YANG module is part of RFC XXXX; see the RFC 1681 itself for full legal notices."; 1683 revision 2019-04-05 { 1684 description 1685 "Initial version"; 1686 reference 1687 "RFC XXXX:Subscription to YANG Event Notifications"; 1688 } 1690 /* 1691 * FEATURES 1692 */ 1694 feature configured { 1695 description 1696 "This feature indicates that configuration of subscriptions is 1697 supported."; 1698 } 1700 feature dscp { 1701 description 1702 "This feature indicates that a publisher supports the ability to 1703 set the DiffServ Code Point (DSCP) value in outgoing packets."; 1704 } 1706 feature encode-json { 1707 description 1708 "This feature indicates that JSON encoding of notification 1709 messages is supported."; 1710 } 1712 feature encode-xml { 1713 description 1714 "This feature indicates that XML encoding of notification 1715 messages is supported."; 1716 } 1718 feature interface-designation { 1719 description 1720 "This feature indicates a publisher supports sourcing all 1721 receiver interactions for a configured subscription from a single 1722 designated egress interface."; 1723 } 1725 feature qos { 1726 description 1727 "This feature indicates a publisher supports absolute 1728 dependencies of one subscription's traffic over another, as well 1729 as weighted bandwidth sharing between subscriptions. Both of 1730 these are Quality of Service (QoS) features which allow 1731 differentiated treatment of notification messages between a 1732 publisher and a specific receiver."; 1733 } 1735 feature replay { 1736 description 1737 "This feature indicates that historical event record replay is 1738 supported. With replay, it is possible for past event records to 1739 be streamed in chronological order."; 1740 } 1742 feature subtree { 1743 description 1744 "This feature indicates support for YANG subtree filtering."; 1745 reference "RFC 6241, Section 6."; 1746 } 1748 feature supports-vrf { 1749 description 1750 "This feature indicates a publisher supports VRF configuration 1751 for configured subscriptions. VRF support for dynamic 1752 subscriptions does not require this feature."; 1753 reference "RFC XXXY, Section 6."; 1754 } 1756 feature xpath { 1757 description 1758 "This feature indicates support for XPath filtering."; 1759 reference "http://www.w3.org/TR/1999/REC-xpath-19991116"; 1760 } 1762 /* 1763 * EXTENSIONS 1764 */ 1766 extension subscription-state-notification { 1767 description 1768 "This statement applies only to notifications. It indicates that 1769 the notification is a subscription state change notification. 1771 Therefore it does not participate in a regular event stream and 1772 does not need to be specifically subscribed to in order to be 1773 received. This statement can only occur as a substatement to the 1774 YANG 'notification' statement. This statement is not for use 1775 outside of this YANG module."; 1776 } 1778 /* 1779 * IDENTITIES 1780 */ 1782 /* Identities for RPC and Notification errors */ 1784 identity delete-subscription-error { 1785 description 1786 "Problem found while attempting to fulfill either a 1787 'delete-subscription' RPC request or a 'kill-subscription' 1788 RPC request."; 1789 } 1791 identity establish-subscription-error { 1792 description 1793 "Problem found while attempting to fulfill an 1794 'establish-subscription' RPC request."; 1795 } 1797 identity modify-subscription-error { 1798 description 1799 "Problem found while attempting to fulfill a 1800 'modify-subscription' RPC request."; 1801 } 1803 identity subscription-suspended-reason { 1804 description 1805 "Problem condition communicated to a receiver as part of a 1806 'subscription-terminated' notification."; 1807 } 1809 identity subscription-terminated-reason { 1810 description 1811 "Problem condition communicated to a receiver as part of a 1812 'subscription-terminated' notification."; 1813 } 1815 identity dscp-unavailable { 1816 base establish-subscription-error; 1817 if-feature "dscp"; 1818 description 1819 "The publisher is unable mark notification messages with a 1820 prioritization information in a way which will be respected 1821 during network transit."; 1822 } 1824 identity encoding-unsupported { 1825 base establish-subscription-error; 1826 description 1827 "Unable to encode notification messages in the desired format."; 1828 } 1830 identity filter-unavailable { 1831 base subscription-terminated-reason; 1832 description 1833 "Referenced filter does not exist. This means a receiver is 1834 referencing a filter which doesn't exist, or to which they do not 1835 have access permissions."; 1836 } 1838 identity filter-unsupported { 1839 base establish-subscription-error; 1840 base modify-subscription-error; 1841 description 1842 "Cannot parse syntax within the filter. This failure can be from 1843 a syntax error, or a syntax too complex to be processed by the 1844 publisher."; 1845 } 1847 identity insufficient-resources { 1848 base establish-subscription-error; 1849 base modify-subscription-error; 1850 base subscription-suspended-reason; 1851 description 1852 "The publisher has insufficient resources to support the 1853 requested subscription. An example might be that allocated CPU 1854 is too limited to generate the desired set of notification 1855 messages."; 1856 } 1858 identity no-such-subscription { 1859 base modify-subscription-error; 1860 base delete-subscription-error; 1861 base subscription-terminated-reason; 1862 description 1863 "Referenced subscription doesn't exist. This may be as a result of 1864 a non-existent subscription id, an id which belongs to another 1865 subscriber, or an id for configured subscription."; 1866 } 1867 identity replay-unsupported { 1868 base establish-subscription-error; 1869 if-feature "replay"; 1870 description 1871 "Replay cannot be performed for this subscription. This means the 1872 publisher will not provide the requested historic information 1873 from the event stream via replay to this receiver."; 1874 } 1876 identity stream-unavailable { 1877 base subscription-terminated-reason; 1878 description 1879 "Not a subscribable event stream. This means the referenced event 1880 stream is not available for subscription by the receiver."; 1881 } 1883 identity suspension-timeout { 1884 base subscription-terminated-reason; 1885 description 1886 "Termination of previously suspended subscription. The publisher 1887 has eliminated the subscription as it exceeded a time limit for 1888 suspension."; 1889 } 1891 identity unsupportable-volume { 1892 base subscription-suspended-reason; 1893 description 1894 "The publisher does not have the network bandwidth needed to get 1895 the volume of generated information intended for a receiver."; 1896 } 1898 /* Identities for encodings */ 1900 identity configurable-encoding { 1901 description 1902 "If a transport identity derives from this identity, it means 1903 that it supports configurable encodings. An example of a 1904 configurable encoding might be a new identity such as 1905 'encode-cbor'. Such an identity could use 1906 'configurable-encoding' as its base. This would allow a 1907 dynamic subscription encoded in JSON [RFC-8259] to request 1908 notification messages be encoded via CBOR [RFC-7049]. Further 1909 details for any specific configurable encoding would be 1910 explored in a transport document based on this specification."; 1911 } 1913 identity encoding { 1914 description 1915 "Base identity to represent data encodings"; 1916 } 1918 identity encode-xml { 1919 base encoding; 1920 if-feature "encode-xml"; 1921 description 1922 "Encode data using XML as described in RFC 7950"; 1923 reference 1924 "RFC 7950 - The YANG 1.1 Data Modeling Language"; 1925 } 1927 identity encode-json { 1928 base encoding; 1929 if-feature "encode-json"; 1930 description 1931 "Encode data using JSON as described in RFC 7951"; 1932 reference 1933 "RFC 7951 - JSON Encoding of Data Modeled with YANG"; 1934 } 1936 /* Identities for transports */ 1937 identity transport { 1938 description 1939 "An identity that represents the underlying mechanism for 1940 passing notification messages."; 1941 } 1943 /* 1944 * TYPEDEFs 1945 */ 1947 typedef encoding { 1948 type identityref { 1949 base encoding; 1950 } 1951 description 1952 "Specifies a data encoding, e.g. for a data subscription."; 1953 } 1955 typedef stream-filter-ref { 1956 type leafref { 1957 path "/sn:filters/sn:stream-filter/sn:name"; 1958 } 1959 description 1960 "This type is used to reference an event stream filter."; 1961 } 1962 typedef stream-ref { 1963 type leafref { 1964 path "/sn:streams/sn:stream/sn:name"; 1965 } 1966 description 1967 "This type is used to reference a system-provided event stream."; 1968 } 1970 typedef subscription-id { 1971 type uint32; 1972 description 1973 "A type for subscription identifiers."; 1974 } 1976 typedef transport { 1977 type identityref { 1978 base transport; 1979 } 1980 description 1981 "Specifies transport used to send notification messages to a 1982 receiver."; 1983 } 1985 /* 1986 * GROUPINGS 1987 */ 1989 grouping stream-filter-elements { 1990 description 1991 "This grouping defines the base for filters applied to event 1992 streams."; 1993 choice filter-spec { 1994 description 1995 "The content filter specification for this request."; 1996 anydata stream-subtree-filter { 1997 if-feature "subtree"; 1998 description 1999 "Event stream evaluation criteria encoded in the syntax of a 2000 subtree filter as defined in RFC 6241, Section 6. 2002 The subtree filter is applied to the representation of 2003 individual, delineated event records as contained within the 2004 event stream. 2006 If the subtree filter returns a non-empty node set, the 2007 filter matches the event record, and the event record is 2008 included in the notification message sent to the receivers."; 2009 reference "RFC 6241, Section 6."; 2011 } 2012 leaf stream-xpath-filter { 2013 if-feature "xpath"; 2014 type yang:xpath1.0; 2015 description 2016 "Event stream evaluation criteria encoded in the syntax of 2017 an XPath 1.0 expression. 2019 The XPath expression is evaluated on the representation of 2020 individual, delineated event records as contained within 2021 the event stream. 2023 The result of the XPath expression is converted to a 2024 boolean value using the standard XPath 1.0 rules. If the 2025 boolean value is 'true', the filter matches the event 2026 record, and the event record is included in the notification 2027 message sent to the receivers. 2029 The expression is evaluated in the following XPath context: 2031 o The set of namespace declarations is the set of prefix 2032 and namespace pairs for all YANG modules implemented 2033 by the server, where the prefix is the YANG module 2034 name and the namespace is as defined by the 2035 'namespace' statement in the YANG module. 2037 If the leaf is encoded in XML, all namespace 2038 declarations in scope on the 'stream-xpath-filter' 2039 leaf element are added to the set of namespace 2040 declarations. If a prefix found in the XML is 2041 already present in the set of namespace declarations, 2042 the namespace in the XML is used. 2044 o The set of variable bindings is empty. 2046 o The function library is the core function library, and 2047 the XPath functions defined in section 10 in RFC 7950. 2049 o The context node is the root node."; 2050 reference 2051 "http://www.w3.org/TR/1999/REC-xpath-19991116 2052 RFC 7950, Section 10."; 2054 } 2055 } 2056 } 2058 grouping update-qos { 2059 description 2060 "This grouping describes Quality of Service information 2061 concerning a subscription. This information is passed to lower 2062 layers for transport prioritization and treatment"; 2063 leaf dscp { 2064 if-feature "dscp"; 2065 type inet:dscp; 2066 default "0"; 2067 description 2068 "The desired network DiffServ Code Point (DSCP) value. This is 2069 the DSCP value to be set on notification messages 2070 encapsulating the results of the subscription. This DCP value 2071 is shared for all receivers of a given subscription."; 2072 } 2073 leaf weighting { 2074 if-feature "qos"; 2075 type uint8 { 2076 range "0 .. 255"; 2077 } 2078 description 2079 "Relative weighting for a subscription. Allows an underlying 2080 transport layer perform informed load balance allocations 2081 between various subscriptions"; 2082 reference 2083 "RFC-7540, section 5.3.2"; 2084 } 2085 leaf dependency { 2086 if-feature "qos"; 2087 type subscription-id; 2088 description 2089 "Provides the 'subscription-id' of a parent subscription which 2090 has absolute precedence should that parent have push updates 2091 ready to egress the publisher. In other words, there should be 2092 no streaming of objects from the current subscription if 2093 the parent has something ready to push. 2095 If a dependency is asserted via configuration or via RPC, but 2096 the referenced 'subscription-id' does not exist, the 2097 dependency is silently discarded. If a referenced 2098 subscription is deleted this dependency is removed."; 2099 reference 2100 "RFC-7540, section 5.3.1"; 2101 } 2102 } 2104 grouping subscription-policy-modifiable { 2105 description 2106 "This grouping describes all objects which may be changed 2107 in a subscription."; 2108 choice target { 2109 mandatory true; 2110 description 2111 "Identifies the source of information against which a 2112 subscription is being applied, as well as specifics on the 2113 subset of information desired from that source."; 2114 case stream { 2115 choice stream-filter { 2116 description 2117 "An event stream filter can be applied to a subscription. 2118 That filter will come either referenced from a global list, 2119 or be provided within the subscription itself."; 2120 case by-reference { 2121 description 2122 "Apply a filter that has been configured separately."; 2123 leaf stream-filter-name { 2124 type stream-filter-ref; 2125 mandatory true; 2126 description 2127 "References an existing event stream filter which is to 2128 be applied to an event stream for the subscription."; 2129 } 2130 } 2131 case within-subscription { 2132 description 2133 "Local definition allows a filter to have the same 2134 lifecycle as the subscription."; 2135 uses stream-filter-elements; 2136 } 2137 } 2138 } 2139 } 2140 leaf stop-time { 2141 type yang:date-and-time; 2142 description 2143 "Identifies a time after which notification messages for a 2144 subscription should not be sent. If 'stop-time' is not 2145 present, the notification messages will continue until the 2146 subscription is terminated. If 'replay-start-time' exists, 2147 'stop-time' must be for a subsequent time. If 2148 'replay-start-time' doesn't exist, 'stop-time' when established 2149 must be for a future time."; 2150 } 2151 } 2153 grouping subscription-policy-dynamic { 2154 description 2155 "This grouping describes the only information concerning a 2156 subscription which can be passed over the RPCs defined in this 2157 model."; 2158 uses subscription-policy-modifiable { 2159 augment target/stream { 2160 description 2161 "Adds additional objects which can be modified by RPC."; 2162 leaf stream { 2163 type stream-ref { 2164 require-instance false; 2165 } 2166 mandatory true; 2167 description 2168 "Indicates the event stream to be considered for 2169 this subscription."; 2170 } 2171 leaf replay-start-time { 2172 if-feature "replay"; 2173 type yang:date-and-time; 2174 config false; 2175 description 2176 "Used to trigger the replay feature for a dynamic 2177 subscription, with event records being selected needing to 2178 be at or after the start at the time specified. If 2179 'replay-start-time' is not present, this is not a replay 2180 subscription and event record push should start 2181 immediately. It is never valid to specify start times that 2182 are later than or equal to the current time."; 2183 } 2184 } 2185 } 2186 uses update-qos; 2187 } 2189 grouping subscription-policy { 2190 description 2191 "This grouping describes the full set of policy information 2192 concerning both dynamic and configured subscriptions, with the 2193 exclusion of both receivers and networking information specific 2194 to the publisher such as what interface should be used to 2195 transmit notification messages."; 2196 uses subscription-policy-dynamic; 2197 leaf transport { 2198 if-feature "configured"; 2199 type transport; 2200 description 2201 "For a configured subscription, this leaf specifies the 2202 transport used to deliver messages destined to all receivers 2203 of that subscription."; 2204 } 2205 leaf encoding { 2206 when 'not(../transport) or derived-from(../transport, 2207 "sn:configurable-encoding")'; 2208 type encoding; 2209 description 2210 "The type of encoding for notification messages. For a 2211 dynamic subscription, if not included as part of an establish- 2212 subscription RPC, the encoding will be populated with the 2213 encoding used by that RPC. For a configured subscription, if 2214 not explicitly configured the encoding with be the default 2215 encoding for an underlying transport."; 2216 } 2217 leaf purpose { 2218 if-feature "configured"; 2219 type string; 2220 description 2221 "Open text allowing a configuring entity to embed the 2222 originator or other specifics of this subscription."; 2223 } 2224 } 2226 /* 2227 * RPCs 2228 */ 2230 rpc establish-subscription { 2231 description 2232 "This RPC allows a subscriber to create (and possibly negotiate) 2233 a subscription on its own behalf. If successful, the 2234 subscription remains in effect for the duration of the 2235 subscriber's association with the publisher, or until the 2236 subscription is terminated. In case an error occurs, or the 2237 publisher cannot meet the terms of a subscription, an RPC error 2238 is returned, the subscription is not created. In that case, the 2239 RPC reply's 'error-info' MAY include suggested parameter 2240 settings that would have a higher likelihood of succeeding in a 2241 subsequent 'establish-subscription' request."; 2242 input { 2243 uses subscription-policy-dynamic; 2244 leaf encoding { 2245 type encoding; 2246 description 2247 "The type of encoding for the subscribed data. If not 2248 included as part of the RPC, the encoding MUST be set by the 2249 publisher to be the encoding used by this RPC."; 2250 } 2252 } 2253 output { 2254 leaf id { 2255 type subscription-id; 2256 mandatory true; 2257 description 2258 "Identifier used for this subscription."; 2259 } 2260 leaf replay-start-time-revision { 2261 if-feature "replay"; 2262 type yang:date-and-time; 2263 description 2264 "If a replay has been requested, this represents the 2265 earliest time covered by the event buffer for the requested 2266 event stream. The value of this object is the 2267 'replay-log-aged-time' if it exists. Otherwise it is the 2268 'replay-log-creation-time'. All buffered event records 2269 after this time will be replayed to a receiver. This 2270 object will only be sent if the starting time has been 2271 revised to be later than the time requested by the 2272 subscriber."; 2273 } 2274 } 2275 } 2277 rc:yang-data establish-subscription-stream-error-info { 2278 container establish-subscription-stream-error-info { 2279 description 2280 "If any 'establish-subscription' RPC parameters are 2281 unsupportable against the event stream, a subscription is not 2282 created and the RPC error response MUST indicate the reason 2283 why the subscription failed to be created. This yang-data MAY 2284 be inserted as structured data within a subscription's RPC 2285 error response to indicate the failure reason. This yang-data 2286 MUST be inserted if hints are to be provided back to the 2287 subscriber."; 2288 leaf reason { 2289 type identityref { 2290 base establish-subscription-error; 2291 } 2292 description 2293 "Indicates the reason why the subscription has failed to 2294 be created to a targeted event stream."; 2295 } 2296 leaf filter-failure-hint { 2297 type string; 2298 description 2299 "Information describing where and/or why a provided filter 2300 was unsupportable for a subscription."; 2301 } 2302 } 2303 } 2305 rpc modify-subscription { 2306 description 2307 "This RPC allows a subscriber to modify a dynamic subscription's 2308 parameters. If successful, the changed subscription 2309 parameters remain in effect for the duration of the 2310 subscription, until the subscription is again modified, or until 2311 the subscription is terminated. In case of an error or an 2312 inability to meet the modified parameters, the subscription is 2313 not modified and the original subscription parameters remain in 2314 effect. In that case, the RPC error MAY include 'error-info' 2315 suggested parameter hints that would have a high likelihood of 2316 succeeding in a subsequent 'modify-subscription' request. A 2317 successful 'modify-subscription' will return a suspended 2318 subscription to an 'active' state."; 2319 input { 2320 leaf id { 2321 type subscription-id; 2322 mandatory true; 2323 description 2324 "Identifier to use for this subscription."; 2325 } 2326 uses subscription-policy-modifiable; 2327 } 2328 } 2330 rc:yang-data modify-subscription-stream-error-info { 2331 container modify-subscription-stream-error-info { 2332 description 2333 "This yang-data MAY be provided as part of a subscription's RPC 2334 error response when there is a failure of a 2335 'modify-subscription' RPC which has been made against an event 2336 stream. This yang-data MUST be used if hints are to be 2337 provided back to the subscriber."; 2338 leaf reason { 2339 type identityref { 2340 base modify-subscription-error; 2341 } 2342 description 2343 "Information in a 'modify-subscription' RPC error response 2344 which indicates the reason why the subscription to an event 2345 stream has failed to be modified."; 2346 } 2347 leaf filter-failure-hint { 2348 type string; 2349 description 2350 "Information describing where and/or why a provided filter 2351 was unsupportable for a subscription."; 2352 } 2353 } 2354 } 2356 rpc delete-subscription { 2357 description 2358 "This RPC allows a subscriber to delete a subscription that 2359 was previously created from by that same subscriber using the 2360 'establish-subscription' RPC. 2362 If an error occurs, the server replies with an 'rpc-error' where 2363 the 'error-info' field MAY contain an 2364 'delete-subscription-error-info' structure."; 2365 input { 2366 leaf id { 2367 type subscription-id; 2368 mandatory true; 2369 description 2370 "Identifier of the subscription that is to be deleted. 2371 Only subscriptions that were created using 2372 'establish-subscription' from the same origin as this RPC 2373 can be deleted via this RPC."; 2374 } 2375 } 2376 } 2378 rpc kill-subscription { 2379 nacm:default-deny-all; 2380 description 2381 "This RPC allows an operator to delete a dynamic subscription 2382 without restrictions on the originating subscriber or underlying 2383 transport session. 2385 If an error occurs, the server replies with an 'rpc-error' where 2386 the 'error-info' field MAY contain an 2387 'delete-subscription-error-info' structure."; 2388 input { 2389 leaf id { 2390 type subscription-id; 2391 mandatory true; 2392 description 2393 "Identifier of the subscription that is to be deleted. Only 2394 subscriptions that were created using 2395 'establish-subscription' can be deleted via this RPC."; 2397 } 2398 } 2399 } 2401 rc:yang-data delete-subscription-error-info { 2402 container delete-subscription-error-info { 2403 description 2404 "If a 'delete-subscription' RPC or a 'kill-subscription' RPC 2405 fails, the subscription is not deleted and the RPC error 2406 response MUST indicate the reason for this failure. This 2407 yang-data MAY be inserted as structured data within a 2408 subscription's RPC error response to indicate the failure 2409 reason."; 2410 leaf reason { 2411 type identityref { 2412 base delete-subscription-error; 2413 } 2414 mandatory true; 2415 description 2416 "Indicates the reason why the subscription has failed to be 2417 deleted."; 2418 } 2419 } 2420 } 2422 /* 2423 * NOTIFICATIONS 2424 */ 2426 notification replay-completed { 2427 sn:subscription-state-notification; 2428 if-feature "replay"; 2429 description 2430 "This notification is sent to indicate that all of the replay 2431 notifications have been sent."; 2432 leaf id { 2433 type subscription-id; 2434 mandatory true; 2435 description 2436 "This references the affected subscription."; 2437 } 2438 } 2440 notification subscription-completed { 2441 sn:subscription-state-notification; 2442 if-feature "configured"; 2443 description 2444 "This notification is sent to indicate that a subscription has 2445 finished passing event records, as the 'stop-time' has been 2446 reached."; 2447 leaf id { 2448 type subscription-id; 2449 mandatory true; 2450 description 2451 "This references the gracefully completed subscription."; 2452 } 2453 } 2455 notification subscription-modified { 2456 sn:subscription-state-notification; 2457 description 2458 "This notification indicates that a subscription has been 2459 modified. Notification messages sent from this point on will 2460 conform to the modified terms of the subscription. For 2461 completeness, this subscription state change notification 2462 includes both modified and non-modified aspects of a 2463 subscription."; 2464 leaf id { 2465 type subscription-id; 2466 mandatory true; 2467 description 2468 "This references the affected subscription."; 2469 } 2470 uses subscription-policy { 2471 refine "target/stream/stream-filter/within-subscription" { 2472 description 2473 "Filter applied to the subscription. If the 2474 'stream-filter-name' is populated, the filter within the 2475 subscription came from the 'filters' container. Otherwise it 2476 is populated in-line as part of the subscription."; 2477 } 2478 } 2479 } 2481 notification subscription-resumed { 2482 sn:subscription-state-notification; 2483 description 2484 "This notification indicates that a subscription that had 2485 previously been suspended has resumed. Notifications will once 2486 again be sent. In addition, a 'subscription-resumed' indicates 2487 that no modification of parameters has occurred since the last 2488 time event records have been sent."; 2489 leaf id { 2490 type subscription-id; 2491 mandatory true; 2492 description 2493 "This references the affected subscription."; 2494 } 2495 } 2497 notification subscription-started { 2498 sn:subscription-state-notification; 2499 if-feature "configured"; 2500 description 2501 "This notification indicates that a subscription has started and 2502 notifications are beginning to be sent."; 2503 leaf id { 2504 type subscription-id; 2505 mandatory true; 2506 description 2507 "This references the affected subscription."; 2508 } 2509 uses subscription-policy { 2510 refine "target/stream/replay-start-time" { 2511 description 2512 "Indicates the time that a replay is using for the streaming 2513 of buffered event records. This will be populated with the 2514 most recent of the following: the event time of the previous 2515 event record sent to a receiver, the 2516 'replay-log-creation-time', the 'replay-log-aged-time', 2517 or the most recent publisher boot time."; 2518 } 2519 refine "target/stream/stream-filter/within-subscription" { 2520 description 2521 "Filter applied to the subscription. If the 2522 'stream-filter-name' is populated, the filter within the 2523 subscription came from the 'filters' container. Otherwise it 2524 is populated in-line as part of the subscription."; 2525 } 2526 augment "target/stream" { 2527 description 2528 "This augmentation adds additional parameters specific to a 2529 subscription-started notification."; 2530 leaf replay-previous-event-time { 2531 when "../replay-start-time"; 2532 if-feature "replay"; 2533 type yang:date-and-time; 2534 description 2535 "If there is at least one event in the replay buffer prior 2536 to 'replay-start-time', this gives the time of the event 2537 generated immediately prior to the 'replay-start-time'. 2539 If a receiver previously received event records for this 2540 configured subscription, it can compare this time to the 2541 last event record previously received. If the two are not 2542 the same (perhaps due to a reboot), then a dynamic replay 2543 can be initiated to acquire any missing event records."; 2544 } 2545 } 2546 } 2547 } 2549 notification subscription-suspended { 2550 sn:subscription-state-notification; 2551 description 2552 "This notification indicates that a suspension of the 2553 subscription by the publisher has occurred. No further 2554 notifications will be sent until the subscription resumes. 2555 This notification shall only be sent to receivers of a 2556 subscription; it does not constitute a general-purpose 2557 notification."; 2558 leaf id { 2559 type subscription-id; 2560 mandatory true; 2561 description 2562 "This references the affected subscription."; 2563 } 2564 leaf reason { 2565 type identityref { 2566 base subscription-suspended-reason; 2567 } 2568 mandatory true; 2569 description 2570 "Identifies the condition which resulted in the suspension."; 2571 } 2572 } 2574 notification subscription-terminated { 2575 sn:subscription-state-notification; 2576 description 2577 "This notification indicates that a subscription has been 2578 terminated."; 2579 leaf id { 2580 type subscription-id; 2581 mandatory true; 2582 description 2583 "This references the affected subscription."; 2584 } 2585 leaf reason { 2586 type identityref { 2587 base subscription-terminated-reason; 2588 } 2589 mandatory true; 2590 description 2591 "Identifies the condition which resulted in the termination ."; 2592 } 2593 } 2595 /* 2596 * DATA NODES 2597 */ 2599 container streams { 2600 config false; 2601 description 2602 "This container contains information on the built-in event 2603 streams provided by the publisher."; 2604 list stream { 2605 key "name"; 2606 description 2607 "Identifies the built-in event streams that are supported by 2608 the publisher."; 2609 leaf name { 2610 type string; 2611 description 2612 "A handle for a system-provided event stream made up of a 2613 sequential set of event records, each of which is 2614 characterized by its own domain and semantics."; 2615 } 2616 leaf description { 2617 type string; 2618 description 2619 "A description of the event stream, including such 2620 information as the type of event records that are available 2621 within this event stream."; 2622 } 2623 leaf replay-support { 2624 if-feature "replay"; 2625 type empty; 2626 description 2627 "Indicates that event record replay is available on this 2628 event stream."; 2629 } 2630 leaf replay-log-creation-time { 2631 when "../replay-support"; 2632 if-feature "replay"; 2633 type yang:date-and-time; 2634 mandatory true; 2635 description 2636 "The timestamp of the creation of the log used to support the 2637 replay function on this event stream. This time might be 2638 earlier than the earliest available information contained in 2639 the log. This object is updated if the log resets for some 2640 reason."; 2641 } 2642 leaf replay-log-aged-time { 2643 when "../replay-support"; 2644 if-feature "replay"; 2645 type yang:date-and-time; 2646 description 2647 "The timestamp associated with last event record which has 2648 been aged out of the log. This timestamp identifies how far 2649 back into history this replay log extends, if it doesn't 2650 extend back to the 'replay-log-creation-time'. This object 2651 MUST be present if replay is supported and any event records 2652 have been aged out of the log."; 2653 } 2654 } 2655 } 2657 container filters { 2658 description 2659 "This container contains a list of configurable filters 2660 that can be applied to subscriptions. This facilitates 2661 the reuse of complex filters once defined."; 2662 list stream-filter { 2663 key "name"; 2664 description 2665 "A list of pre-configured filters that can be applied to 2666 subscriptions."; 2667 leaf name { 2668 type string; 2669 description 2670 "An name to differentiate between filters."; 2671 } 2672 uses stream-filter-elements; 2673 } 2674 } 2676 container subscriptions { 2677 description 2678 "Contains the list of currently active subscriptions, i.e. 2679 subscriptions that are currently in effect, used for 2680 subscription management and monitoring purposes. This includes 2681 subscriptions that have been setup via RPC primitives as well as 2682 subscriptions that have been established via configuration."; 2683 list subscription { 2684 key "id"; 2685 description 2686 "The identity and specific parameters of a subscription. 2687 Subscriptions within this list can be created using a control 2688 channel or RPC, or be established through configuration. 2690 If configuration operations or the 'kill-subscription' RPC are 2691 used to delete a subscription, a 'subscription-terminated' 2692 message is sent to any active or suspended receivers."; 2693 leaf id { 2694 type subscription-id; 2695 description 2696 "Identifier of a subscription; unique within a publisher"; 2697 } 2698 uses subscription-policy { 2699 refine "target/stream/stream" { 2700 description 2701 "Indicates the event stream to be considered for this 2702 subscription. If an event stream has been removed, 2703 and no longer can be referenced by an active subscription, 2704 send a 'subscription-terminated' notification with 2705 'stream-unavailable' as the reason. If a configured 2706 subscription refers to a non-existent event stream, move 2707 that subscription to the 'invalid' state."; 2708 } 2709 refine "transport" { 2710 description 2711 "For a configured subscription, this leaf specifies the 2712 transport used to deliver messages destined to all 2713 receivers of that subscription. This object is mandatory 2714 for subscriptions in the configuration datastore. This 2715 object is not mandatory for dynamic subscriptions within 2716 the operational state datastore. The object should not 2717 be present for dynamic subscriptions."; 2718 } 2719 augment "target/stream" { 2720 description 2721 "Enables objects to added to a configured stream 2722 subscription"; 2723 leaf configured-replay { 2724 if-feature "configured"; 2725 if-feature "replay"; 2726 type empty; 2727 description 2728 "The presence of this leaf indicates that replay for the 2729 configured subscription should start at the earliest time 2730 in the event log, or at the publisher boot time, which 2731 ever is later."; 2733 } 2734 } 2735 } 2736 choice notification-message-origin { 2737 if-feature "configured"; 2738 description 2739 "Identifies the egress interface on the publisher from which 2740 notification messages are to be sent."; 2741 case interface-originated { 2742 description 2743 "When notification messages to egress a specific, 2744 designated interface on the publisher."; 2745 leaf source-interface { 2746 if-feature "interface-designation"; 2747 type if:interface-ref; 2748 description 2749 "References the interface for notification messages."; 2750 } 2751 } 2752 case address-originated { 2753 description 2754 "When notification messages are to depart from a publisher 2755 using specific originating address and/or routing context 2756 information."; 2757 leaf source-vrf { 2758 if-feature "supports-vrf"; 2759 type leafref { 2760 path "/ni:network-instances/ni:network-instance/ni:name"; 2761 } 2762 description 2763 "VRF from which notification messages should egress a 2764 publisher."; 2765 } 2766 leaf source-address { 2767 type inet:ip-address-no-zone; 2768 description 2769 "The source address for the notification messages. If a 2770 source VRF exists, but this object doesn't, a publisher's 2771 default address for that VRF must be used."; 2772 } 2773 } 2774 } 2775 leaf configured-subscription-state { 2776 if-feature "configured"; 2777 type enumeration { 2778 enum valid { 2779 value 1; 2780 description 2781 "Subscription is supportable with current parameters."; 2782 } 2783 enum invalid { 2784 value 2; 2785 description 2786 "The subscription as a whole is unsupportable with its 2787 current parameters."; 2788 } 2789 enum concluded { 2790 value 3; 2791 description 2792 "A subscription is inactive as it has hit a stop time, 2793 it no longer has receivers in the 'receiver active' or 2794 'receiver suspended' state, but not yet been 2795 removed from configuration."; 2796 } 2797 } 2798 config false; 2799 description 2800 "The presence of this leaf indicates that the subscription 2801 originated from configuration, not through a control channel 2802 or RPC. The value indicates the system established state 2803 of the subscription."; 2804 } 2805 container receivers { 2806 description 2807 "Set of receivers in a subscription."; 2808 list receiver { 2809 key "name"; 2810 min-elements 1; 2811 description 2812 "A host intended as a recipient for the notification 2813 messages of a subscription. For configured subscriptions, 2814 transport specific network parameters (or a leafref to 2815 those parameters) may augmentated to a specific receiver 2816 within this list."; 2817 leaf name { 2818 type string; 2819 description 2820 "Identifies a unique receiver for a subscription."; 2821 } 2822 leaf sent-event-records { 2823 type yang:zero-based-counter64; 2824 config false; 2825 description 2826 "The number of event records sent to the receiver. The 2827 count is initialized when a dynamic subscription is 2828 established, or when a configured receiver 2829 transitions to the valid state."; 2830 } 2831 leaf excluded-event-records { 2832 type yang:zero-based-counter64; 2833 config false; 2834 description 2835 "The number of event records explicitly removed either 2836 via an event stream filter or an access control filter so 2837 that they are not passed to a receiver. This count is 2838 set to zero each time 'sent-event-records' is 2839 initialized."; 2840 } 2841 leaf state { 2842 type enumeration { 2843 enum active { 2844 value 1; 2845 description 2846 "Receiver is currently being sent any applicable 2847 notification messages for the subscription."; 2848 } 2849 enum suspended { 2850 value 2; 2851 description 2852 "Receiver state is 'suspended', so the publisher 2853 is currently unable to provide notification messages 2854 for the subscription."; 2855 } 2856 enum connecting { 2857 value 3; 2858 if-feature "configured"; 2859 description 2860 "A subscription has been configured, but a 2861 'subscription-started' subscription state change 2862 notification needs to be successfully received before 2863 notification messages are sent. 2865 If the 'reset' action is invoked for a receiver of an 2866 active configured subscription, the state must be 2867 moved to 'connecting'."; 2868 } 2869 enum disconnected { 2870 value 4; 2871 if-feature "configured"; 2872 description 2873 "A subscription has failed in sending a subscription 2874 started state change to the receiver. 2875 Additional attempts at connection attempts are not 2876 currently being made."; 2878 } 2879 } 2880 config false; 2881 mandatory true; 2882 description 2883 "Specifies the state of a subscription from the 2884 perspective of a particular receiver. With this info it 2885 is possible to determine whether a subscriber is 2886 currently generating notification messages intended for 2887 that receiver."; 2888 } 2889 action reset { 2890 if-feature "configured"; 2891 description 2892 "Allows the reset of this configured subscription 2893 receiver to the 'connecting' state. This enables the 2894 connection process to be re-initiated."; 2895 output { 2896 leaf time { 2897 type yang:date-and-time; 2898 mandatory true; 2899 description 2900 "Time a publisher returned the receiver to a 2901 'connecting' state."; 2902 } 2903 } 2904 } 2905 } 2906 } 2907 } 2908 } 2909 } 2910 2912 5. Considerations 2914 5.1. IANA Considerations 2916 This document registers the following namespace URI in the "IETF XML 2917 Registry" [RFC3688]: 2919 URI: urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications 2920 Registrant Contact: The IESG. 2921 XML: N/A; the requested URI is an XML namespace. 2923 This document registers the following YANG module in the "YANG Module 2924 Names" registry [RFC6020]: 2926 Name: ietf-subscribed-notifications 2927 Namespace: urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications 2928 Prefix: sn 2929 Reference: draft-ietf-netconf-ietf-subscribed-notifications-11.txt 2930 (RFC form) 2932 5.2. Implementation Considerations 2934 To support deployments including both configured and dynamic 2935 subscriptions, it is recommended to split the subscription "id" 2936 domain into static and dynamic halves. That way it eliminates the 2937 possibility of collisions if the configured subscriptions attempt to 2938 set a subscription-id which might have already been dynamically 2939 allocated. A best practice is to use lower half the "id" object's 2940 integer space when that "id" is assigned by an external entity (such 2941 as with a configured subscription). This leaves the upper half of 2942 subscription integer space available to be dynamically assigned by 2943 the publisher. 2945 If a subscription is unable to marshal a series of filtered event 2946 records into transmittable notification messages, the receiver should 2947 be suspended with the reason "unsupportable-volume". 2949 For configured subscriptions, operations are against the set of 2950 receivers using the subscription "id" as a handle for that set. But 2951 for streaming updates, subscription state change notifications are 2952 local to a receiver. In this specification it is the case that 2953 receivers get no information from the publisher about the existence 2954 of other receivers. But if a network operator wants to let the 2955 receivers correlate results, it is useful to use the subscription 2956 "id" across the receivers to allow that correlation. Note that due 2957 to the possibility of different access control permissions per 2958 receiver, each receiver may actually get a different set of event 2959 records. 2961 For configured replay subscriptions, the receiver is protected from 2962 duplicated events being pushed after a publisher is rebooted. 2963 However it is possible that a receiver might want to acquire event 2964 records which failed to be delivered just prior to the reboot. 2965 Delivering these event records be accomplished by leveraging the 2966 "eventTime" from the last event record received prior to the receipt 2967 of a "subscription-started" subscription state change notification. 2968 With this "eventTime" and the "replay-start-time" from the 2969 "subscription-started" notification, an independent dynamic 2970 subscription can be established which retrieves any event records 2971 which may have been generated but not sent to the receiver. 2973 5.3. Transport Requirements 2975 This section provides requirements for any subscribed notification 2976 transport supporting the solution presented in this document. 2978 The transport selected by the subscriber to reach the publisher MUST 2979 be able to support multiple "establish-subscription" requests made 2980 within the same transport session. 2982 For both configured and dynamic subscriptions the publisher MUST 2983 authenticate a receiver via some transport level mechanism before 2984 sending any event records for which they are authorized to see. In 2985 addition, the receiver MUST authenticate the publisher at the 2986 transport level. The result is mutual authentication between the 2987 two. 2989 A secure transport is highly recommended and the publisher MUST 2990 ensure that the receiver has sufficient authorization to perform the 2991 function they are requesting against the specific subset of content 2992 involved. 2994 A specific transport specification built upon this document may or 2995 may not choose to require the use of the same logical channel for the 2996 RPCs and the event records. However the event records and the 2997 subscription state change notifications MUST be sent on the same 2998 transport session to ensure the properly ordered delivery. 3000 Additional transport requirements will be dictated by the choice of 3001 transport used with a subscription. For an example of such 3002 requirements with NETCONF transport, see 3003 [I-D.draft-ietf-netconf-netconf-event-notifications]. 3005 5.4. Security Considerations 3007 The YANG module specified in this document defines a schema for data 3008 that is designed to be accessed via network management transports 3009 such as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF 3010 layer is the secure transport layer, and the mandatory-to-implement 3011 secure transport is Secure Shell (SSH) [RFC6242]. The lowest 3012 RESTCONF layer is HTTPS, and the mandatory-to-implement secure 3013 transport is TLS [RFC5246]. 3015 The NETCONF Access Control Model (NACM) [RFC8341] provides the means 3016 to restrict access for particular NETCONF or RESTCONF users to a 3017 preconfigured subset of all available NETCONF or RESTCONF operations 3018 and content. 3020 With configured subscriptions, one or more publishers could be used 3021 to overwhelm a receiver. To counter this, notification messages 3022 SHOULD NOT be sent to any receiver which does not support this 3023 specification. Receivers that do not want notification messages need 3024 only terminate or refuse any transport sessions from the publisher. 3026 When a receiver of a configured subscription gets a new 3027 "subscription-started" message for a known subscription where it is 3028 already consuming events, it may indicate that an attacker has done 3029 something that has momentarily disrupted receiver connectivity. To 3030 acquire events lost during this interval, the receiver SHOULD 3031 retrieve any event records generated since the last event record was 3032 received. This can be accomplished by establishing a separate 3033 dynamic replay subscription with the same filtering criteria with the 3034 publisher, assuming the publisher supports the "replay" feature. 3036 For dynamic subscriptions, implementations need to protect against 3037 malicious or buggy subscribers which may send a large number 3038 "establish-subscription" requests, thereby using up system resources. 3039 To cover this possibility operators SHOULD monitor for such cases 3040 and, if discovered, take remedial action to limit the resources used, 3041 such as suspending or terminating a subset of the subscriptions or, 3042 if the underlying transport is session based, terminate the 3043 underlying transport session. 3045 There are a number of data nodes defined in this YANG module that are 3046 writable/creatable/deletable (i.e., config true, which is the 3047 default). These data nodes may be considered sensitive or vulnerable 3048 in some network environments. Write operations (e.g., edit-config) 3049 to these data nodes without proper protection can have a negative 3050 effect on network operations. These are the subtrees and data nodes 3051 where there is a specific sensitivity/vulnerability: 3053 Container: "/filters" 3055 o "stream-subtree-filter": updating a filter could increase the 3056 computational complexity of all referencing subscriptions. 3058 o "stream-xpath-filter": updating a filter could increase the 3059 computational complexity of all referencing subscriptions. 3061 Container: "/subscriptions" 3063 The following considerations are only relevant for configuration 3064 operations made upon configured subscriptions: 3066 o "configured-replay": can be used to send a large number of event 3067 records to a receiver. 3069 o "dependency": can be used to force important traffic to be queued 3070 behind less important updates. 3072 o "dscp": if unvalidated, can result in the sending of traffic with 3073 a higher priority marking than warranted. 3075 o "id": can overwrite an existing subscription, perhaps one 3076 configured by another entity. 3078 o "name": adding a new key entry can be used to attempt to send 3079 traffic to an unwilling receiver. 3081 o "replay-start-time": can be used to push very large logs, wasting 3082 resources. 3084 o "source-address": the configured address might not be able to 3085 reach a desired receiver. 3087 o "source-interface": the configured interface might not be able to 3088 reach a desired receiver. 3090 o "source-vrf": can place a subscription into a virtual network 3091 where receivers are not entitled to view the subscribed content. 3093 o "stop-time": could be used to terminate content at an inopportune 3094 time. 3096 o "stream": could set a subscription to an event stream containing 3097 no content permitted for the targeted receivers. 3099 o "stream-filter-name": could be set to a filter which is irrelevant 3100 to the event stream. 3102 o "stream-subtree-filter": a complex filter can increase the 3103 computational resources for this subscription. 3105 o "stream-xpath-filter": a complex filter can increase the 3106 computational resources for this subscription. 3108 o "weighting": placing a large weight can overwhelm the dequeuing of 3109 other subscriptions. 3111 Some of the readable data nodes in this YANG module may be considered 3112 sensitive or vulnerable in some network environments. It is thus 3113 important to control read access (e.g., via get, get-config, or 3114 notification) to these data nodes. These are the subtrees and data 3115 nodes and their sensitivity/vulnerability: 3117 Container: "/streams" 3119 o "name": if access control is not properly configured, can expose 3120 system internals to those who should have no access to this 3121 information. 3123 o "replay-support": if access control is not properly configured, 3124 can expose logs to those who should have no access. 3126 Container: "/subscriptions" 3128 o "excluded-event-records": leaf can provide information about 3129 filtered event records. A network operator should have 3130 permissions to know about such filtering. 3132 o "subscription": different operational teams might have a desire to 3133 set varying subsets of subscriptions. Access control should be 3134 designed to permit read access to just the allowed set. 3136 Some of the RPC operations in this YANG module may be considered 3137 sensitive or vulnerable in some network environments. It is thus 3138 important to control access to these operations. These are the 3139 operations and their sensitivity/vulnerability: 3141 RPC: all 3143 o If a malicious or buggy subscriber sends an unexpectedly large 3144 number of RPCs, the result might be an excessive use of system 3145 resources on the publisher just to determine that these 3146 subscriptions should be declined. In such a situation, 3147 subscription interactions MAY be terminated by terminating the 3148 transport session. 3150 RPC: "delete-subscription" 3152 o No special considerations. 3154 RPC: "establish-subscription" 3156 o Subscriptions could overload a publisher's resources. For this 3157 reason, publishers MUST ensure that they have sufficient resources 3158 to fulfill this request or otherwise reject the request. 3160 RPC: "kill-subscription" 3162 o The "kill-subscription" RPC MUST be secured so that only 3163 connections with administrative rights are able to invoke this 3164 RPC. 3166 RPC: "modify-subscription" 3168 o Subscriptions could overload a publisher's resources. For this 3169 reason, publishers MUST ensure that they have sufficient resources 3170 to fulfill this request or otherwise reject the request. 3172 6. Acknowledgments 3174 For their valuable comments, discussions, and feedback, we wish to 3175 acknowledge Andy Bierman, Tim Jenkins, Martin Bjorklund, Kent Watsen, 3176 Balazs Lengyel, Robert Wilton, Sharon Chisholm, Hector Trevino, Susan 3177 Hares, Michael Scharf, and Guangying Zheng. 3179 7. References 3181 7.1. Normative References 3183 [I-D.draft-ietf-rtgwg-ni-model] 3184 Berger, L., Hopps, C., and A. Lindem, "YANG Network 3185 Instances", draft-ietf-rtgwg-ni-model-12 (work in 3186 progress), March 2018. 3188 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 3189 Requirement Levels", BCP 14, RFC 2119, 3190 DOI 10.17487/RFC2119, March 1997, 3191 . 3193 [RFC2474] Nichols, K., Blake, S., Baker, F., and D. Black, 3194 "Definition of the Differentiated Services Field (DS 3195 Field) in the IPv4 and IPv6 Headers", RFC 2474, 3196 DOI 10.17487/RFC2474, December 1998, 3197 . 3199 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 3200 DOI 10.17487/RFC3688, January 2004, 3201 . 3203 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 3204 (TLS) Protocol Version 1.2", RFC 5246, 3205 DOI 10.17487/RFC5246, August 2008, 3206 . 3208 [RFC5277] Chisholm, S. and H. Trevino, "NETCONF Event 3209 Notifications", RFC 5277, DOI 10.17487/RFC5277, July 2008, 3210 . 3212 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 3213 the Network Configuration Protocol (NETCONF)", RFC 6020, 3214 DOI 10.17487/RFC6020, October 2010, 3215 . 3217 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 3218 and A. Bierman, Ed., "Network Configuration Protocol 3219 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 3220 . 3222 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 3223 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 3224 . 3226 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 3227 RFC 6991, DOI 10.17487/RFC6991, July 2013, 3228 . 3230 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 3231 RFC 7950, DOI 10.17487/RFC7950, August 2016, 3232 . 3234 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 3235 RFC 7951, DOI 10.17487/RFC7951, August 2016, 3236 . 3238 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 3239 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 3240 . 3242 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 3243 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 3244 May 2017, . 3246 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 3247 Access Control Model", STD 91, RFC 8341, 3248 DOI 10.17487/RFC8341, March 2018, 3249 . 3251 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 3252 and R. Wilton, "Network Management Datastore Architecture 3253 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 3254 . 3256 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 3257 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 3258 . 3260 [XPATH] Clark, J. and S. DeRose, "XML Path Language (XPath) 3261 Version 1.0", November 1999, 3262 . 3264 7.2. Informative References 3266 [I-D.draft-ietf-netconf-netconf-event-notifications] 3267 Clemm, Alexander., Voit, Eric., Gonzalez Prieto, Alberto., 3268 Nilsen-Nygaard, E., and A. Tripathy, "NETCONF support for 3269 event notifications", May 2018, 3270 . 3273 [I-D.draft-ietf-netconf-restconf-notif] 3274 Voit, Eric., Clemm, Alexander., Tripathy, A., Nilsen- 3275 Nygaard, E., and Alberto. Gonzalez Prieto, "Restconf and 3276 HTTP transport for event notifications", May 2018, 3277 . 3280 [I-D.ietf-netconf-yang-push] 3281 Clemm, Alexander., Voit, Eric., Gonzalez Prieto, Alberto., 3282 Tripathy, A., Nilsen-Nygaard, E., Bierman, A., and B. 3283 Lengyel, "YANG Datastore Subscription", May 2018, 3284 . 3287 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 3288 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 3289 October 2013, . 3291 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 3292 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 3293 DOI 10.17487/RFC7540, May 2015, 3294 . 3296 [RFC7923] Voit, E., Clemm, A., and A. Gonzalez Prieto, "Requirements 3297 for Subscription to YANG Datastores", RFC 7923, 3298 DOI 10.17487/RFC7923, June 2016, 3299 . 3301 [RFC8071] Watsen, K., "NETCONF Call Home and RESTCONF Call Home", 3302 RFC 8071, DOI 10.17487/RFC8071, February 2017, 3303 . 3305 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 3306 Interchange Format", STD 90, RFC 8259, 3307 DOI 10.17487/RFC8259, December 2017, 3308 . 3310 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 3311 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 3312 . 3314 Appendix A. Example Configured Transport Augmentation 3316 This appendix provides a non-normative example of how the YANG model 3317 defined in Section 4 may be enhanced to incorporate the configuration 3318 parameters needed to support the transport connectivity process. In 3319 this example, connectivity via an imaginary transport type of "foo" 3320 is explored. For more on the overall need, see Section 2.5.7. 3322 The YANG model defined in this section contains two main elements. 3323 First is a transport identity "foo". This transport identity allows 3324 a configuration agent to define "foo" as the selected type of 3325 transport for a subscription. Second is a YANG case augmentation 3326 "foo" which is made to the "/subscriptions/subscription/receivers/ 3327 receiver" node of Section 4. Within this augmentation are the 3328 transport configuration parameters "address" and "port" which are 3329 necessary to make the connect to the receiver. 3331 module example-foo-subscribed-notifications { 3332 yang-version 1.1; 3333 namespace 3334 "urn:example:foo-subscribed-notifications"; 3336 prefix fsn; 3338 import ietf-subscribed-notifications { 3339 prefix sn; 3340 } 3341 import ietf-inet-types { 3342 prefix inet; 3343 } 3345 description 3346 "Defines 'foo' as a supported type of configured transport for 3347 subscribed event notifications."; 3349 identity foo { 3350 base sn:transport; 3351 description 3352 "Transport type 'foo' is available for use as a configured 3353 subscription transport protocol for subscribed notifications."; 3354 } 3356 augment 3357 "/sn:subscriptions/sn:subscription/sn:receivers/sn:receiver" { 3358 when 'derived-from(../../../transport, "fsn:foo")'; 3359 description 3360 "This augmentation makes 'foo' specific transport parameters 3361 available for a receiver."; 3362 leaf address { 3363 type inet:host; 3364 mandatory true; 3365 description 3366 "Specifies the address to use for messages destined to a 3367 receiver."; 3368 } 3369 leaf port { 3370 type inet:port-number; 3371 mandatory true; 3372 description 3373 "Specifies the port number to use for messages destined to a 3374 receiver."; 3375 } 3376 } 3377 } 3379 Figure 21: Example Transport Augmentation for the fictitious protocol 3380 foo 3382 This example YANG model for transport "foo" will not be seen in a 3383 real world deployment. For a real world deployment supporting an 3384 actual transport technology, a similar YANG model must be defined. 3386 Appendix B. Changes between revisions 3388 (To be removed by RFC editor prior to publication) 3390 v23 - v24 3392 o Per Benjamin Kaduk's discuss, adjusted IPR to pre5378Trust200902 3394 o Tweaks from Chris Lonvick's IESG review. This includes moving a 3395 paragraph from Security Considerations into a sentence within 3396 Implementation Considerations. 3398 o Tweaks from Wesley Eddy DSCP description 3400 v22 - v23 3401 o During the YANG Doctor review, feature dscp support was refined to 3402 avoid the out-of-order delivery of packets in a single TCP 3403 session. 3405 v21 - v22 3407 o YANG Dr definition clarifications. This includes refined text on: 3408 (a) stop-time can be used without replay, (b) a separate dynamic 3409 subscription for replay, (c) subscription state change 3410 notifications can't be dropped, more details on "enum concluded" 3411 and (d) more text on configurable-encoding leaf (which adds two 3412 informative references). There also was one minor tweak in the 3413 YANG model. The stream description leaf had "mandatory true" 3414 removed. 3416 v20 - v21 3418 o Editorial change in Section 1.3 requested by Qin's Shepherd review 3419 of NETCONF-Notif and RESTCONF-Notif. Basically extra text was 3420 added further describing that dynamic subscriptions can have state 3421 change notifications. 3423 v18 - v20 3425 o XPath-stream-filter YANG object definition updated based on NETMOD 3426 discussions. 3428 v17 - v18 3430 o Transport optional in YANG model. 3432 o Modify subscription must come from the originator of the 3433 subscription. (Text got dropped somewhere previously.) 3435 o Title change. 3437 v16 - v17 3439 o YANG renaming: Subscription identifier renamed to id. Counters 3440 renamed. Filters id made into name. 3442 o Text tweaks. 3444 v15 - v16 3446 o Mandatory empty case "transport" removed. 3448 o Appendix case turned from "netconf" to "foo". 3450 v14 - v15 3452 o Text tweaks. 3454 o Mandatory empty case "transport" added for transport parameters. 3455 This includes a new section and an appendix explaining it. 3457 v13 - v14 3459 o Removed the 'address' leaf. 3461 o Replay is now of type 'empty' for configured. 3463 v12 - v13 3465 o Tweaks from Kent's comments 3467 o Referenced in YANG model updated per Tom Petch's comments 3469 o Added leaf replay-previous-event-time 3471 o Renamed the event counters, downshifted the subscription states 3473 v11 - v12 3475 o Tweaks from Kent's, Tim's, and Martin's comments 3477 o Clarified dscp text, and made its own feature 3479 o YANG model tweaks alphabetizing, features. 3481 v10 - v11 3483 o access control filtering of events in streams included to match 3484 RFC5277 behavior 3486 o security considerations updated based on YANG template. 3488 o dependency QoS made non-normative on HTTP2 QoS 3490 o tree diagrams referenced for each figure using them 3492 o reference numbers placed into state machine figures 3494 o broke configured replay into its own section 3496 o many tweaks updates based on LC and YANG doctor reviews 3497 o trees and YANG model reconciled were deltas existed 3499 o new feature for interface originated. 3501 o dscp removed from the qos feature 3503 o YANG model updated in a way which collapses groups only used once 3504 so that they are part of the 'subscriptions' container. 3506 o alternative encodings only allowed for transports which support 3507 them. 3509 v09 - v10 3511 o Typos and tweaks 3513 v08 - v09 3515 o NMDA model supported. Non NMDA version at https://github.com/ 3516 netconf-wg/rfc5277bis/ 3518 o Error mechanism revamped to match to embedded implementations. 3520 o Explicitly identified error codes relevant to each RPC/ 3521 Notification 3523 v07 - v08 3525 o Split YANG trees to separate document subsections. 3527 o Clarified configured state machine based on Balazs comments, and 3528 moved it into the configured subscription subsections. 3530 o Normative reference to Network Instance model for VRF 3532 o One transport for all receivers of configured subscriptions. 3534 o QoS section moved in from yang-push 3536 v06 - v07 3538 o Clarification on state machine for configured subscriptions. 3540 v05 - v06 3542 o Made changes proposed by Martin, Kent, and others on the list. 3543 Most significant of these are stream returned to string (with the 3544 SYSLOG identity removed), intro section on 5277 relationship, an 3545 identity set moved to an enumeration, clean up of definitions/ 3546 terminology, state machine proposed for configured subscriptions 3547 with a clean-up of subscription state options. 3549 o JSON and XML become features. Also Xpath and subtree filtering 3550 become features 3552 o Terminology updates with event records, and refinement of filters 3553 to just event stream filters. 3555 o Encoding refined in establish-subscription so it takes the RPC's 3556 encoding as the default. 3558 o Namespaces in examples fixed. 3560 v04 - v05 3562 o Returned to the explicit filter subtyping of v00 3564 o stream object changed to 'name' from 'stream' 3566 o Cleaned up examples 3568 o Clarified that JSON support needs notification-messages draft. 3570 v03 - v04 3572 o Moved back to the use of RFC5277 one-way notifications and 3573 encodings. 3575 v03 - v04 3577 o Replay updated 3579 v02 - v03 3581 o RPCs and Notification support is identified by the Notification 3582 2.0 capability. 3584 o Updates to filtering identities and text 3586 o New error type for unsupportable volume of updates 3588 o Text tweaks. 3590 v01 - v02 3592 o Subscription status moved under receiver. 3594 v00 - v01 3596 o Security considerations updated 3598 o Intro rewrite, as well as scattered text changes 3600 o Added Appendix A, to help match this to related drafts in progress 3602 o Updated filtering definitions, and filter types in yang file, and 3603 moved to identities for filter types 3605 o Added Syslog as an event stream 3607 o HTTP2 moved in from YANG-Push as a transport option 3609 o Replay made an optional feature for events. Won't apply to 3610 datastores 3612 o Enabled notification timestamp to have different formats. 3614 o Two error codes added. 3616 v01 5277bis - v00 subscribed notifications 3618 o Kill subscription RPC added. 3620 o Renamed from 5277bis to Subscribed Notifications. 3622 o Changed the notification capabilities version from 1.1 to 2.0. 3624 o Extracted create-subscription and other elements of RFC5277. 3626 o Error conditions added, and made specific in return codes. 3628 o Simplified yang model structure for removal of 'basic' grouping. 3630 o Added a grouping for items which cannot be statically configured. 3632 o Operational counters per receiver. 3634 o Subscription-id and filter-id renamed to identifier 3636 o Section for replay added. Replay now cannot be configured. 3638 o Control plane notification renamed to subscription state change 3639 notification 3641 o Source address: Source-vrf changed to string, default address 3642 option added 3644 o In yang model: 'info' changed to 'policy' 3646 o Scattered text clarifications 3648 v00 - v01 of 5277bis 3650 o YANG Model changes. New groupings for subscription info to allow 3651 restriction of what is changeable via RPC. Removed notifications 3652 for adding and removing receivers of configured subscriptions. 3654 o Expanded/renamed definitions from event server to publisher, and 3655 client to subscriber as applicable. Updated the definitions to 3656 include and expand on RFC 5277. 3658 o Removal of redundancy with other drafts 3660 o Many other clean-ups of wording and terminology 3662 Authors' Addresses 3664 Eric Voit 3665 Cisco Systems 3667 Email: evoit@cisco.com 3669 Alexander Clemm 3670 Huawei 3672 Email: ludwig@clemm.org 3674 Alberto Gonzalez Prieto 3675 Microsoft 3677 Email: alberto.gonzalez@microsoft.com 3679 Einar Nilsen-Nygaard 3680 Cisco Systems 3682 Email: einarnn@cisco.com 3683 Ambika Prasad Tripathy 3684 Cisco Systems 3686 Email: ambtripa@cisco.com