idnits 2.17.1 draft-ietf-netconf-netconf-event-notifications-09.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 : ---------------------------------------------------------------------------- == There are 3 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 241 has weird spacing: '...ription estab...' == Line 245 has weird spacing: '...ription res...' == Line 256 has weird spacing: '... stream esta...' == Line 259 has weird spacing: '...ription ret...' == Line 261 has weird spacing: '... stream modi...' -- The document date (May 4, 2018) is 2183 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) == Outdated reference: A later version (-26) exists of draft-ietf-netconf-subscribed-notifications-11 Summary: 0 errors (**), 0 flaws (~~), 8 warnings (==), 1 comment (--). 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: November 5, 2018 Huawei 6 A. Gonzalez Prieto 7 VMware 8 E. Nilsen-Nygaard 9 A. Tripathy 10 Cisco Systems 11 May 4, 2018 13 NETCONF Support for Event Notifications 14 draft-ietf-netconf-netconf-event-notifications-09 16 Abstract 18 This document provides a NETCONF binding to subscribed notifications 19 and to YANG push. 21 RFC Editor note: please replace the four references to pre-RFC 22 normative drafts with the actual assigned RFC numbers. 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 November 5, 2018. 41 Copyright Notice 43 Copyright (c) 2018 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 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 3. Interleave Capability . . . . . . . . . . . . . . . . . . . . 3 61 4. Compatibility with RFC-5277's create-subscription . . . . . . 3 62 5. Mandatory XML, event stream and datastore support . . . . . . 4 63 6. NETCONF connectivity and the subscription lifecycle . . . . . 4 64 6.1. Dynamic Subscriptions . . . . . . . . . . . . . . . . . . 4 65 6.2. Configured Subscriptions . . . . . . . . . . . . . . . . 4 66 7. Notification Messages . . . . . . . . . . . . . . . . . . . . 5 67 8. Dynamic Subscriptions and RPC Error Responses . . . . . . . . 5 68 9. YANG module . . . . . . . . . . . . . . . . . . . . . . . . . 6 69 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 70 11. Security Considerations . . . . . . . . . . . . . . . . . . . 8 71 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 9 72 13. Normative References . . . . . . . . . . . . . . . . . . . . 9 73 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 10 74 A.1. Event Stream Discovery . . . . . . . . . . . . . . . . . 10 75 A.2. Dynamic Subscriptions . . . . . . . . . . . . . . . . . . 11 76 A.3. Configured Subscriptions . . . . . . . . . . . . . . . . 15 77 A.4. Subscription State Notifications . . . . . . . . . . . . 20 78 Appendix B. Changes between revisions . . . . . . . . . . . . . 22 79 B.1. v08 to v09 . . . . . . . . . . . . . . . . . . . . . . . 22 80 B.2. v07 to v08 . . . . . . . . . . . . . . . . . . . . . . . 22 81 B.3. v06 to v07 . . . . . . . . . . . . . . . . . . . . . . . 22 82 B.4. v05 to v06 . . . . . . . . . . . . . . . . . . . . . . . 22 83 B.5. v03 to v04 . . . . . . . . . . . . . . . . . . . . . . . 23 84 B.6. v01 to v03 . . . . . . . . . . . . . . . . . . . . . . . 23 85 B.7. v00 to v01 . . . . . . . . . . . . . . . . . . . . . . . 23 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 23 88 1. Introduction 90 This document provides a binding for events streamed over the NETCONF 91 protocol [RFC6241] as per 92 [I-D.draft-ietf-netconf-subscribed-notifications]. In addition, as 93 [I-D.ietf-netconf-yang-push] is itself built upon 94 [I-D.draft-ietf-netconf-subscribed-notifications], this document 95 enables a NETCONF client to request and receive updates from a YANG 96 datastore located on a NETCONF server. 98 2. Terminology 100 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 101 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 102 "OPTIONAL" in this document are to be interpreted as described in BCP 103 14 [RFC2119] [RFC8174] when, and only when, they appear in all 104 capitals, as shown here. 106 The following terms are defined in 107 [I-D.draft-ietf-netconf-subscribed-notifications]: notification 108 message, event stream, publisher, receiver, subscriber, subscription, 109 configured subscription. 111 3. Interleave Capability 113 To support multiple subscriptions on a single session, a NETCONF 114 publisher MUST support the :interleave capability as defined in 115 [RFC5277]. Advertisement of both the :interleave capability and 116 "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications" within a 117 NETCONF capability exchange MUST indicate that a NETCONF publisher is 118 able to receive, process, and respond to NETCONF requests and 119 [I-D.draft-ietf-netconf-subscribed-notifications] subscription 120 operations. 122 4. Compatibility with RFC-5277's create-subscription 124 A publisher is allowed to concurrently support configured 125 subscriptions and dynamic subscription RPCs of 126 [I-D.draft-ietf-netconf-subscribed-notifications] at the same time as 127 [RFC5277]'s "create-subscription" RPC. However a single NETCONF 128 transport session cannot support both this specification and a 129 subscription established by [RFC5277]'s "create-subscription" RPC. 130 To protect against any attempts to use a single NETCONF transport 131 session in this way: 133 o A solution must reply with the [RFC6241] error "operation-not- 134 supported" if a "create-subscription" RPC is received on a NETCONF 135 session where any other 136 [I-D.draft-ietf-netconf-subscribed-notifications] or [RFC5277] 137 subscription exists. 138 o It is a prohibited to send updates or state change notifications 139 for a configured subscription on a NETCONF session where the 140 create-subscription RPC has successfully [RFC5277] created 141 subscription. 142 o A "create-subscription" RPC MUST be rejected if any 143 [I-D.draft-ietf-netconf-subscribed-notifications] or 144 [RFC5277]subscription is active across that NETCONF transport 145 session. 147 If a publisher supports this specification but not subscriptions via 148 [RFC5277], the publisher MUST NOT advertise 149 "urn:ietf:params:netconf:capability:notification:1.0". 151 5. Mandatory XML, event stream and datastore support 153 The "encode-xml" feature of 154 [I-D.draft-ietf-netconf-subscribed-notifications] is mandatory to 155 support. This indicates that XML is a valid encoding for RPCs, state 156 change notifications, and subscribed content. 158 A NETCONF publisher supporting event stream subscription via 159 [I-D.draft-ietf-netconf-subscribed-notifications] MUST support the 160 "NETCONF" event stream identified in that draft. 162 A NETCONF publisher supporting [I-D.ietf-netconf-yang-push] MUST 163 support the operational state datastore as defined by 164 [I.D.draft-ietf-netmod-revised-datastores]. 166 6. NETCONF connectivity and the subscription lifecycle 168 This section describes how the availability of NETCONF transport 169 impacts the establishment and lifecycle of different types of 170 [I-D.draft-ietf-netconf-subscribed-notifications] subscriptions. 172 6.1. Dynamic Subscriptions 174 For dynamic subscriptions, if the NETCONF session involved with the 175 "establish-subscription" terminates, the subscription MUST be 176 deleted. 178 6.2. Configured Subscriptions 180 For a configured subscription, there is no guarantee a transport 181 session is currently in place with each associated receiver. In 182 cases where a configured subscription has a receiver in the 183 CONNECTING state as described in 184 [I-D.draft-ietf-netconf-subscribed-notifications], section 2.5.1, and 185 the "transport" for that subscription is "NETCONF", but no NETCONF 186 transport session exists to that receiver (or all existing NETCONF 187 transport sessions are currently supporting [RFC5277] subscriptions), 188 then the publisher MUST initiate a transport session via NETCONF call 189 home [RFC8071], section 4.1 to that receiver. Until NETCONF 190 connectivity is established and a "subscription-started" state change 191 notification is successfully sent, that receiver MUST remain in 192 either the CONNECTING or the TIMEOUT state. 194 If the call home fails because the publisher receives receiver 195 credentials which are subsequently declined per [RFC8071], 196 Section 4.1, step S5 authentication, then that receiver MUST be 197 placed into the TIMEOUT state. 199 If the call home fails to establish for any other reason, the 200 publisher MUST NOT progress the receiver to the ACTIVE state. 201 Additionally, the publisher SHOULD place the receiver into the 202 TIMEOUT state after a predetermined number of either failed call home 203 attempts or NETCONF sessions remotely terminated by the receiver. 205 NETCONF transport session connectivity SHOULD be verified via 206 Section 4.1, step S7. 208 If a NETCONF session is disconnected but the "stop-time" of a 209 subscription being transported over that session has not been 210 reached, the publisher restarts the call home process and return the 211 receiver to the CONNECTING state. 213 7. Notification Messages 215 Notification messages transported over the NETCONF protocol will be 216 identical in format and content to those encoded using one-way 217 operations defined within [RFC5277], section 4. 219 8. Dynamic Subscriptions and RPC Error Responses 221 Management of dynamic subscriptions occurs via RPCs as defined in 222 [I-D.ietf-netconf-yang-push] and 223 [I-D.draft-ietf-netconf-subscribed-notifications]. When an RPC error 224 occurs, the NETCONF RPC reply MUST include an "rpc-error" element per 225 [RFC6241] with the error information populated as follows: 227 o an "error-type" node of "application". 228 o an "error-tag" node of "operation-failed". 229 o an "error-severity" of "error" (this MAY but does not have to be 230 included). 231 o an "error-app-tag" node with the value being a string that 232 corresponds to an identity associated with the error, as defined 233 in [I-D.draft-ietf-netconf-subscribed-notifications] section 2.4.6 234 for general subscriptions, and [I-D.ietf-netconf-yang-push] 235 Appendix A.1, for datastore subscriptions. The tag to use depends 236 on the RPC for which the error occurred. Viable errors for 237 different RPCs are as follows: 239 RPC use base identity 240 ---------------------- ---------------------------- 241 establish-subscription establish-subscription-error 242 modify-subscription modify-subscription-error 243 delete-subscription delete-subscription-error 244 kill-subscription kill-subscription-error 245 resynch-subscription resynch-subscription-error 247 o In case of error responses to an "establish-subscription" or 248 "modify-subscription" request there is the option of including an 249 "error-info" node. This node may contain XML-encoded data with 250 hints for parameter settings that might lead to successful RPC 251 requests in the future. Following are the yang-data structures 252 which may be returned: 254 establish-subscription returns hints in yang-data structure 255 ---------------------- ------------------------------------ 256 target: event stream establish-subscription-stream-error-info 257 target: datastore establish-subscription-datastore-error-info 259 modify-subscription returns hints in yang-data structure 260 ---------------------- ------------------------------------ 261 target: event stream modify-subscription-stream-error-info 262 target: datastore modify-subscription-datastore-error-info 264 The yang-data included within "error-info" SHOULD NOT include the 265 optional leaf "error-reason", as such a leaf would be redundant 266 with information that is already placed within the 267 "error-app-tag". 269 In case of an rpc error as a result of a "delete-subscription", a 270 "kill-subscription", or a "resynch-subscription" request, no 271 "error-info" needs to be included, as the "subscription-id" is 272 the only RPC input parameter and no hints regarding this RPC input 273 parameters need to be provided. 275 Note that "error-path" does not need to be included with the "rpc- 276 error" element, as subscription errors are generally not associated 277 with nodes in the datastore but with the choice of RPC input 278 parameters. 280 9. YANG module 282 This module references 283 [I-D.draft-ietf-netconf-subscribed-notifications]. 285 [ note to the RFC Editor - please replace XXXX within this YANG model 286 with the number of this document ] 288 module ietf-netconf-subscribed-notifications { 289 yang-version 1.1; 290 namespace 291 "urn:ietf:params:xml:ns:yang:ietf-netconf-subscribed-notifications"; 293 prefix nsn; 295 import ietf-subscribed-notifications { 296 prefix sn; 297 } 299 organization "IETF NETCONF (Network Configuration) Working Group"; 300 contact 301 "WG Web: 302 WG List: 304 Editor: Eric Voit 305 307 Editor: Alexander Clemm 308 310 Editor: Alberto Gonzalez Prieto 311 313 Editor: Ambika Prasad Tripathy 314 316 Editor: Einar Nilsen-Nygaard 317 "; 319 description 320 "Defines NETCONF as a supported transport for subscribed event 321 notifications. 323 Copyright (c) 2018 IETF Trust and the persons identified as authors 324 of the code. All rights reserved. 326 Redistribution and use in source and binary forms, with or without 327 modification, is permitted pursuant to, and subject to the license 328 terms contained in, the Simplified BSD License set forth in Section 329 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents 330 (https://trustee.ietf.org/license-info). 332 This version of this YANG module is part of RFC XXXX; see the RFC 333 itself for full legal notices."; 335 revision 2018-04-20 { 336 description 337 "Initial version"; 338 reference 339 "RFC XXXX: NETCONF Support for Event Notifications"; 340 } 342 identity netconf { 343 base sn:transport; 344 base sn:inline-address; 345 description 346 "NETCONF is used as a transport for notification messages and 347 state change notifications."; 348 } 350 } 352 10. IANA Considerations 354 This document registers the following namespace URI in the "IETF XML 355 Registry" [RFC3688]: 357 URI: urn:ietf:params:xml:ns:yang:ietf-netconf-subscribed- 358 notifications 359 Registrant Contact: The IESG. 360 XML: N/A; the requested URI is an XML namespace. 362 This document registers the following YANG module in the "YANG Module 363 Names" registry [RFC6020]: 365 Name: ietf-netconf-subscribed-notifications 366 Namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-subscribed- 367 notifications 368 Prefix: nsn 369 Reference: RFC XXXX: NETCONF Support for Event Notifications 371 11. Security Considerations 373 Notification messages (including state change notifications) are 374 never sent before the NETCONF capabilities exchange has completed. 376 If a malicious or buggy NETCONF subscriber sends a number of 377 establish-subscription requests, then these subscriptions accumulate 378 and may use up system resources. In such a situation, subscriptions 379 MAY be terminated by terminating the underlying NETCONF session. The 380 publisher MAY also suspend or terminate a subset of the active 381 subscriptions on that NETCONF session. 383 This draft does not define a YANG module and therefore doesn't have 384 any YANG-related Security Considerations. 386 12. Acknowledgments 388 We wish to acknowledge the helpful contributions, comments, and 389 suggestions that were received from: Andy Bierman, Yan Gang, Sharon 390 Chisholm, Hector Trevino, Peipei Guo, Susan Hares, Tim Jenkins, 391 Balazs Lengyel, Martin Bjorklund, Mahesh Jethanandani, Kent Watsen, 392 and Guangying Zheng. 394 13. Normative References 396 [I-D.draft-ietf-netconf-subscribed-notifications] 397 Voit, E., Clemm, A., Gonzalez Prieto, A., Tripathy, A., 398 and E. Nilsen-Nygaard, "Customized Subscriptions to a 399 Publisher's Event Streams", draft-ietf-netconf-subscribed- 400 notifications-11 (work in progress), April 2018. 402 [I-D.ietf-netconf-yang-push] 403 Clemm, Alexander., Voit, Eric., Gonzalez Prieto, Alberto., 404 Tripathy, A., Nilsen-Nygaard, E., Bierman, A., and B. 405 Lengyel, "YANG Datastore Subscription", February 2018, 406 . 409 [I.D.draft-ietf-netmod-revised-datastores] 410 Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 411 and R. Wilton, "Network Management Datastore 412 Architecture", draft-ietf-netmod-revised-datastores-10 413 (work in progress), January 2018. 415 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 416 Requirement Levels", BCP 14, RFC 2119, 417 DOI 10.17487/RFC2119, March 1997, 418 . 420 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 421 DOI 10.17487/RFC3688, January 2004, 422 . 424 [RFC5277] Chisholm, S. and H. Trevino, "NETCONF Event 425 Notifications", RFC 5277, DOI 10.17487/RFC5277, July 2008, 426 . 428 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 429 the Network Configuration Protocol (NETCONF)", RFC 6020, 430 DOI 10.17487/RFC6020, October 2010, 431 . 433 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 434 and A. Bierman, Ed., "Network Configuration Protocol 435 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 436 . 438 [RFC8071] Watsen, K., "NETCONF Call Home and RESTCONF Call Home", 439 RFC 8071, DOI 10.17487/RFC8071, February 2017, 440 . 442 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 443 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 444 May 2017, . 446 Appendix A. Examples 448 This section is non-normative. 450 A.1. Event Stream Discovery 452 As defined in [I-D.draft-ietf-netconf-subscribed-notifications] an 453 event stream exposes a continuous set of events available for 454 subscription. A NETCONF client can retrieve the list of available 455 event streams from a NETCONF publisher using the "get" operation 456 against the top-level container "/streams" defined in 457 [I-D.draft-ietf-netconf-subscribed-notifications] Section 3.1. 459 The following example illustrates the retrieval of the list of 460 available event streams: 462 464 465 466 468 469 470 472 Figure 1: Get streams request 474 After such a request, the NETCONF publisher returns a list of event 475 streams available, as well as additional information which might 476 exist in the container. 478 A.2. Dynamic Subscriptions 480 A.2.1. Establishing Dynamic Subscriptions 482 The following figure shows two successful "establish-subscription" 483 RPC requests as per 484 [I-D.draft-ietf-netconf-subscribed-notifications]. The first request 485 is given a subscription identifier of 22, the second, an identifier 486 of 23. 488 +------------+ +-----------+ 489 | Subscriber | | Publisher | 490 +------------+ +-----------+ 491 | | 492 | Capability Exchange | 493 |<---------------------------->| 494 | | 495 | | 496 | establish-subscription | 497 |----------------------------->| (a) 498 | RPC Reply: OK, id = 22 | 499 |<-----------------------------| (b) 500 | | 501 | notification message (for 22)| 502 |<-----------------------------| 503 | | 504 | | 505 | establish-subscription | 506 |----------------------------->| 507 | RPC Reply: OK, id = 23 | 508 |<-----------------------------| 509 | | 510 | | 511 | notification message (for 22)| 512 |<-----------------------------| 513 | notification message (for 23)| 514 |<-----------------------------| 515 | | 517 Figure 2: Multiple subscriptions over a NETCONF session 519 To provide examples of the information being transported, example 520 messages for interactions (a) and (b) in Figure 2 are detailed below: 522 523 525 NETCONF 526 527 /ex:foo/ 528 529 10 530 531 533 Figure 3: establish-subscription request (a) 535 As NETCONF publisher was able to fully satisfy the request (a), the 536 publisher sends the subscription identifier of the accepted 537 subscription within message (b): 539 541 543 22 544 545 547 Figure 4: establish-subscription success (b) 549 If the NETCONF publisher had not been able to fully satisfy the 550 request, or subscriber has no authorization to establish the 551 subscription, the publisher would have sent an RPC error response. 552 For instance, if the "dscp" value of 10 asserted by the subscriber in 553 Figure 3 proved unacceptable, the publisher may have returned: 555 557 558 application 559 operation-failed 560 error 561 dscp-unavailable 562 563 565 Figure 5: an unsuccessful establish subscription 567 The subscriber can use this information in future attempts to 568 establish a subscription. 570 A.2.2. Modifying Dynamic Subscriptions 572 An existing subscription may be modified. The following exchange 573 shows a negotiation of such a modification via several exchanges 574 between a subscriber and a publisher. This negotiation consists of a 575 failed RPC modification request/response, followed by a successful 576 one. 578 +------------+ +-----------+ 579 | Subscriber | | Publisher | 580 +------------+ +-----------+ 581 | | 582 | notification message (for 23)| 583 |<-----------------------------| 584 | | 585 | modify-subscription (id = 23)| 586 |----------------------------->| (c) 587 | RPC error (with hint) | 588 |<-----------------------------| (d) 589 | | 590 | modify-subscription (id = 23)| 591 |----------------------------->| 592 | RPC Reply: OK | 593 |<-----------------------------| 594 | | 595 | notification message (for 23)| 596 |<-----------------------------| 597 | | 599 Figure 6: Interaction model for successful subscription modification 601 If the subscription being modified in Figure 6 is a datastore 602 subscription as per [I-D.ietf-netconf-yang-push], the modification 603 request made in (c) may look like that shown in Figure 7. As can be 604 seen, the modifications being attempted are the application of a new 605 xpath filter as well as the setting of a new periodic time interval. 607 609 612 23 613 614 /interfaces-state/interface/oper-status 615 616 617 500 618 619 620 622 Figure 7: Subscription modification request (c) 624 If the NETCONF publisher can satisfy both changes, the publisher 625 sends a positive result for the RPC. If the NETCONF publisher cannot 626 satisfy either of the proposed changes, the publisher sends an RPC 627 error response (d). The following is an example RPC error response 628 for (d) which includes a hint. This hint is an alternative time 629 period value which might have resulted in a successful modification: 631 633 634 application 635 operation-failed 636 error 637 638 period-unsupported 639 640 642 643 644 3000 645 646 647 648 649 651 Figure 8: Modify subscription failure with Hint (d) 653 A.2.3. Deleting Dynamic Subscriptions 655 The following demonstrates deleting a subscription. This 656 subscription may have been to either a stream or a datastore. 658 660 662 22 663 664 666 Figure 9: Delete subscription 668 If the NETCONF publisher can satisfy the request, the publisher 669 replies with success to the RPC request. 671 If the NETCONF publisher cannot satisfy the request, the publisher 672 sends an error-rpc element indicating the modification didn't work. 673 Figure 10 shows a valid response for existing valid subscription 674 identifier, but that subscription identifier was created on a 675 different NETCONF transport session: 677 679 680 application 681 operation-failed 682 error 683 684 no-such-subscription 685 686 687 689 Figure 10: Unsuccessful delete subscription 691 A.3. Configured Subscriptions 693 Configured subscriptions may be established, modified, and deleted 694 using configuration operations against the top-level subtree of 695 [I-D.draft-ietf-netconf-subscribed-notifications] or 696 [I-D.ietf-netconf-yang-push]. 698 In this section, we present examples of how to manage the 699 configuration subscriptions using a NETCONF client. 701 A.3.1. Creating Configured Subscriptions 703 For subscription creation, a NETCONF client may send: 705 706 707 708 709 710 none 711 712 714 715 1922 716 718 nsn:netconf 719 720 NETCONF 721 722 723 receiver1 724
1.2.3.4
725
726
727
728
729
730
731
733 Figure 11: Create a configured subscription 735 If the request is accepted, the publisher will indicate this. If the 736 request is not accepted because the publisher cannot serve it, no 737 configuration is changed. In this case the publisher may reply: 739 741 742 application 743 resource-denied 744 error 745 746 Temporarily the publisher cannot serve this 747 subscription due to the current workload. 748 749 750 752 Figure 12: Response to a failed configured subscription establishment 754 After a subscription has been created, NETCONF connectivity to each 755 receiver will be established if it does not already exist. This will 756 be accomplished via [RFC8071]. 758 The following figure shows the interaction model for the successful 759 creation of a configured subscription. 761 +----------+ +-----------+ +---------+ 762 |Config Ops| | Publisher | | 1.2.3.4 | 763 +----------+ +-----------+ +---------+ 764 | | | 765 | Capability Exchange | | 766 |<-------------------------->| | 767 | | | 768 | | | 769 | Edit-config | | 770 |--------------------------->| | 771 | RPC Reply: OK | | 772 |<---------------------------| | 773 | | Call Home | 774 | |<-------------->| 775 | | | 776 | | subscription- | 777 | | started | 778 | |--------------->| 779 | | | 780 | | notification | 781 | | message | 782 | |--------------->| 784 Figure 13: Interaction model for configured subscription 785 establishment 787 A.3.2. Modifying Configured Subscriptions 789 Configured subscriptions can be modified using configuration 790 operations against the top-level container "/subscriptions". 792 For example, the subscription established in the previous section 793 could be modified as follows, here a adding a second receiver: 795 796 797 798 799 800 801 803 804 805 1922 806 807 808 809 receiver2 810
1.2.3.5
811
812
813
814
815
816
817
819 Figure 14: Modify configured subscription 821 If the request is accepted, the publisher will indicate success. The 822 result is that the interaction model described in Figure 13 may be 823 extended as follows. 825 +----------+ +-----------+ +---------+ +---------+ 826 |Config Ops| | Publisher | | 1.2.3.4 | | 1.2.3.5 | 827 +----------+ +-----------+ +---------+ +---------+ 828 | | notification | | 829 | | message | | 830 | |--------------->| | 831 | Edit-config | | | 832 |--------------------------->| | | 833 | RPC Reply: OK | | | 834 |<---------------------------| | | 835 | | subscription- | | 836 | | started | | 837 | |---------------------------->| 838 | | | | 839 | | notification | | 840 | | message | | 841 | |--------------->| | 842 | |---------------------------->| 843 | | | | 845 Figure 15: Interaction model for configured subscription modification 847 Note in the above that in the specific example above, modifying a 848 configured subscription actually resulted in "subscription-started" 849 notification. And because of an existing NETCONF session, no 850 additional call home was needed. Also note that if the edit of the 851 configuration had impacted the filter, a separate modify-subscription 852 would have been required for the original receiver. 854 A.3.3. Deleting Configured Subscriptions 856 Configured subscriptions can be deleted using configuration 857 operations against the top-level container "/subscriptions". 858 Deleting the subscription above would result in the following flow 859 impacting all active receivers. 861 +----------+ +-----------+ +---------+ +---------+ 862 |Config Ops| | Publisher | | 1.2.3.4 | | 1.2.3.5 | 863 +----------+ +-----------+ +---------+ +---------+ 864 | | | | 865 | | notification | | 866 | | message | | 867 | |--------------->| | 868 | |---------------------------->| 869 | | | | 870 | Edit-config | | | 871 |--------------------------->| | | 872 | RPC Reply: OK | | | 873 |<---------------------------| | | 874 | | subscription- | | 875 | | terminated | | 876 | |--------------->| | 877 | |---------------------------->| 878 | | | | 880 Figure 16: Interaction model for configured subscription deletion 882 A.4. Subscription State Notifications 884 A publisher will send subscription state notifications according to 885 the definitions within 886 [I-D.draft-ietf-netconf-subscribed-notifications]). 888 A.4.1. subscription-started and subscription-modified 890 A "subscription-started" over NETCONF encoded in XML would look like: 892 893 2007-09-01T10:00:00Z 894 896 39 897 899 nsn:netconf 900 901 902 /ex:foo 903 904 NETCONF 905 906 908 Figure 17: subscription-started subscription state notification 910 The "subscription-modified" is identical to Figure 17, with just the 911 word "started" being replaced by "modified". 913 A.4.2. subscription-completed, subscription-resumed, and replay- 914 complete 916 A "subscription-completed" would look like: 918 920 2007-09-01T10:00:00Z 921 923 39 924 925 927 Figure 18: subscription-completed notification in XML 929 The "subscription-resumed" and "replay-complete" are virtually 930 identical, with "subscription-completed" simply being replaced by 931 "subscription-resumed" and "replay-complete". 933 A.4.3. subscription-terminated and subscription-suspended 935 A "subscription-terminated" would look like: 937 939 2007-09-01T10:00:00Z 940 942 39 943 944 suspension-timeout 945 946 947 949 Figure 19: subscription-terminated subscription state notification 951 The "subscription-suspended" is virtually identical, with 952 "subscription-terminated" simply being replaced by "subscription- 953 suspended". 955 Appendix B. Changes between revisions 957 (To be removed by RFC editor prior to publication) 959 B.1. v08 to v09 961 o Tweaks based on Kent's comments. 962 o Updated examples in Appendix A. And updates to some object names 963 based on changes in the subscribed-notifications draft. 964 o Added a YANG model for the NETCONF identity. 966 B.2. v07 to v08 968 o Tweaks and clarification on :interleave. 970 B.3. v06 to v07 972 o XML encoding and operational datastore mandatory. 973 o Error mechanisms and examples updated. 975 B.4. v05 to v06 977 o Moved examples to appendices 978 o All examples rewritten based on namespace learnings 979 o Normative text consolidated in front 980 o Removed all mention of JSON 981 o Call home process detailed 982 o Note: this is a major revision attempting to cover those comments 983 received from two week review. 985 B.5. v03 to v04 987 o Added additional detail to "configured subscriptions" 988 o Added interleave capability 989 o Adjusted terminology to that in draft-ietf-netconf-subscribed- 990 notifications 991 o Corrected namespaces in examples 993 B.6. v01 to v03 995 o Text simplifications throughout 996 o v02 had no meaningful changes 998 B.7. v00 to v01 1000 o Added Call Home in solution for configured subscriptions. 1001 o Clarified support for multiple subscription on a single session. 1002 No need to support multiple create-subscription. 1003 o Added mapping between terminology in yang-push and [RFC6241] (the 1004 one followed in this document). 1005 o Editorial improvements. 1007 Authors' Addresses 1009 Eric Voit 1010 Cisco Systems 1012 Email: evoit@cisco.com 1014 Alexander Clemm 1015 Huawei 1017 Email: ludwig@clemm.org 1019 Alberto Gonzalez Prieto 1020 VMware 1022 Email: agonzalezpri@vmware.com 1024 Einar Nilsen-Nygaard 1025 Cisco Systems 1027 Email: einarnn@cisco.com 1028 Ambika Prasad Tripathy 1029 Cisco Systems 1031 Email: ambtripa@cisco.com