-
Notifications
You must be signed in to change notification settings - Fork 1
/
draft-ietf-netconf-subscribed-notifications-01-PreRelease-v11Apr2017.txt
2743 lines (2018 loc) · 92.2 KB
/
draft-ietf-netconf-subscribed-notifications-01-PreRelease-v11Apr2017.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
*** PRE-DRAFT Release, only intended for internal discussions ***
NETCONF E. Voit
Internet-Draft Cisco Systems
Intended status: Standards Track A. Clemm
Expires: October 13, 2017 Huawei
A. Gonzalez Prieto
E. Nilsen-Nygaard
A. Tripathy
Cisco Systems
April 11, 2017
Subscribing to Event Notifications
draft-ietf-netconf-subscribed-notifications-01
Abstract
This document defines capabilities and operations for the customized
establishment of subscriptions into system generated events. Also
defined are asynchronous delivery mechanisms for instances of those
events to targeted receivers. Effectively this allows a susbcriber
to request and receive a stream of publisher generated events where
custom filtering has been applied.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 13, 2017.
Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
Voit, et al. Expires October 13, 2017 [Page 1]
Internet-Draft Event Notifications April 2017
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
1.3. Solution Overview . . . . . . . . . . . . . . . . . . . . 5
2. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1. Event Streams . . . . . . . . . . . . . . . . . . . . . . 6
2.2. Filters . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3. Subscription State Model at the Publisher . . . . . . . . 6
3. Data Model Trees for Event Notifications . . . . . . . . . . 8
4. Dynamic Subscriptions . . . . . . . . . . . . . . . . . . . . 12
4.1. Establishing a Subscription . . . . . . . . . . . . . . . 12
4.2. Modifying a Subscription . . . . . . . . . . . . . . . . 13
4.3. Deleting a Subscription . . . . . . . . . . . . . . . . . 13
4.4. Killing a Subscription . . . . . . . . . . . . . . . . . 13
5. Configured Subscriptions . . . . . . . . . . . . . . . . . . 14
5.1. Establishing a Configured Subscription . . . . . . . . . 14
5.2. Modifying a Configured Subscription . . . . . . . . . . . 16
5.3. Deleting a Configured Subscription . . . . . . . . . . . 16
6. Event (Data Plane) Notifications . . . . . . . . . . . . . . 17
7. Subscription State Notifications . . . . . . . . . . . . . . 18
7.1. subscription-started . . . . . . . . . . . . . . . . . . 18
7.2. subscription-modified . . . . . . . . . . . . . . . . . . 18
7.3. subscription-terminated . . . . . . . . . . . . . . . . . 19
7.4. subscription-suspended . . . . . . . . . . . . . . . . . 19
7.5. subscription-resumed . . . . . . . . . . . . . . . . . . 19
7.6. notification-complete . . . . . . . . . . . . . . . . . . 19
7.7. replay-complete . . . . . . . . . . . . . . . . . . . . . 19
8. Administrative Functions . . . . . . . . . . . . . . . . . . 20
8.1. Subscription Monitoring . . . . . . . . . . . . . . . . . 20
8.2. Capability Advertisement . . . . . . . . . . . . . . . . 20
8.3. Event Stream Discovery . . . . . . . . . . . . . . . . . 21
9. Data Model for Event Notifications . . . . . . . . . . . . . 21
10. Considerations . . . . . . . . . . . . . . . . . . . . . . . 42
10.1. Implementation Considerations . . . . . . . . . . . . . 42
10.2. Security Considerations . . . . . . . . . . . . . . . . 42
11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 43
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 43
12.1. Normative References . . . . . . . . . . . . . . . . . . 43
12.2. Informative References . . . . . . . . . . . . . . . . . 44
Voit, et al. Expires October 13, 2017 [Page 2]
Internet-Draft Event Notifications April 2017
Appendix A. Relationships to other drafts . . . . . . . . . . . 45
A.1. ietf-netconf-netconf-event-notif . . . . . . . . . . . . 45
A.2. ietf-netconf-restconf-notif . . . . . . . . . . . . . . . 45
A.3. ietf-netconf-yang-push . . . . . . . . . . . . . . . . . 46
A.4. voit-notifications2 . . . . . . . . . . . . . . . . . . . 46
Appendix B. Issues that are currently being worked and resolved 46
Appendix C. Changes between revisions . . . . . . . . . . . . . 47
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 48
1. Introduction
This document defines capabilities and operations for providing
asynchronous message delivery of event notifications. Functionality
defined within includes that necessary to establish, monitor, and
support subscriptions, as well as that needed needed to support a
corresponding push of events. The result is a solution which
delivers a "Subscribe then Publish" capability where the customized
information needs of each target receiver are understood by the
publisher before events are marshalled and pushed.
While the functionality defined in this document is transport-
agnostic, subscription control plane operations bindings exist for
both NETCONF [RFC6241] and RESTCONF [RFC8040]. In addition, bindings
for the pushed event instances have been defined for protocols such
as NETCONF and HTTP2 [RFC7540]. For specifics on these bindings see
[I-D.ietf-netconf-netconf-event-notif]) and
[I-D.ietf-netconf-restconf-notif].
The capabilities and operations defined in this document with
implemented in conjunction with
[I-D.ietf-netconf-netconf-event-notif] are intended to obsolete
[RFC5277].
1.1. Motivation
There are various [RFC5277] limitations, many of which have been
exposed in [RFC7923] which needed to be solved. Key here are:
o Ability to dynamically or statically subscribe to event
notifications available on a publisher.
o Ability to negotiate acceptable dynamic subscription parameters.
o Ability to filter the subset of notifications to be pushed with
stream-specific semantics.
Voit, et al. Expires October 13, 2017 [Page 3]
Internet-Draft Event Notifications April 2017
o Ability for the notification payload to be interpreted
independently of the transport protocol. (In other words, the
encoded notification fully describes itself.)
o Mechanism to communicate the notifications.
o Ability to replay locally logged notifications.
1.2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
Configured subscription: A subscription installed via a configuration
interface which persists across reboots.
Dynamic subscription: A subscription agreed between subscriber and
publisher created via RPC subscription state signaling messages.
Event: An occurrence of something that may be of interest. (e.g., a
configuration change, a fault, a change in status, crossing a
threshold, or an external input to the system.)
Event notification: A set of information intended for a Receiver
indicating that one or more Event(s) have occurred. Details of the
Event(s) may be included within the Notification.
Filter: Evaluation criteria, which may be applied against a targeted
set of objects/events in a subscription. Information traverses the
filter only if specified filter criteria are met.
NACM: NETCONF Access Control Model.
Publisher: An entity responsible for streaming event notifications
per the terms of a Subscriptions
Receiver: A target to which a publisher pushes event notifications.
For dynamic subscriptions, the receiver and subscriber will often be
the same entity.
Stream (also referred to as "event stream"): A continuous ordered set
of events grouped under an explicit criteria.
Subscriber: An entity able to request and negotiate a contract for
the receipt of event notifications from a publisher.
Voit, et al. Expires October 13, 2017 [Page 4]
Internet-Draft Event Notifications April 2017
Subscription: A contract with a publisher, stipulating which
information receiver(s) wishes to have pushed from the publisher
without the need for further solicitation.
1.3. Solution Overview
This document describes a transport protocol-agnostic mechanisms for
subscribing to and receiving event notifications from an event
publisher. Two types of subscriptions are supported:
1. Dynamic subscriptions, where a subscriber initiates a
subscription negotiation with a publisher via RPC. If the
publisher wants to serve this request, it will accept it, and
then start pushing event notifications. If the publisher does
not wish to serve it as requested, then an error response is
returned. This response may include hints at subscription
parameters which would have been accepted.
2. Configured subscriptions, which allows the managing subscriptions
via a configuration interface so that a publisher can send event
notifications to configured receiver(s). Support for this
capability is optional.
Additional characteristics differentiating configured from dynamic
subscriptions include:
o The lifetime of a dynamic subscription is limited by the lifetime
of the subscriber session used to establish it. Typically loss of
the transport session tears down any dependent dynamic
subscriptions. The lifetime of a configured subscription is
driven by relevent configuration being present on the running
configuration. This implies configured subscriptions persist
across reboots, and persists even when transport is unavailable.
o Configured subscriptions can be modified by any configuration
client with write rights on the configuration of the subscription.
Dynamic subscriptions can only be modified via an RPC request made
upon the original subscribing transport session.
Note that there is no mixing-and-matching of dynamic and configured
subscriptions. Specifically, a configured subscription cannot be
modified or deleted using RPC. Similarly, a subscription established
via RPC cannot be modified through configuration operations.
The publisher may decide to terminate a dynamic subscription at any
time. Similarly, it may decide to temporarily suspend the sending of
event notifications for either configured or dynamic subscriptions.
Such termination or suspension may be driven by the publisher running
Voit, et al. Expires October 13, 2017 [Page 5]
Internet-Draft Event Notifications April 2017
out of resources to serve the subscription, or by internal errors on
the publisher.
2. Solution
2.1. Event Streams
An event stream is a set of events available for subscription from a
publisher. It is out of the scope of this document to identify a)
how streams are defined, b) how events are defined/generated, and c)
how events are assigned to streams.
There are two standardized event streams within this document:
NETCONF and SYSLOG. The NETCONF event stream contains all NETCONF
XML event information supported by the publisher, except for where it
has been explicitly indicated that this the event must be excluded
from the NETCONF stream. The SYSLOG event stream mirrors the
discrete set entries which are concurrently being placed into a
device's local Syslog. Beyond these two, additional streams can be
added via model augmentation.
As events are raised by a system, they may be assigned to one or more
streams. The event is distributed to receivers where: (1) a
subscription includes the identified stream, and (2) susbcription
filtering allows the event to traverse.
If access control permissions are in use to secure publisher content,
then for notifications to be sent to a receiver, that receiver must
be allowed access to the stream. If permissions change during the
lifecycle of the of a subscription, then events must be sent or
restricted accordingly. This can be be done by re-establishing a
subscription with the updated permissions, or by seamlessly updating
the permissions of an existing subscription.
2.2. Filters
A publisher implementation MUST support the ability to perform
filtering of notification records. Two filtering syntaxes supported
are [XPATH] and [RFC6241]. Event notifications which evaluate to
"true" as a result of the evaluation by the filter must traverse the
filter in their entirety. A subset of information is never stripped
from within the event notification.
2.3. Subscription State Model at the Publisher
Below is the state machine of a subscription for the publisher for a
dyanmic subscription. It is important to note that such a
subscription doesn't exist at the publisher until it is accepted and
Voit, et al. Expires October 13, 2017 [Page 6]
Internet-Draft Event Notifications April 2017
made active. The mere request by a subscriber to establish a
subscription is insufficient for that asserted subscription to be
externally visible via this state machine.
.-------.
| start |
'-------'
|
establish
|
| .----------modify------------.
v v '
.-----------. .-----------.
.--------. | |-----suspend------->| |
modify '| active | | suspended |
'--------->| |<----resume---------| |
'-----------' '-----------'
| |
delete/kill delete/kill
| |
v |
.-------. |
| end |<---------------------------'
'-------'
Figure 1: Subscription states at publisher
Of interest in this state machine are the following:
o Successful establish or modify RPCs put the subscription into an
active state.
o Failed modify RPCs will leave the subscription in its previous
state, with no visible change to any streaming updates.
o A delete or kill RPC will end the subscription.
o Suspend and resume state changes are driven by internal process
and prioritization. There are no external controls over suspend
and resume.
An equivalent state machine exists for configured subscriptions.
However the transition between states is via configuration operations
rather than via RPC.
Voit, et al. Expires October 13, 2017 [Page 7]
Internet-Draft Event Notifications April 2017
3. Data Model Trees for Event Notifications
The YANG data model for event notifications is depicted in this
section.
module: ietf-subscribed-notifications
+--ro streams
| +--ro stream* stream
+--rw filters
| +--rw filter* [identifier]
| +--rw identifier filter-id
| +--rw filter-type filter-type
| +--rw filter
+--rw subscription-config {configured-subscriptions}?
| +--rw subscription* [identifier]
| +--rw identifier subscription-id
| +--rw encoding? encoding
| +--rw (target)
| | +--:(event-stream)
| | +--rw stream stream
| +--rw (applied-filter)
| | +--:(by-reference)
| | | +--rw filter-ref filter-ref
| | +--:(locally-configured)
| | +--rw filter-type filter-type
| | +--rw filter
| +--rw stop-time? yang:date-and-time
| +--rw receivers
| | +--rw receiver* [address port]
| | +--rw address inet:host
| | +--rw port inet:port-number
| | +--rw protocol? transport-protocol
| +--rw (notification-origin)?
| +--:(interface-originated)
| | +--rw source-interface? if:interface-ref
| +--:(address-originated)
| +--rw source-vrf? string
| +--rw source-address? inet:ip-address-no-zone
+--ro subscriptions
+--ro subscription* [identifier]
+--ro identifier subscription-id
+--ro configured-subscription?
| empty {configured-subscriptions}?
+--ro encoding? encoding
+--ro (target)
| +--:(event-stream)
| +--ro stream stream
+--ro replay-start-time? yang:date-and-time
Voit, et al. Expires October 13, 2017 [Page 8]
Internet-Draft Event Notifications April 2017
+--ro (applied-filter)
| +--:(by-reference)
| | +--ro filter-ref filter-ref
| +--:(locally-configured)
| +--ro filter-type filter-type
| +--ro filter
+--ro stop-time? yang:date-and-time
+--ro (notification-origin)?
| +--:(interface-originated)
| | +--ro source-interface? if:interface-ref
| +--:(address-originated)
| +--ro source-vrf? string
| +--ro source-address? inet:ip-address-no-zone
+--ro receivers
| +--ro receiver* [address port]
| +--ro address inet:host
| +--ro port inet:port-number
| +--ro protocol? transport-protocol
| +--ro pushed-notifications? yang:counter64
| +--ro excluded-notifications? yang:counter64
+--ro subscription-status? subscription-status
rpcs:
+---x establish-subscription
| +---w input
| | +---w encoding? encoding
| | +---w (target)
| | | +--:(event-stream)
| | | +---w stream stream
| | +---w replay-start-time? yang:date-and-time
| | +---w (applied-filter)
| | | +--:(by-reference)
| | | | +---w filter-ref filter-ref
| | | +--:(locally-configured)
| | | +---w filter-type filter-type
| | | +---w filter
| | +---w stop-time? yang:date-and-time
| +--ro output
| +--ro subscription-result subscription-result
| +--ro (result)?
| +--:(no-success)
| | +--ro filter-failure? string
| | +--ro replay-start-time-hint? yang:date-and-time
| +--:(success)
| +--ro identifier subscription-id
+---x modify-subscription
| +---w input
| | +---w identifier? subscription-id
Voit, et al. Expires October 13, 2017 [Page 9]
Internet-Draft Event Notifications April 2017
| | +---w (applied-filter)
| | | +--:(by-reference)
| | | | +---w filter-ref filter-ref
| | | +--:(locally-configured)
| | | +---w filter-type filter-type
| | | +---w filter
| | +---w stop-time? yang:date-and-time
| +--ro output
| +--ro subscription-result subscription-result
| +--ro (result)?
| +--:(no-success)
| +--ro filter-failure? string
+---x delete-subscription
| +---w input
| | +---w identifier subscription-id
| +--ro output
| +--ro subscription-result subscription-result
+---x kill-subscription
+---w input
| +---w identifier subscription-id
+--ro output
+--ro subscription-result subscription-result
notifications:
+---n replay-complete
| +--ro identifier subscription-id
+---n notification-complete
| +--ro identifier subscription-id
+---n subscription-started
| +--ro identifier subscription-id
| +--ro encoding? encoding
| +--ro (target)
| | +--:(event-stream)
| | +--ro stream stream
| +--ro replay-start-time? yang:date-and-time
| +--ro (applied-filter)
| | +--:(by-reference)
| | | +--ro filter-ref filter-ref
| | +--:(locally-configured)
| | +--ro filter-type filter-type
| | +--ro filter
| +--ro stop-time? yang:date-and-time
+---n subscription-resumed
| +--ro identifier subscription-id
+---n subscription-modified
| +--ro identifier subscription-id
| +--ro encoding? encoding
| +--ro (target)
Voit, et al. Expires October 13, 2017 [Page 10]
Internet-Draft Event Notifications April 2017
| | +--:(event-stream)
| | +--ro stream stream
| +--ro replay-start-time? yang:date-and-time
| +--ro (applied-filter)
| | +--:(by-reference)
| | | +--ro filter-ref filter-ref
| | +--:(locally-configured)
| | +--ro filter-type filter-type
| | +--ro filter
| +--ro stop-time? yang:date-and-time
+---n subscription-terminated
| +--ro identifier subscription-id
| +--ro error-id subscription-errors
| +--ro filter-failure? string
+---n subscription-suspended
+--ro identifier subscription-id
+--ro error-id subscription-errors
+--ro filter-failure? string
The top-level decompositions of data model are as follows:
o "Streams" contains a list of event streams that are supported by
the publisher and against which subscription is allowed.
o "Filters" contains a configurable list of filters that can be
applied to a subscription. This allows users to reference an
existing filter definition as an alternative to defining a filter
inline for each subscription.
o "Subscription-config" contains the configuration of configured
subscriptions. The parameters of each configured subscription are
a superset of the parameters of a dynamic subscription and use the
same groupings. In addition, the configured subscriptions must
also specify intended receivers and may specify the push source
from which to send the stream of notification messages.
o "Subscriptions" contains a list of all subscriptions on a
publisher, both configured and dynamic. It can be used to
retrieve information about the subscriptions which an publisher is
serving.
The data model also contains a number of notifications that allow a
publisher to signal information about a subscription. Finally, the
data model contains a number of RPC definitions that are used to
manage dynamic subscriptions.
Voit, et al. Expires October 13, 2017 [Page 11]
Internet-Draft Event Notifications April 2017
4. Dynamic Subscriptions
Dynamic subscriptions are managed via RPC.
4.1. Establishing a Subscription
The <establish-subscription> operation allows a subscriber to request
the creation of a subscription via RPC.
The input parameters of the operation are:
o A filter which identifies what is being subscribed to, as well as
what should be included (or not) in the pushed results.
o An optional stream which may identify or reduce the domain of
events against which the subscription is applied.
o The desired encoding for the returned events. By default, updates
are encoded using XML. Other encodings may be supported, such as
JSON.
o An optional stop time for the subscription.
o An optional start time which indicates that this subscription is
requesting a replay push of events previously generated.
If the publisher cannot satisfy the <establish-subscription> request,
it sends a negative <subscription-result> element. If the subscriber
has no authorization to establish the subscription, the
<subscription-result> indicates an authorization error. Optionally,
the <subscription-result> may include one or more hints on
alternative input parameters and value which would have resulted in
an accepted subscription.
Subscription requests must fail if a filter with invalid syntax is
provided or if the name of a non-existent stream is provided.
4.1.1. Replay Subscription
The presence of a start time indicates that this is a replay
subscription. The start time must be earlier than the current time.
If the start time points earlier than the maintained history of
Publisher's event buffer, then the subscription must be rejected. In
this case the error response to the <establish-subscription> request
should include a start time supportable by the Publisher.
Voit, et al. Expires October 13, 2017 [Page 12]
Internet-Draft Event Notifications April 2017
4.2. Modifying a Subscription
The <modify-subscription> operation permits changing the terms of an
existing dynamic subscription previously established on that
transport session. Subscriptions created by configuration operations
cannot be modified via this RPC. Dynamic subscriptions can be
modified one or multiple times. If the publisher accepts the
requested modifications, it immediately starts sending events based
on the new terms, completely ignoring the previous ones. If the
publisher rejects the request, the subscription remains as prior to
the request. That is, the request has no impact whatsoever. The
contents of a such a rejected modification may include one or more
hints on alternative input parameters and value which would have
resulted in a successfully modified subscription.
Dynamic subscriptions established via RPC can only be modified (or
deleted) via RPC using the same transport session used to establish
that subscription.
4.3. Deleting a Subscription
The <delete-subscription> operation permits canceling an existing
subscription previously established on that transport session. If
the publisher accepts the request, it immediately stops sending
events for the subscription. If the publisher rejects the request,
all subscriptions remain as prior to the request. That is, the
request has no impact whatsoever.
Subscriptions established via RPC can only be deleted via RPC using
the same transport session used for subscription establishment.
Configured subscriptions cannot be deleted using RPCs. Instead,
configured subscriptions are deleted as part of regular configuration
operations. Publishers MUST reject any RPC attempt to delete
configured subscriptions.
4.4. Killing a Subscription
The <kill-subscription> operation permits an operator to end any
dynamic subscription. The publisher must accept the request for any
dynamic subscription, and immediately stop sending events.
Configured subscriptions cannot be kill using this RPC. Instead,
configured subscriptions are deleted as part of regular configuration
operations. Publishers MUST reject any RPC attempt to kill a
configured subscription.
Voit, et al. Expires October 13, 2017 [Page 13]
Internet-Draft Event Notifications April 2017
5. Configured Subscriptions
A configured subscription is a subscription installed via a
configuration interface.
Configured subscriptions persist across reboots, and persist even
when transport is unavailable.
Configured subscriptions can be modified by any configuration client
with write permissions for the configuration of the subscription.
Subscriptions can be modified or terminated via the configuration
interface at any point of their lifetime.
Supporting configured subscriptions is optional and advertised using
the "configured-subscriptions" feature.
In addition to subscription parameters that apply to dynamic
subscriptions, the following additional parameters apply to
configured subscriptions:
o One or more receiver IP addresses (and corresponding
ports)intended as the destination for push updates for each
subscription. In addition, the transport protocol for each
destination may be defined.
o Optional parameters to identify an egress interface or IP address
/ VRF where a subscription updates should be pushed from the
publisher. If not included, push updates will go off a default
interface for the device.
5.1. Establishing a Configured Subscription
Configured subscriptions are established using configuration
operations against the top-level subtree subscription-config. There
are two key differences between RPC and <edit-config> RPC operations
for subscription establishment. Firstly, <edit-config> operations
install a subscription without question, while RPCs may support
negotiation and rejection of requests. Secondly, while RPCs mandate
that the subscriber establishing the subscription is the only
receiver of the notifications, <edit-config> operations permit
specifying receivers independent of any tracked subscriber.
Immediately after a subscription is successfully established, the
publisher sends to any newly active receivers a control-plane
notification stating the subscription has been established
(subscription-started).
Because there is no explicit association with an existing transport
session, <edit-config> operations require additional parameters to
Voit, et al. Expires October 13, 2017 [Page 14]
Internet-Draft Event Notifications April 2017
indicate the receivers of the notifications and possibly the source
of the notifications such as a specific egress interface.
For example at subscription establishment if NETCONF transport is
being used, a client may send:
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<subscription-config
xmlns="urn:ietf:params:xml:ns:netconf:notification:2.0">
<subscription>
<subscription-id>
1922
</subscription-id>
<stream>
foo
</stream>
<receiver>
<address>
1.2.3.4
</address>
<port>
1234
</port>
</receiver>
</subscription>
</subscription-config>
</edit-config>
</rpc>
Figure 2: Configured subscription creation via NETCONF
if the request is accepted, the publisher would reply:
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>
Figure 3: Successful NETCONF configured subscription response
if the request is not accepted because the publisher cannot serve it,
the publisher may reply:
Voit, et al. Expires October 13, 2017 [Page 15]
Internet-Draft Event Notifications April 2017
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>resource-denied</error-tag>
<error-severity>error</error-severity>
<error-message xml:lang="en">
Temporarily the publisher cannot serve this
subscription due to the current workload.
</error-message>
</rpc-error>
</rpc-reply>
Figure 4: A NETCONF response for a failed configured subscription
creation
5.2. Modifying a Configured Subscription
Configured subscriptions can be modified using configuration
operations against the top-level subtree subscription-config.
Immediately after a subscription is successfully modified, the
publisher sends to the existing receivers a control-plane
notification stating the subscription has been modified (i.e.,
subscription-modified).
If the modification involved adding and/or removing receivers, those
modified receivers are sent control-plane notifications, indicating
they have been added (i.e, subscription-started to a specific
receiver) or removed (i.e., subscription-terminated to a specific
receiver.)
5.3. Deleting a Configured Subscription
Subscriptions can be deleted using configuration operations against
the top-level subtree subscription-config. For example, in RESTCONF:
DELETE /subscription-config/subscription=1922 HTTP/1.1
Host: example.com
HTTP/1.1 204 No Content
Date: Sun, 24 Jul 2016 11:23:40 GMT
Server: example-server
Figure 5: Deleting a configured subscription
Immediately after a subscription is successfully deleted, the
publisher sends to all receivers of that subscription a control-plane
Voit, et al. Expires October 13, 2017 [Page 16]
Internet-Draft Event Notifications April 2017
notification stating the subscription has been terminated
(subscription-terminated).
6. Event (Data Plane) Notifications
Once a subscription has been set up, the publisher streams
(asynchronously) notifications per the terms of the subscription. We
refer to these as event notifications. For dynamic subscriptions set
up via RPC operations, event notifications are sent over the session
used to establish the subscription. For configured subscriptions,
event notifications are sent over the specified connections.
An event notification is sent to a receiver when something of
interest occurs which is able to traverse all specified filtering and
access control criteria. The event notification must include:
o a subscription-id element of type uint32 which corresponds to
responsible subscription in the Publisher.
o an eventTime element which provides the time the event was
generated by the event source. This event time parameter is of
type dateTime and compliant to [RFC3339]. Implementations must
support time zones.
o the event notification content tagged and provided by a source in
the publisher.
The following is an example of a compliant event notification. This
example extending the example within [RFC7950] section 7.16.3 to
include the mandatory information described above:
<notification
xmlns=" urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2007-09-01T10:00:00Z</eventTime>
<subscription-id>500</subscription-id>
<link-failure xmlns="http://acme.example.com/system">
<if-name>so-1/2/3.0</if-name>
<if-admin-status>up</if-admin-status>
<if-oper-status>down</if-oper-status>
</link-failure>
</notification>
Figure 6: Data plane notification
While this extended [RFC7950] section 7.16 notification provides a
valid method of encapsulating subscribed notifications, other
transport encapsulation methods are also viable. Improvements may be
achieved in some implementations in the following ways:
Voit, et al. Expires October 13, 2017 [Page 17]
Internet-Draft Event Notifications April 2017
o transport efficiency may be gained by allowing the encapsulation
and bundled push of multiple events within the same event
notification.
o identifiers to designate the current and previous event
notification can be used to discover duplicated and dropped
notifications
o additional header types can be used to pass relevant metadata.
o a signature or hash can be included to verify the efficacy of the
Publisher
This is being explored in NETMOD Notifications 2.0
[I-D.voit-notifications2].
7. Subscription State Notifications
In addition to data plane notifications, a publisher may send
subscription state notifications to indicate to receivers that an
event related to the subscription management has occurred.
Subscription state notifications are unlike other notifications in
that they are not general-purpose notifications. They cannot be
filtered out, and they are delivered only to directly impacted
receiver(s) of a subscription. The definition of subscription state
notifications is distinct from other notifications by making use of a
YANG extension tagging them as subscription state notification.
Subscription state notifications include indications that a replay of
notifications has been completed, that a subscription is done sending
notifications because an end time has been reached, and that a
subscription has started, been modified, been terminated, or been
suspended. They are described in the following subsections.
7.1. subscription-started
This notification indicates that a configured subscription has
started and data updates are beginning to be sent. This notification
includes the parameters of the subscription, except for the
receiver(s) addressing information and push-source information. Note
that for RPC-based subscriptions, no such notifications are sent.
7.2. subscription-modified