-
Notifications
You must be signed in to change notification settings - Fork 0
/
draft-ietf-netconf-yang-push-03.txt
3080 lines (2263 loc) · 114 KB
/
draft-ietf-netconf-yang-push-03.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
Network Working Group A. Clemm
Internet-Draft A. Gonzalez Prieto
Intended status: Standards Track E. Voit
Expires: December 16, 2016 A. Tripathy
E. Nilsen-Nygaard
Cisco Systems
June 14, 2016
Subscribing to YANG datastore push updates
draft-ietf-netconf-yang-push-03.txt
Abstract
DISCLAIMER: WHILE THIS DOCUMENT HAS BEEN FORMATTED TO APPEAR AS AN
INTERNET DRAFT, THIS VERSION CONSTITUTES WORK-IN-PROGRESS AND HAS NOT
BEEN SUBMITTED TO THE IETF INTERNET DRAFT REPOSITORY.
This document defines a subscription and push mechanism for YANG
datastores. This mechanism allows client applications to request
updates from a YANG datastore, which are then pushed by the server to
a receiver per a subscription policy, without requiring additional
client 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 December 16, 2016.
Copyright Notice
Copyright (c) 2016 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
Clemm, et al. Expires December 16, 2016 [Page 1]
Internet-Draft YANG-Push June 2016
(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 . . . . . . . . . . . . . . . . . . 6
3. Solution Overview . . . . . . . . . . . . . . . . . . . . . . 7
3.1. Subscription Model . . . . . . . . . . . . . . . . . . . 8
3.2. Negotiation of Subscription Policies . . . . . . . . . . 10
3.3. On-Change Considerations . . . . . . . . . . . . . . . . 11
3.4. Data Encodings . . . . . . . . . . . . . . . . . . . . . 12
3.4.1. Periodic Subscriptions . . . . . . . . . . . . . . . 12
3.4.2. On-Change Subscriptions . . . . . . . . . . . . . . . 13
3.5. Subscription Filters . . . . . . . . . . . . . . . . . . 13
3.6. Push Data Stream and Transport Mapping . . . . . . . . . 14
3.7. Subscription management . . . . . . . . . . . . . . . . . 18
3.7.1. Subscription management by RPC . . . . . . . . . . . 18
3.7.2. Subscription management by configuration . . . . . . 20
3.8. Other considerations . . . . . . . . . . . . . . . . . . 20
3.8.1. Authorization . . . . . . . . . . . . . . . . . . . . 20
3.8.2. Additional subscription primitives . . . . . . . . . 21
3.8.3. Robustness and reliability considerations . . . . . . 22
3.8.4. Update size and fragmentation considerations . . . . 22
3.8.5. Push data streams . . . . . . . . . . . . . . . . . . 22
3.8.6. Implementation considerations . . . . . . . . . . . . 23
3.8.7. Alignment with RFC 5277bis . . . . . . . . . . . . . 24
4. A YANG data model for management of datastore push
subscriptions . . . . . . . . . . . . . . . . . . . . . . . . 24
4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2. Update streams . . . . . . . . . . . . . . . . . . . . . 28
Clemm, et al. Expires December 16, 2016 [Page 2]
Internet-Draft YANG-Push June 2016
4.3. Filters . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.4. Subscription configuration . . . . . . . . . . . . . . . 29
4.5. Subscription monitoring . . . . . . . . . . . . . . . . . 31
4.6. Notifications . . . . . . . . . . . . . . . . . . . . . . 31
4.7. RPCs . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.7.1. Establish-subscription RPC . . . . . . . . . . . . . 32
4.7.2. Modify-subscription RPC . . . . . . . . . . . . . . . 34
4.7.3. Delete-subscription RPC . . . . . . . . . . . . . . . 36
5. YANG module . . . . . . . . . . . . . . . . . . . . . . . . . 36
6. Security Considerations . . . . . . . . . . . . . . . . . . . 50
7. Issues that are currently being worked and resolved . . . . . 51
7.1. Unresolved issues under discussion . . . . . . . . . . . 51
7.2. Agreement in principal . . . . . . . . . . . . . . . . . 52
7.3. Closed Issues . . . . . . . . . . . . . . . . . . . . . . 52
8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 52
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 53
9.1. Normative References . . . . . . . . . . . . . . . . . . 53
9.2. Informative References . . . . . . . . . . . . . . . . . 53
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 54
1. Introduction
YANG [RFC6020] was originally designed for the Netconf protocol
[RFC6241], which originally put most emphasis on configuration.
However, YANG is not restricted to configuration data. YANG
datastores, i.e. datastores that contain data modeled according using
YANG, can contain configuration as well as operational data. It is
therefore reasonable to expect that data in YANG datastores will
increasingly be used to support applications that are not focused on
managing configurations but that are, for example, related to service
assurance.
Service assurance applications typically involve monitoring
operational state of networks and devices; of particular interest are
changes that this data undergoes over time. Likewise, there are
applications in which data and objects from one datastore need to be
made available both to applications in other systems and to remote
datastores [I-D.voit-netmod-yang-mount-requirements]
[I-D.clemm-netmod-mount]. This requires mechanisms that allow remote
systems to become quickly aware of any updates to allow to validate
and maintain cross-network integrity and consistency.
Traditional approaches to remote network state visibility rely
heavily on polling. With polling, data is periodically explicitly
retrieved by a client from a server to stay up-to-date.
There are various issues associated with polling-based management:
Clemm, et al. Expires December 16, 2016 [Page 3]
Internet-Draft YANG-Push June 2016
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 is when an application can request to be
automatically updated as necessary of current content of the
datastore (such as a subtree, or data in a subtree that meets a
certain filter condition), and in which the server that maintains the
datastore subsequently pushes those updates. However, such a
solution does not currently exist.
The need to perform polling-based management is typically considered
an important shortcoming of management 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 using
protocols such as NETCONF or Restconf [I-D.ietf-netconf-restconf]
will be any more effective, as they would follow the same request/
response pattern.
While YANG allows the definition of notifications, such notifications
are generally intended to indicate the occurrence of certain well-
specified event conditions, such as a the onset of an alarm condition
or the occurrence of an error. A capability to subscribe to and
deliver 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.
Clemm, et al. Expires December 16, 2016 [Page 4]
Internet-Draft YANG-Push June 2016
Accordingly, there is a need for a service that allows client
applications to dynamically subscribe to updates of a YANG datastore
and that allows the server to push those updates, possibly using one
of several delivery mechanisms. Additionally, support for
subscriptions configured directly on the server are also useful when
dynamic signaling is undesirable or unsupported. The requirements
for such a service are documented in [I-D.i2rs-pub-sub-requirements].
This document proposes a solution. The solution builds on top of the
Netconf Event Model [I-D.gonzalez-netconf-5277bis] which defines a
mechanism for the management of event subscriptions. At its core,
the solution that is defined here introduces a new set of event
streams including datastore push updates that clients can subscribe
to, as well as extensions to the event subscription model that allow
to manage policies that define what and when updates are trigged. To
this end, the document specifies a YANG data model that augments the
YANG data model (and RPCs) defined as part of the NETCONF Event
Model.
Specifically, the solution features the following capabilities:
o An extension to event subscription mechanisms allows clients to
subscribe to event streams containing automatic 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 optional filters with criteria that data
must meet for updates to be sent. Furthermore, subscriptions can
specify a policy that directs when updates are provided. For
example, a client may request to be updated periodically in
certain intervals, or whenever data changes occur.
o The ability for a server to push back on requested subscription
parameters. Because not every server may support every requested
update policy for every piece of data, it is necessary for a
server to be able to indicate whether or not it is capable of
supporting a requested subscription, and possibly allow to
negotiate push update subscription parameters. For example, some
servers may have a lower limit to the period with which they can
send updates, or they may not support on-change updates for every
piece of data.
o A mechanism to communicate the updates themselves. For this, the
proposal leverages and extends existing YANG/Netconf/Restconf
mechanisms, defining special notifications that carry updates. In
addition, optional subscription parameters allow to specify which
transport should be used to stream updates, and to define QoS
extensions that allow to address aspects such as how to prioritize
between streams of updates.
Clemm, et al. Expires December 16, 2016 [Page 5]
Internet-Draft YANG-Push June 2016
2. Definitions and Acronyms
Data node: An instance of management information in a YANG datastore.
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.
Dynamic subscription: A subscription negotiated between subscriber
and publisher vian establish, modify, and delete RPCs respectively
control plane signaling messages that are part of an existing
management association between and publisher. Subscriber and
receiver are the same system.
NACM: NETCONF Access Control Model
NETCONF: Network Configuration Protocol
Publisher: A server that sends push updates to a receiver according
to the terms of a subscription. In general, the publisher is also
the "owner" of the subscription.
Push-update stream: A conceptual data stream of a datastore that
streams the entire datastore contents continuously and perpetually.
Receiver: The target of push updates of a subscription. In case of a
dynamic subscription, receiver and subscriber are the same system.
However, in the case of a configured subscription, the receiver may
be a different system than the one that configured the subscription.
RPC: Remote Procedure Call
SNMP: Simple Network Management Protocol
Configured subscription: A subscription installed as part of a
configuration datastore via a configuration interface.
Subscriber: A client that negotiates a subscription with a server
("publisher"). A client that establishes a configured subscription
Clemm, et al. Expires December 16, 2016 [Page 6]
Internet-Draft YANG-Push June 2016
is also considered a subscriber, even if it is not necessarily the
receiver of a subscription.
Subscription: A contract between a client ("subscriber") and a server
("publisher"), stipulating which information the client wishes to
receive from the server (and which information the server has to
provide to the client) without the need for further solicitation.
Subscription 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.
Subscription policy: A policy that specifies under what circumstances
to push an update, e.g. whether updates are to be provided
periodically or only whenever changes occur.
Update: A data item containing the current value of a data node.
Update trigger: A trigger, as specified by a subscription policy,
that causes an update to be sent, respectively a data record to be
generated. An example of a trigger is 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.
URI: Uniform Resource Identifier
YANG: A data definition language for NETCONF
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, which supports the dynamic as well as static (via
configuration) creation of subscriptions to information updates of
operational or configuration YANG data which are subsequently pushed
from the server to the client.
Dynamic subscriptions are initiated by clients who want to receive
push updates. Servers respond to requests for the creation of
subscriptions positively or negatively. Negative responses MAY
include information about why the subscription was not accepted, in
order to facilitate converging on an acceptable set of subscription
parameters. Similarly, configured subscriptions are configured as
part of a device's configuration. Once a subscription has been
Clemm, et al. Expires December 16, 2016 [Page 7]
Internet-Draft YANG-Push June 2016
established, datastore push updates are pushed from the server to the
receiver until the subscription ends.
Accordingly, the solution encompasses several components:
o The subscription model for configuration and management of the
subscriptions.
o The ability to provide hints for acceptable subscription
parameters, in cases where a subscription desired by a client
cannot currently be served.
o The stream of push updates.
In addition, there are a number of additional considerations, such as
the tie-in of the mechanisms with security mechanisms. Each of those
aspects will be discussed in the following subsections.
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.gonzalez-netconf-5277bis] and introduces several new
parameters, for example parameters that allow subscribers to specify
what to include in an update, what triggers an update, and how to
deliver updates.
The subscription model assumes the presence of one or more conceptual
perpetual datastreams of continuous updates that can be subscribed
to. There are several datastreams with predefined semantics, such as
the stream of updates of all operational data or the stream of
updates of all config data. In addition, it is possible to define
custom streams with customizable semantics. The model includes the
list of update datastreams that are supported by a system and
available for subscription.
The subscription model augments the NETCONF event subscription model
with a set of parameters as follows:
o An encoding for push updates. By default, updates are encoded
using XML, but JSON can be requested as an option and other
encodings may be supported in the future.
o An optional start time for the subscription. If the specified
start time is in the past, the subscription goes into effect
immediately. The start time also serves as anchor time for
periodic subscriptions, from which intervals at which to send
updates are calculated (see also below).
Clemm, et al. Expires December 16, 2016 [Page 8]
Internet-Draft YANG-Push June 2016
o An optional stop time for the subscription. Once the stop time is
reached, the subscription is automatically terminated.
o A subscription policy definition regarding the update trigger when
to send new updates. The trigger can be periodic or based on
change.
* For periodic subscriptions, the trigger is defined by a
parameter that defines the interval with which updates are to
be pushed. The start time of the subscription serves as anchor
time, defining one specific point in time at which an update
needs to be sent. Update intervals always fall on the points
in time that are a multiple of a period after the start time.
* EDITOR'S NOTE: A possible option to discuss concerns the
introduction of an additional parameter "changes-only" for
periodic subscription. Including this flag would results in
sending at the end of each period an update containing only
changes since the last update (i.e. a change-update as in the
case of an on-change subscription), not a full snapshot of the
subscribed information. Such an option might be interesting in
case of data that is largely static and bandwidth-constrained
environments.
* 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 specifies the dampening period, i.e. the
interval that must pass before a successive update for the
same data node is sent. The first time a change is
detected, the update is sent immediately. If a subsequent
change is detected, another update for that object is only
sent once the dampening period has passed, containing the
value of the data node that is then valid. Note that the
dampening period applies to each object, not the set of all
objects that are part of the same subscription. This means
that on the first change of an object, an update for that
object is immediately sent, regardless of whether or not for
another object of the same subscription a dampening period
is already in effect.
+ Another parameter allows to restrict the types of changes
for which updates are sent (changes to object values, object
creation or deletion events). It is conceivable to augment
the data model with additional parameters in the future to
specify even more refined policies, such as parameters that
Clemm, et al. Expires December 16, 2016 [Page 9]
Internet-Draft YANG-Push June 2016
specify the magnitude of a change that must occur before an
update is triggered.
+ A third parameter specifies whether or not a complete update
with all the subscribed data should be sent at the beginning
of a subscription to facilitate synchronization and
establish the frame of reference for subsequent updates.
+ EDITOR'S NOTE: Several semantic variations are conceivable.
In one variation, an on-change notification is sent
immediately, but successive dampening updates are sent at
fixed period intervals, grouping all changes of objects for
which changes have occurred since the sending of their last
update and the current dampening period.
o Optionally, a filter, or set of filters, describing the subset of
data items in the stream's data records that are of interest to
the subscriber. The server should only send to the subscriber the
data items that match the filter(s), when present. The absence of
a filter indicates that all data items from the stream are of
interest to the subscriber and all data records must be sent in
their entirety to the subscriber. The following types of filters
are introduced: subtree filters, with the same semantics as
defined in [RFC 6241],and XPath filters. In addition, as with any
subscription, an RFC 5277 filter MAY be used, with the same
semantics as defined in [RFC 5277]. Additional filter types can
be added through augmentations. 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.
The subscription data model is specified as part of the YANG data
model described later in this specification. Specifically, the
subscription parameters are defined in the "subscription-info" and
"update-policy" groupings. Receiver information is defined in the
"receiver-info" grouping. Information about the source address is
defined in the "push-source-info" grouping. It is conceivable that
additional subscription parameters might be added in the future.
This can be accomplished through augmentation of the subscription
data model.
3.2. Negotiation of Subscription Policies
A subscription rejection can be caused by the inability of the server
to provide a stream with the requested semantics. For example, a
server may not be able to support "on-change" updates for operational
data, or only support them for a limited set of data nodes.
Clemm, et al. Expires December 16, 2016 [Page 10]
Internet-Draft YANG-Push June 2016
Likewise, a server may not be able to support a requested update
frequency.
YANG-Push supports a simple negotiation between clients and servers
for subscription parameters. The negotiation is limited to a single
pair of subscription request and response. For negative responses,
the server 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,
they are no guarantee that subsequent requests for this client or
others will in fact be accepted.
In case a subscriber requests an encoding other than XML, and this
encoding is not supported by the server, the server simply indicates
in the response that the encoding is not supported.
A subscription negotiation capability has been introduced as part of
the NETCON Event Notifications model. However, the ability to
negotiate subscriptions is of particular importance in conjunction
with push updates, as server 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 clients 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 clients with
repeated updates for fast-changing objects, or objects with
oscillating values, an on-change subscription allows for the
Clemm, et al. Expires December 16, 2016 [Page 11]
Internet-Draft YANG-Push June 2016
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 policy 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 server
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 [RFC6020]. JSON encoding rules are defined
in [I-D.ietf-netmod-yang-json]. 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 December 16, 2016 [Page 12]
Internet-Draft YANG-Push June 2016
3.4.2. On-Change Subscriptions
In an on-change subscription, updates need to allow to differentiate
between data nodes that were newly created since the last update,
data nodes that were deleted, and data nodes whose value changed.
XML encoding rules correspond to how data would be encoded in input
to Netconf edit-config operations as specified in [RFC6241] section
7.2, adding "operation" attributes to elements in the data subtree.
Specifically, the following values will be utilized:
o create: The data identified by the element has been added since
the last update.
o delete: The data identified by the element has been deleted since
the last update.
o merge: The data identified by the element has been changed since
the last update.
o replace: The data identified by the element has been replaced with
the update contents since the last update.
The remove value will not be utilized.
Contrary to edit-config operations, the data is sent from the server
to the client, not from the client to the server, and will not be
restricted to configuration data.
JSON encoding rules are roughly analogous to how data would be
encoded in input to a YANG-patch operation, as specified in
[I-D.ietf-netconf-yang-patch] section 2.2. However, no edit-ids will
be needed. Specifically, changes will be grouped under respective
"operation" containers for creations, deletions, and modifications.
3.5. Subscription Filters
Subscriptions can specify filters for subscribed data. The following
filters are supported in addition to RFC 5277 filters that apply to
any event subscription:
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.
Clemm, et al. Expires December 16, 2016 [Page 13]
Internet-Draft YANG-Push June 2016
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.
A more suitable mechanism to consider is therefore 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 occurrences, push updates are solicited,
i.e. tied to a particular subscription which triggered the
notification, and arguably only of interest to the subscriber,
respectively the intended receiver of the subscription. A
subscription therefore needs to be able to distinguish between
streams that underlie push updates and streams of other
notifications. By the same token, notifications associated with
updates and subscriptions to updates need to be distinguished from
other notifications, in that they enter a datastream of push updates,
not a stream of other event notifications.
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 A data node that contains a representation of the datastore
subtree containing the updates. The subtree is filtered per
access control rules to contain only data that the subscriber is
authorized to see. Also, depending on the subscription type,
i.e., specifically for on-change subscriptions, the subtree
contains only the data nodes that contain actual changes. (This
can be simply a node of type string or, for XML-based encoding,
anyxml.)
Notifications are sent using <notification> elements as defined in
[RFC5277]. Alternative transports are conceivable but outside the
scope of this specification.
Clemm, et al. Expires December 16, 2016 [Page 14]
Internet-Draft YANG-Push June 2016
The solution specified in this document uses notifications to define
datastore updates. The contents of the notification includes a set
of explicitly defined data nodes. For this purpose, two new generic
notifications are introduced, "push-update" and "push-change-update".
Those notifications define how mechanisms that carry YANG
notifications (e.g. Netconf notifications and Restconf) can be used
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.
Push-update notification defines updates for a periodic subscription,
as well as for the initial update of an on-change subscription used
to synchronize the receiver at the start of a new subscription. The
update record contains a data snippet that contains an instantiated
subtree with the subscribed contents. The content of the update
record 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 notification conceptually represents the union of
all data nodes in the yang modules supported by the server. However,
in a YANG data model, it is not practical to model the precise data
contained in the updates as part of the notification. This is
because the specific data nodes supported depend on the implementing
system and may even vary dynamically. Therefore, to capture this
data, a single parameter that can represent any datastore contents is
used, not parameters that represent data nodes one at a time.
Push-change-update notification defines updates for on-change
subscriptions. The update record here contains a data snippet that
indicates the changes that data nodes have undergone, i.e. that
indicates which data nodes have been created, deleted, or had changes
to their values. The format follows the same format that operations
that apply changes to a data tree would apply, indicating the
creates, deletes, and modifications of data nodes.
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:
Clemm, et al. Expires December 16, 2016 [Page 15]
Internet-Draft YANG-Push June 2016
<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:56Z</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:
<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:56Z</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 December 16, 2016 [Page 16]
Internet-Draft YANG-Push June 2016
<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:56Z</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 server may send
Clemm, et al. Expires December 16, 2016 [Page 17]
Internet-Draft YANG-Push June 2016
<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:56Z</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
There are two ways in which subscriptions can be managed, as
specified in the NETCONF Event Notifications model: RPC-based and
configuration based. Any given subscription is either RPC-based or
configuration-based. There is no mixing-and-matching of RPC and
configuration operations. Specifically, a configured subscription
cannot be modified or deleted using RPC. Likewise, a subscription
established via RPC cannot be modified or deleted through
configuration operations.
The following sections describe how subscription management is
applied to YANG Push subscriptions.
3.7.1. Subscription management by RPC
RPC-based subscription allows a subscriber to establish a
subscription via an RPC call. The subscriber and the receiver are
the same entity, i.e. a subscriber cannot subscribe or in other ways
interfere with a subscription on another receiver's behalf. The
lifecycle of the subscription is dependent on the lifecyle of the
transport session over which the subscription was requested. For
example, when a Netconf session over which a subscription was
established is torn down, the subscription is automatically
terminated (and needs to be re-initiated when a new session is
established). Alternatively, a subscriber can also decide to delete