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