-
Notifications
You must be signed in to change notification settings - Fork 0
3025 lines (2179 loc) · 113 KB
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 - INTERNAL DISCUSSIONS ONLY ***
NETCONF A. Clemm
Internet-Draft Huawei
Intended status: Standards Track E. Voit
Expires: August 12, 2017 A. Gonzalez Prieto
A. Tripathy
E. Nilsen-Nygaard
Cisco Systems
A. Bierman
YumaWorks
B. Lengyel
Ericsson
February 8, 2017
Subscribing to YANG datastore push updates
draft-ietf-netconf-yang-push-05
Abstract
This document defines a subscription and push mechanism for YANG
datastores. This mechanism allows subscriber applications to request
updates from a YANG datastore, which are then pushed by the publisher
to a receiver per a subscription policy, without requiring additional
subscriber requests.
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 August 12, 2017.
Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved.
Clemm, et al. Expires August 12, 2017 [Page 1]
Internet-Draft YANG-Push February 2017
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
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.
This document may contain material from IETF Documents or IETF
Contributions published or made publicly available before November
10, 2008. The person(s) controlling the copyright in some of this
material may not have granted the IETF Trust the right to allow
modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other
than English.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Definitions and Acronyms . . . . . . . . . . . . . . . . . . 5
3. Solution Overview . . . . . . . . . . . . . . . . . . . . . . 6
3.1. Subscription Model . . . . . . . . . . . . . . . . . . . 6
3.2. Negotiation of Subscription Policies . . . . . . . . . . 7
3.3. On-Change Considerations . . . . . . . . . . . . . . . . 8
3.4. Data Encodings . . . . . . . . . . . . . . . . . . . . . 9
3.5. YANG object filters . . . . . . . . . . . . . . . . . . . 10
3.6. Push Data Stream and Transport Mapping . . . . . . . . . 10
3.7. Subscription management . . . . . . . . . . . . . . . . . 15
3.8. Other considerations . . . . . . . . . . . . . . . . . . 16
4. A YANG data model for management of datastore push
subscriptions . . . . . . . . . . . . . . . . . . . . . . . . 20
4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2. Filters . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3. Subscription configuration . . . . . . . . . . . . . . . 27
4.4. Notifications . . . . . . . . . . . . . . . . . . . . . . 28
4.5. RPCs . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5. YANG module . . . . . . . . . . . . . . . . . . . . . . . . . 35
6. Security Considerations . . . . . . . . . . . . . . . . . . . 48
7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 48
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 48
8.1. Normative References . . . . . . . . . . . . . . . . . . 48
8.2. Informative References . . . . . . . . . . . . . . . . . 49
Clemm, et al. Expires August 12, 2017 [Page 2]
Internet-Draft YANG-Push February 2017
Appendix A. Technologies to be considered for future iterations 50
A.1. Proxy YANG Subscription when the Subscriber and Receiver
are different . . . . . . . . . . . . . . . . . . . . . . 50
A.2. OpState and Filters . . . . . . . . . . . . . . . . . . . 50
A.3. Splitting push updates . . . . . . . . . . . . . . . . . 51
A.4. Potential Subscription Parameters . . . . . . . . . . . . 51
Appendix B. Issues that are currently being worked and resolved 52
Appendix C. Changes between revisions . . . . . . . . . . . . . 52
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 53
1. Introduction
YANG [RFC7950] was originally designed for the Netconf protocol
[RFC6241] which focused on configuration data. However, YANG can be
used to model both configuration and operational data. It is
therefore reasonable to expect YANG datastores will increasingly be
used to support applications that care about about both.
For example, service assurance applications will need to be aware of
any remote updates to configuration and operational objects. Rapid
awareness of object changes will enable such things as validating and
maintaining cross-network integrity and consistency, or monitoring
state and key performance indicators of remote devices.
Traditional approaches to remote visibility have been built on
polling. With polling, data is periodically explicitly retrieved by
a client from a server to stay up-to-date. However, there are issues
associated with polling-based management:
o It introduces additional load on network, devices, and
applications. Each polling cycle requires a separate yet arguably
redundant request that results in an interrupt, requires parsing,
consumes bandwidth.
o It lacks robustness. Polling cycles may be missed, requests may
be delayed or get lost, often particularly in cases when the
network is under stress and hence exactly when the need for the
data is the greatest.
o Data may be difficult to calibrate and compare. Polling requests
may undergo slight fluctuations, resulting in intervals of
different lengths which makes data hard to compare. Likewise,
pollers may have difficulty issuing requests that reach all
devices at the same time, resulting in offset polling intervals
which again make data hard to compare.
A more effective alternative to polling is when an application can
request to be automatically updated on current relevant content of a
Clemm, et al. Expires August 12, 2017 [Page 3]
Internet-Draft YANG-Push February 2017
datastore. If such a request is accepted, interesting updates will
subsequently be pushed from that datastore.
Dependence on polling-based management is typically considered an
important shortcoming of applications that rely on MIBs polled using
SNMP [RFC1157]. However, without a provision to support a push-based
alternative, there is no reason to believe that management
applications that operate on YANG datastores will be any more
effective, as they would follow the same request/response pattern.
While YANG allows the definition of push notifications, such
notifications generally indicate the occurrence of certain well-
specified event conditions, such as the onset of an alarm condition
or the occurrence of an error. A capability to subscribe to and
deliver such pre-defined event notifications has been defined in
[RFC5277]. In addition, configuration change notifications have been
defined in [RFC6470]. These change notifications pertain only to
configuration information, not to operational state, and convey the
root of the subtree to which changes were applied along with the
edits, but not the modified data nodes and their values.
Furthermore, while delivery of updates using notifications is a
viable option, some applications desire the ability to stream updates
using other transports.
Accordingly, there is a need for a service that allows applications
to dynamically subscribe to updates of a YANG datastore and that
allows the publisher to push those updates, possibly using one of
several delivery mechanisms. Additionally, support for subscriptions
configured directly on the publisher are also useful when dynamic
signaling is undesirable or unsupported. The requirements for such a
service are documented in [RFC7923].
This document proposes a solution. The solution builds on top of the
NETCONF WG's Subscribed Notifications draft [I-D:netconf-sub-notif].
At its core, the solution defined here suppliments that work by
introducing datastore push update mechanisms, and providing
corresponding extensions to the event subscription model. The
document also includes YANG data model augmentations which extend the
model and RPCs defined within [I-D:netconf-sub-notif].
Key capabilities worth highlighting include:
o Additions to event subscription mechanisms which allow clients to
subscribe to datastore updates. The subscription allows clients
to specify which data they are interested in, what types of
updates (e.g. create, delete, modify), and to provide filter
criteria that data must meet for updates to be sent. Furthermore,
subscriptions can specify a policy that directs when updates are
Clemm, et al. Expires August 12, 2017 [Page 4]
Internet-Draft YANG-Push February 2017
provided. For example, a client may request to be updated
periodically in certain intervals, or whenever data changes occur.
o Format and contents of the YANG push updates themselves.
o The ability for a publisher to push back on requested subscription
parameters. Because not every publisher may support every
requested update policy for every piece of data, it is necessary
for a publisher to be able to indicate whether or not it is
capable of supporting a requested subscription, and possibly allow
to hints at subscription parameters which might have succeeded.
o Subscription parameters which allow the specification of QoS
extensions to address prioritization between independent streams
of updates.
2. Definitions and Acronyms
Many of the terms in this document are defined in
[I-D:netconf-sub-notif]. Please see that document for these
definitions.
Data node: An instance of management information in a YANG datastore.
Data node update: A data item containing the current value/property
of a Data node at the time the data node update was created.
Data record: A record containing a set of one or more data node
instances and their associated values.
Datastore: A conceptual store of instantiated management information,
with individual data items represented by data nodes which are
arranged in hierarchical manner.
Datastream: A continuous stream of data records, each including a set
of updates, i.e. data node instances and their associated values.
Data subtree: An instantiated data node and the data nodes that are
hierarchically contained within it.
Push-update stream: A conceptual data stream of a datastore that
streams the entire datastore contents continuously and perpetually.
Update: A data item containing the current value of a data node.
Update notification: An Event Notification including those data node
update(s) to be pushed in order to meet the obligations of a single
Clemm, et al. Expires August 12, 2017 [Page 5]
Internet-Draft YANG-Push February 2017
Subscription. All included data node updates must reflect the state
of a Datastore at a snapshot in time.
Update record: A representation of a data node update as a data
record. An update record can be included as part of an update
stream. It can also be logged for retrieval. In general, an update
record will include the value/property of a data node. It may also
include information about the type of data node update, i.e. whether
the data node was modified/updated, or newly created, or deleted.
Update trigger: A mechanism, as specified by a Subscription Policy,
that determines when a data node update is to be communicated. (e.g.,
a change trigger, invoked when the value of a data node changes or a
data node is created or deleted, or a time trigger, invoked after the
laps of a periodic time interval.)
YANG object filter: A filter that contains evaluation criteria which
are evaluated against YANG objects of a subscription. An update is
only published if the object meets the specified filter criteria.
YANG-Push: The subscription and push mechanism for YANG datastores
that is specified in this document.
3. Solution Overview
This document specifies a solution for a push update subscription
service. This solution supports the dynamic as well as configured
subscriptions to information updates from YANG datastores. A
subscription might target exposed operational and/or configuration
YANG objects on a device. YANG objects are subsequently pushed from
the publisher to the receiver per the terms of the subscription.
3.1. Subscription Model
YANG-push subscriptions are defined using a data model that is itself
defined in YANG. This model augments the event subscription model
defined in [I-D:netconf-sub-notif] and introduces new capabilities
that allow subscribers to specify what to include in an update
notification and what triggers such an update notification.
o Enhancements to filters. Specifically the filter must at least
identify at least one targeted yang data node/subtree. The filter
may also define additional yang nodes/subtrees to include or
exclude. The publisher must only send to the receiver those data
node updates that can traverse applied filter. Filters can be
specified "inline" as part of the subscription, or can be
configured separately and referenced by a subscription in order to
facilitate reuse of complex filters.
Clemm, et al. Expires August 12, 2017 [Page 6]
Internet-Draft YANG-Push February 2017
o A subscription policy definition regarding the update trigger when
to send new update notifications.
* For periodic subscriptions, the trigger is defined by two
parameters that defines the interval with which updates are to
be pushed. These parameters are the period/interval of
reporting duration, and an anchor time which can be used to
calculate at which times updates needs to be assembled and
sent.
* For on-change subscriptions, the trigger occurs whenever a
change in the subscribed information is detected. On-change
subscriptions have more complex semantics that can be guided by
additional parameters. Please refer also to Section 3.3.
+ One parameter specifiing the dampening period. This period
is the interval which must pass before a successive update
notification for the same Subscription is sent. Note that
the dampening period applies to the set of all data nodes
within a single subscription. This means that on the first
change of an object, an update notification containing that
object is sent either immediately or at the end of a
dampening period already in effect.
+ Another parameter allowing the restriction of the types of
changes for which updates are sent (changes to object
values, object creation or deletion events).
+ A third parameter specifing whether or not a complete push-
update with all the subscribed data should be sent at the
beginning of a subscription. Such a push provides the
receiver the current state, and establish the frame of
reference for subsequent updates.
o Anydata encoding for the contents of periodic and on-change push
updates.
The subscription data model is described via augmentations to
[I-D:netconf-sub-notif] later in this specification. It is
conceivable that additional subscription parameters might be
interesting. Augmentations to the subscription data model may be
used for this.
3.2. Negotiation of Subscription Policies
Dynamic subscriptions must support a simple negotiation between
subscribers and publishers for subscription parameters. This
negotiation is limited to a single pair of subscription request and
Clemm, et al. Expires August 12, 2017 [Page 7]
Internet-Draft YANG-Push February 2017
response messages. For negative response messages, the publisher
SHOULD include in the returned error what subscription parameters
would have been accepted for the request. The returned acceptable
parameters constitute suggestions that, when followed, increase the
likelihood of success for subsequent requests. However, there are no
guarantee that subsequent requests for this subscriber will in fact
be accepted.
A subscription request might be declined based on publisher's
assessment that it may be unable to provide a filtered update
notification stream that would meet the terms of the establish-
subscription request.
In case a subscriber requests an encoding other than XML, and this
encoding is not supported by the publisher, the publisher simply
indicates in the response that the encoding is not supported.
A subscription negotiation capability has been introduced as part of
the NETCONF Event Notifications model. However, the ability to
negotiate subscriptions is of particular importance in conjunction
with push updates, as publisher implementations may have limitations
with regards to what updates can be generated and at what velocity.
3.3. On-Change Considerations
On-change subscriptions allow subscribers to subscribe to updates
whenever changes to objects occur. As such, on-change subscriptions
are of particular interest for data that changes relatively
infrequently, yet that require applications to be notified with
minimal delay when changes do occur.
On-change subscriptions tend to be more difficult to implement than
periodic subscriptions. Specifically, on-change subscriptions may
involve a notion of state to see if a change occurred between past
and current state, or the ability to tap into changes as they occur
in the underlying system. Accordingly, on-change subscriptions may
not be supported by all implementations or for every object.
When an on-change subscription is requested for a datastream with a
given subtree filter, where not all objects support on-change update
triggers, the subscription request MUST be rejected. As a result,
on-change subscription requests will tend to be directed at very
specific, targeted subtrees with only few objects.
Any updates for an on-change subscription will include only objects
for which a change was detected. To avoid flooding receivers with
repeated updates for fast-changing objects, or objects with
oscillating values, an on-change subscription allows for the
Clemm, et al. Expires August 12, 2017 [Page 8]
Internet-Draft YANG-Push February 2017
definition of a dampening period. Once an update for a given object
is sent, no other updates for this particular object are sent until
the end of the dampening period. Values sent at the end of the
dampening period are the values current when that dampening period
expires. In addition, updates include information about objects that
were deleted and ones that were newly created.
On-change subscriptions can be refined to let users subscribe only to
certain types of changes, for example, only to object creations and
deletions, but not to modifications of object values.
Additional refinements are conceivable. For example, in order to
avoid sending updates on objects whose values undergo only a
negligible change, additional parameters might be added to an on-
change subscription specifying a YANG object filter that states how
large or "significant" a change has to be before an update is sent.
A simple policy is a "delta-policy" that states, for integer-valued
data nodes, the minimum difference between the current value and the
value that was last reported that triggers an update. Also more
sophisticated policies are conceivable, such as policies specified in
percentage terms or policies that take into account the rate of
change. While not specified as part of this draft, such policies can
be accommodated by augmenting the subscription data model
accordingly.
3.4. Data Encodings
Subscribed data is encoded in either XML or JSON format. A publisher
MUST support XML encoding and MAY support JSON encoding.
It is conceivable that additional encodings may be supported as
options in the future. This can be accomplished by augmenting the
subscription data model with additional identity statements used to
refer to requested encodings.
3.4.1. Periodic Subscriptions
In a periodic subscription, the data included as part of an update
corresponds to data that could have been simply retrieved using a get
operation and is encoded in the same way. XML encoding rules for
data nodes are defined in [RFC7950]. JSON encoding rules are defined
in [RFC7951]. This encoding is valid JSON, but also has special
encoding rules to identify module namespaces and provide consistent
type processing of YANG data.
Clemm, et al. Expires August 12, 2017 [Page 9]
Internet-Draft YANG-Push February 2017
3.4.2. On-Change Subscriptions
In an on-change subscription, updates need to indicate not only
values of changed data nodes but also the types of changes that
occurred since the last update, such as whether data nodes were newly
created since the last update or whether they were merely modified,
as well as which data nodes were deleted.
Encoding rules for data in on-change updates correspond to how data
would be encoded in a YANG-patch operation as specified in
[I-D.ietf-netconf-yang-patch]. The "YANG-patch" would in this case
be applied to the earlier state reported by the preceding update, to
result in the now-current state of YANG data. Of course, contrary to
a YANG-patch operation, the data is sent from the publisher to the
receiver and is not restricted to configuration data.
3.5. YANG object filters
Subscriptions can specify filters for subscribed data. The following
filters are supported:
o subtree-filter: A subtree filter specifies a subtree that the
subscription refers to. When specified, updates will only concern
data nodes from this subtree. Syntax and semantics correspond to
that specified for [RFC6241] section 6.
o xpath-filter: An XPath filter specifies an XPath expression
applied to the data in an update, assuming XML-encoded data.
Only a single filter can be applied to a subscription at a time.
It is conceivable for implementations to support other filters. For
example, an on-change filter might specify that changes in values
should be sent only when the magnitude of the change since previous
updates exceeds a certain threshold. It is possible to augment the
subscription data model with additional filter types.
3.6. Push Data Stream and Transport Mapping
Pushing data based on a subscription could be considered analogous to
a response to a data retrieval request, e.g. a "get" request.
However, contrary to such a request, multiple responses to the same
request may get sent over a longer period of time.
An applicable mechanism is that of a notification. There are however
some specifics that need to be considered. Contrary to other
notifications that are associated with alarms and unexpected event
Clemm, et al. Expires August 12, 2017 [Page 10]
Internet-Draft YANG-Push February 2017
occurrences, update notifications are solicited, i.e. tied to a
particular subscription which triggered the notification.
A push update notification contains several parameters:
o A subscription correlator, referencing the name of the
subscription on whose behalf the notification is sent.
o Data nodes containing a representation of the datastore subtree(s)
containing the updates. In all cases, the subtree(s) are filtered
per access control rules to contain only data that the subscriber
is authorized to see. For on-change subscriptions, the subtree
may only contain the data nodes which have changed since the start
of the previous dampening interval.
This document introduces two generic notifications: "push-update" and
"push-change-update". Those notifications may be encapsulated on a
transport (e.g. NETCONF or HTTP) to carry data records with updates
of datastore contents as specified by a subscription. It is possible
also map notifications to other transports and encodings and use the
same subscription model; however, the definition of such mappings is
outside the scope of this document.
A push-update notification defines a complete update of the datastore
per the terms of a subscription. This type of notification is used
for continuous updates of periodic subscriptions. A push-update
notification can also used be for the on-change subscriptions in two
cases. First it will be used as the initial push-update if there is
a need to synchronize the receiver at the start of a new
subscription. It also may be sent if the publisher later chooses to
resynch a previously synched on-change subscription. The push-update
record contains a data snippet that contains an instantiated subtree
with the subscribed contents. The content of the update notification
is equivalent to the contents that would be obtained had the same
data been explicitly retrieved using e.g. a Netconf "get"-operation,
with the same filters applied.
The contents of the push-update notification conceptually represents
the union of all data nodes in the yang modules supported by the
publisher. However, in a YANG data model, it is not practical to
model the precise data contained in the updates as part of the
notification. To capture this data, a single parameter that can
encapsulate the full set of subscribed datastore contents is used,
not parameters that represent data nodes one at a time.
A push-change-update notification is the most common type of update
for on-change subscriptions. The update record in this case contains
a data snippet that indicates the full set of changes that data nodes
Clemm, et al. Expires August 12, 2017 [Page 11]
Internet-Draft YANG-Push February 2017
have undergone since the last notification of YANG objects. In other
words, this indicates which data nodes have been created, deleted, or
have had changes to their values. The format of the data snippet
follows YANG-patch [I-D.ietf-netconf-yang-patch], i.e. the same
format that would be used with a YANG-patch operation to apply
changes to a data tree, indicating the creates, deletes, and
modifications of data nodes. Please note that as the update can
include a mix of configuration and operational data
The following is an example of push notification. It contains an
update for subscription 1011, including a subtree with root foo that
contains a leaf, bar:
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2015-03-09T19:14:56Z</eventTime>
<push-update
xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push:1.0">
<subscription-id>1011</subscription-id>
<time-of-update>2015-03-09T19:14:56.233Z</time-of-update>
<datastore-contents-xml>
<foo>
<bar>some_string</bar>
</foo>
</datastore-contents-xml>
</push-update>
</notification>
Figure 1: Push example
The following is an example of an on-change notification. It
contains an update for subscription 89, including a new value for a
leaf called beta, which is a child of a top-level container called
alpha:
Clemm, et al. Expires August 12, 2017 [Page 12]
Internet-Draft YANG-Push February 2017
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2015-03-09T19:14:56Z</eventTime>
<push-change-update xmlns=
"urn:ietf:params:xml:ns:yang:ietf-yang-push:1.0">
<subscription-id>89</subscription-id>
<time-of-update>2015-03-09T19:14:56.233Z</time-of-update>
<datastore-changes-xml>
<alpha xmlns="http://example.com/sample-data/1.0" >
<beta>1500</beta>
</alpha>
</datastore-changes-xml>
</push-change-update>
</notification>
Figure 2: Push example for on change
The equivalent update when requesting json encoding:
Clemm, et al. Expires August 12, 2017 [Page 13]
Internet-Draft YANG-Push February 2017
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2015-03-09T19:14:56Z</eventTime>
<push-change-update xmlns=
"urn:ietf:params:xml:ns:yang:ietf-yang-push:1.0">
<subscription-id>89</subscription-id>
<time-of-update>2015-03-09T19:14:56.233Z</time-of-update>
<datastore-changes-json>
{
"ietf-yang-patch:yang-patch": {
"patch-id": [
null
],
"edit": [
{
"edit-id": "edit1",
"operation": "merge",
"target": "/alpha/beta",
"value": {
"beta": 1500
}
}
]
}
}
</datastore-changes-json>
</push-change-update>
</notification>
Figure 3: Push example for on change with JSON
When the beta leaf is deleted, the publisher may send
Clemm, et al. Expires August 12, 2017 [Page 14]
Internet-Draft YANG-Push February 2017
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2015-03-09T19:14:56Z</eventTime>
<push-change-update xmlns=
"urn:ietf:params:xml:ns:yang:ietf-yang-push:1.0">
<subscription-id>89</subscription-id>
<time-of-update>2015-03-09T19:14:56.233Z</time-of-update>
<datastore-changes-xml>
<alpha xmlns="http://example.com/sample-data/1.0" >
<beta urn:ietf:params:xml:ns:netconf:base:1.0:
operation="delete"/>
</alpha>
</datastore-changes-xml>
</push-change-update>
</notification>
Figure 4: 2nd push example for on change update
3.7. Subscription management
A [I-D:netconf-sub-notif] subscription needs enhancment to support
YANG Push subscription negotiation. Specifically, these enhancements
are needed to signal to the subscriber why an attempt has failed.
A subscription can be rejected for multiple reasons, including the
lack of authorization to establish a subscription, the lack of read
authorization on the requested data node, or the inability of the
publisher to provide a stream with the requested semantics. In such
cases, no subscription is established. Instead, the subscription-
result with the failure reason is returned as part of the RPC
response. In addition, a set of alternative subscription parameters
MAY be returned that would likely have resulted in acceptance of the
subscription request, which the subscriber may try for a future
subscription attempt.
It should be noted that a rejected subscription does not result in
the generation of an rpc-reply with an rpc-error element, as neither
the specification of YANG-push specific errors nor the specification
of additional data parameters to be returned in an error case are
supported as part of a YANG data model.
For instance, for the following request:
Clemm, et al. Expires August 12, 2017 [Page 15]
Internet-Draft YANG-Push February 2017
<netconf:rpc message-id="101"
xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
<establish-subscription
xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push:1.0">
<stream>push-update</stream>
<filter netconf:type="xpath"
xmlns:ex="http://example.com/sample-data/1.0"
select="/ex:foo"/>
<period>500</period>
<encoding>encode-xml</encoding>
</establish-subscription>
</netconf:rpc>
Figure 5: Establish-Subscription example
the publisher might return:
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<subscription-result
xmlns="http://urn:ietf:params:xml:ns:yang:ietf-yang-push:1.0">
error-insufficient-resources
</subscription-result>
<period>2000</period>
</rpc-reply>
Figure 6: Error response example
3.8. Other considerations
3.8.1. Authorization
A receiver of subscription data may only be sent updates for which
they have proper authorization. Data that is being pushed therefore
needs to be subjected to a filter that applies all corresponding
rules applicable at the time of a specific pushed update, silently
removing any non-authorized data from subtrees.
The authorization model for data in YANG datastores is described in
the Netconf Access Control Model [RFC6536]. However, some
clarifications to that RFC are needed so that the desired access
control behavior is applied to pushed updates.
One of these clarifications is that a subscription may only be
established if the receiver has read access to every data node
specifically named within the subscription filter.
Clemm, et al. Expires August 12, 2017 [Page 16]
Internet-Draft YANG-Push February 2017
+-------------+ +-------------+
subscription | protocol | | target |
request --> | operation | -------------> | data node |
| allowed? | datastore | access |
+-------------+ or state | allowed? |
data access +-------------+
Figure 7: Access control for subscription
Likewise if a receiver no longer has read access permission to a data
node named/targeted within a filter, the subscription must be
abnormally terminated (with loss of access permission as the reason
provided).
Another clarification to [RFC6536] is that each of the individual
nodes in a pushed update must also go through access control
filtering. This includes new nodes added since the last update
notification, as well as existing nodes. For each of these read
access must be verified. The methods of doing this efficiently are
left to implementation.
+-------------+ +-------------------+
subscription | data node | yes | |
update --> | access | ---> | add data node |
| allowed? | | to update message |
+-------------+ +-------------------+
Figure 8: Access control for push updates
If there are read access control changes applied under the data node
named/targeted within a filter, no notifications indicating the fact
that this has occurred should be provided.
3.8.2. Robustness and reliability considerations
Particularly in the case of on-change push updates, it is important
that push updates do not get lost.
Update notifications will typically traverse a secure and reliable
transport. Notifications will not be reordered, and will also
contain a time stamp. Despite these protections for on-change, it is
possible that complete update notifications get lost. For this
reason, update sequence numbers for push-change-updates may be
included in a subscription so that an application can determine if an
update has been lost.
Clemm, et al. Expires August 12, 2017 [Page 17]
Internet-Draft YANG-Push February 2017
At the same time, it is conceivable that under certain circumstances,
a publisher will recognize that it is unable to include within an
update notification the full set of objects desired per the terms of
a subscription. In this case, the publisher must take one or more of
the following actions.
o A publisher must set the updates-not-sent flag on any update
notification which is known to be missing information.
o It may choose to suspend and resume a subscription as per
[I-D:netconf-sub-notif].
o When resuming an on-change subscription, the publisher should
generate a complete patch from the previous update notification.
If this is not possible and the synch-on-start option is
configured, then the full datastore contents may be sent instead
(effectively replacing the previous contents). If neither of
these are possible, then an updates-not-sent flag must be included
on the next push-change-update.
3.8.3. Update size and fragmentation considerations
Depending on the subscription, the volume of updates can become quite
large. Additionally, based on the platform, it is possible that
push-updates for a single subscription are best sent independently
from different line-cards. Therefore, it may not always be practical
to send the entire update in a single chunk. Implementations of
push-update MAY therefore choose, at their discretion, to "chunk"
updates and break them out into several push-update notifications.
In this case the updates-not-sent flag will indicate that no single
push-update is complete. Push-change-updates may also be chunked as
long as none of the changed objects in the separate pushes are state-
entangled.
3.8.4. Implementation considerations
Implementation specifics are outside the scope of this specification.
That said,it should be noted that monitoring of operational state
changes inside a system can be associated with significant
implementation challenges.