-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdraft-tgraf-netconf-yang-notifications-versioning-00.txt
728 lines (478 loc) · 23.4 KB
/
draft-tgraf-netconf-yang-notifications-versioning-00.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
Network Working Group T. Graf
Internet-Draft Swisscom
Intended status: Standards Track B. Claise
Expires: 23 April 2023 Huawei
A. Huang Feng
INSA-Lyon
20 October 2022
Support of Versioning in YANG Notifications Subscription
draft-tgraf-netconf-yang-notifications-versioning-00
Abstract
This document extends the YANG notifications subscription mechanism
to specify the YANG module semantic version at the subscription.
Then, a new extension with new metadata of the YANG push update
notification header is proposed.
Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
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 https://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 23 April 2023.
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Graf, et al. Expires 23 April 2023 [Page 1]
Internet-Draft YANG Notifications Versioning October 2022
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://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 Revised BSD License text as
described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Revised BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Extend the Datastore Selection . . . . . . . . . . . . . . . 3
3. Extend the Metadata in Streaming Update . . . . . . . . . . . 4
4. The "ietf-yang-push-metadata" Module . . . . . . . . . . . . 6
4.1. Data Model Overview . . . . . . . . . . . . . . . . . . . 6
4.2. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 7
5. Security Considerations . . . . . . . . . . . . . . . . . . . 10
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11
8.1. Normative References . . . . . . . . . . . . . . . . . . 11
8.2. Informative References . . . . . . . . . . . . . . . . . 12
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13
1. Introduction
In order to process the received YANG push notification messages
described in section 3.7 of [RFC8641] at the YANG push receiver, a
semantic reference to the YANG module and the XPath or subtree is
needed to determine the data types for each field and which part of
the YANG module the metrics are expose from.
This specification applies to the YANG push configured subscriptions
defined in Section 2.5 of [RFC8639], where a publisher is configured
to stream notification out of band, as opposed to dynamic
subscriptions defined in Section 2.4 of [RFC8641], where the
subscriber can initiate and modify the subscription dynamically in-
band. In the latter case, the subscriber knows already all the
subscriber YANG-related information, which it has to know in order to
configure the subscription.
Graf, et al. Expires 23 April 2023 [Page 2]
Internet-Draft YANG Notifications Versioning October 2022
This semantic reference is available during the subscription period
described in Section 3.6 of [RFC8641] where for each subscription a
locally unique subscription ID described in Section 4.3.2 of
[RFC8641] is being issued and streamed as metadata with the
notification message in the YANG push message header. This implies
that the YANG receiver needs to lookup the subscription inventory for
a subscription ID in each notification message to determine the YANG
module name, namespace, and filter definitions.
The semantics can change between different YANG module revisions.
The YANG module version statement is specified in Section 7.1.2 of
[RFC6020] and states that the newer revision needs to be backward
compatible to the previous revision. Section 3.1 of
[I-D.ietf-netmod-yang-module-versioning] specifies that newer
semantic versions introduced in [I-D.ietf-netmod-yang-semver] MAY not
be backward compatible to the previous version when indicated with
non-backwards-compatible keyword.
The YANG notifications subscription mechanism defined in [RFC8641]
does not allow to specify the YANG module revision. When a network
node is upgraded, the subscribed YANG module revision MAY have
updated and might, consequently, break the data processing pipeline
since the YANG push receiver may not be aware of this change.
This documents extends the current YANG notifications subscription
mechanism to allow to subscribe to a specific revision or latest
semantic version to which the YANG module version needs to be
backward compatible to and advertises its specific YANG module
revision inband. Besides the existing Subscription ID, the YANG
module name, namespace, revision and filtering metadata is added to
the YANG push notification header to lift the YANG push receiver need
to lookup the subscription inventory information.
2. Extend the Datastore Selection
The YANG notifications subscription OPTIONALLY can be restricted to
the following YANG module revision for future capabilities:
latest: Restricts the subscription to the latest YANG module
revision.
revision: Restricts the subscription to a specific YANG module
revision. Example 2014-05-08.
latest-compatible-semversion: Restricts the subscription to the
latest compatible YANG module semantic version referenced to.
Example 2.0.0.
Graf, et al. Expires 23 April 2023 [Page 3]
Internet-Draft YANG Notifications Versioning October 2022
If nothing is specified, latest YANG module version is implied.
3. Extend the Metadata in Streaming Update
Along with the subscribed content, besides the Subcription ID, the
following metadata objects are part of a "push-update" or "push-
change-update" notification.
module: Describes the YANG module name for the related streamed
content.
namespace: Describes the YANG module namespace as specified in
Section 7.1.3 of [RFC6020] for the related streamed content.
revision: Describes the YANG module revision as specified in
Section 7.1.2 of [RFC6020] for the related streamed content.
revision-label: Describes the YANG module semantic version as
specified in [I-D.ietf-netmod-yang-semver] for the related
streamed content.
datastore-xpath-filter: Describes the YANG module xpath filter as
specified in Section 6.4 of [RFC6020] for the related streamed
content.
datastore-subtree-filter: Describes the YANG module subtree filter
as specified in Section 6 of [RFC6241] for the related streamed
content.
Figure 1 provides an example of a notification message with the YANG
module name, revision, revision label and datastore-xpath-filter for
a subscription tracking the operational status of a single Ethernet
interface (per [RFC8343]). This notification message is encoded XML
[W3C.REC-xml-20081126] over the Network Configuration Protocol
(NETCONF) as per [RFC8640].
Graf, et al. Expires 23 April 2023 [Page 4]
Internet-Draft YANG Notifications Versioning October 2022
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2022-09-02T10:59:55.32Z</eventTime>
<push-update xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<id>101</id>
<module>ietf-interfaces</module>
<namespace>urn:ietf:params:xml:ns:yang:ietf-interfaces</namespace>
<revision>2014-05-08</revision>
<revision-label>1.0.0</revision-label>
<datastore-xpath-filter>ietf-interfaces:interfaces</datastore-xpath-filter>
<datastore-contents>
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>eth0</name>
<oper-status>up</oper-status>
</interface>
</interfaces>
</datastore-contents>
</push-update>
</notification>
Figure 1: XML Push Example for a Periodical Notification Message
Figure 2 provides an example of a JSON encoded, [RFC8259],
notification message over HTTPS-based [I-D.ietf-netconf-https-notif]
or UDP-based [I-D.ietf-netconf-udp-notif] transport for the same
subscription.
Graf, et al. Expires 23 April 2023 [Page 5]
Internet-Draft YANG Notifications Versioning October 2022
{
"ietf-notification:notification": {
"eventTime": "2022-09-02T10:59:55.32Z",
"ietf-yang-push:push-update": {
"id": 101,{
"module": "ietf-interfaces",{
"namespace": "urn:ietf:params:xml:ns:yang:ietf-interfaces",{
"revision": "2014-05-08",{
"revision-label": "1.0.0",{
"datastore-xpath-filter": "ietf-interfaces:interfaces",
"datastore-contents": {
"ietf-interfaces:interface": {
"name": {
"eth0": {
"oper-status": "up",
}
}
}
}
}
}
}
}
}
}
}
Figure 2: JSON Push Example for a Periodical Notification Message
4. The "ietf-yang-push-metadata" Module
4.1. Data Model Overview
This YANG module augments the "ietf-yang-push" module to add
subcription metadata into the "push-update" and "push-change-update"
notification and the ability to define the "revision" and "revision-
label" in the "establish-subscription" and "modify-subscription" in
the datastore push subscription.
Graf, et al. Expires 23 April 2023 [Page 6]
Internet-Draft YANG Notifications Versioning October 2022
module: ietf-yang-push-metadata
augment /yp:push-update:
+--ro module? string
+--ro namespace? string
+--ro revision? rev:revision-date-or-label
+--ro revision-label? ysver:version
+--ro datastore-xpath-filter? yang:xpath1.0 {sn:xpath}?
+--ro datastore-subtree-filter? <anydata> {sn:subtree}?
augment /yp:push-change-update:
+--ro module? string
+--ro namespace? string
+--ro revision? rev:revision-date-or-label
+--ro revision-label? ysver:version
+--ro datastore-xpath-filter? yang:xpath1.0 {sn:xpath}?
+--ro datastore-subtree-filter? <anydata> {sn:subtree}?
augment /sn:establish-subscription/sn:input/sn:target:
+-- revision? rev:revision-date-or-label
+-- revision-label? ysver:version
augment /sn:modify-subscription/sn:input/sn:target:
+-- revision? rev:revision-date-or-label
+-- revision-label? ysver:version
augment /sn:subscription-started/sn:target:
+-- revision? rev:revision-date-or-label
+-- revision-label? ysver:version
augment /sn:subscription-modified/sn:target:
+-- revision? rev:revision-date-or-label
+-- revision-label? ysver:version
augment /sn:subscriptions/sn:subscription/sn:target:
+--rw revision? rev:revision-date-or-label
+--rw revision-label? ysver:version
4.2. YANG Module
The YANG module has six leaves augmenting the model of YANG-push
[RFC8641].
<CODE BEGINS> file "ietf-yang-push-metadata@2022-10-10.yang"
module ietf-yang-push-metadata {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-yang-push-metadata";
prefix ypm;
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Data Types";
}
Graf, et al. Expires 23 April 2023 [Page 7]
Internet-Draft YANG Notifications Versioning October 2022
import ietf-subscribed-notifications {
prefix sn;
reference
"RFC 8639: Subscription to YANG Notifications";
}
import ietf-yang-push {
prefix yp;
reference
"RFC 8641: Subscription to YANG Notifications for Datastore Updates";
}
import ietf-yang-revisions {
prefix rev;
reference
"RFC XXXX: draft-ietf-netmod-yang-module-versioning-06, Updated YANG
Module Revision Handling";
}
import ietf-yang-semver {
prefix ysver;
reference
"RFC XXXX: draft-ietf-netmod-yang-semver-07, YANG Semantic Versioning";
}
organization "IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: <http:/tools.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org>
Authors: Thomas Graf
<mailto:thomas.graf@swisscom.com>
Benoit Claise
<mailto:benoit.claise@huawei.com>
Alex Huang Feng
<mailto:alex.huang-feng@insa-lyon.fr>";
description
"Defines YANG push event notification header with metadata.
Copyright (c) 2022 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, is permitted pursuant to, and subject to the license
terms contained in, the Revised BSD License set forth in Section
4.c of the IETF Trust's Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see the RFC
itself for full legal notices.";
Graf, et al. Expires 23 April 2023 [Page 8]
Internet-Draft YANG Notifications Versioning October 2022
revision 2022-09-21 {
description
"First revision";
reference
"RFC XXXX: Support of Versioning in YANG Notifications Subscription";
}
feature yang-push-metadata-supported {
description
"This feature indicates the YANG Notifications have the metadata
defined in this YANG module.";
}
grouping yang-push-module-version {
leaf revision {
type rev:revision-date-or-label;
description
"This references the YANG module revision of the sent notification.";
}
leaf revision-label {
type ysver:version;
description
"This references the YANG module semversion of the sent notification.";
}
}
grouping yang-push-metadata {
leaf module {
type string;
description
"This references the YANG module of the sent notification.";
}
leaf namespace {
type string;
description
"This references the YANG module namespace of the sent notification.";
}
uses ypm:yang-push-module-version;
leaf datastore-xpath-filter {
type yang:xpath1.0;
if-feature "sn:xpath";
description
"This references the YANG module xpath of the sent notification.";
}
anydata datastore-subtree-filter {
if-feature "sn:subtree";
Graf, et al. Expires 23 April 2023 [Page 9]
Internet-Draft YANG Notifications Versioning October 2022
description
"This references the YANG module subtree of the sent notification.";
}
}
// Event notifications
augment "/yp:push-update" {
description
"This augmentation adds the module, the namespace, the revision, the
semversion, the xpath and the subtree in the push-update notification";
uses ypm:yang-push-metadata;
}
augment "/yp:push-change-update" {
description
"This augmentation adds the module, the namespace, the revision, the
semversion, the xpath and the subtree in the push-change-update notification";
uses ypm:yang-push-metadata;
}
// Subscription parameters
augment "/sn:establish-subscription/sn:input/sn:target" {
uses ypm:yang-push-module-version;
}
augment "/sn:modify-subscription/sn:input/sn:target" {
uses ypm:yang-push-module-version;
}
// Subscription notifications
augment "/sn:subscription-started/sn:target" {
uses ypm:yang-push-module-version;
}
augment "/sn:subscription-modified/sn:target" {
uses ypm:yang-push-module-version;
}
// Subscription container
augment "/sn:subscriptions/sn:subscription/sn:target" {
uses ypm:yang-push-module-version;
}
}
<CODE ENDS>
5. Security Considerations
The security considerations for the YANG notifications subscription
mechanism are described in [RFC8641]. This documents adds no
additional security considerations.
Graf, et al. Expires 23 April 2023 [Page 10]
Internet-Draft YANG Notifications Versioning October 2022
6. IANA Considerations
This document has no IANA actions.
7. Acknowledgements
The authors would like to thank xxx for their review and valuable
comments.
8. References
8.1. Normative References
[I-D.ietf-netmod-yang-module-versioning]
Wilton, R., Rahman, R., Lengyel, B., Clarke, J., and J.
Sterne, "Updated YANG Module Revision Handling", Work in
Progress, Internet-Draft, draft-ietf-netmod-yang-module-
versioning-06, 10 July 2022,
<https://www.ietf.org/archive/id/draft-ietf-netmod-yang-
module-versioning-06.txt>.
[I-D.ietf-netmod-yang-semver]
Clarke, J., Wilton, R., Rahman, R., Lengyel, B., Sterne,
J., and B. Claise, "YANG Semantic Versioning", Work in
Progress, Internet-Draft, draft-ietf-netmod-yang-semver-
07, 10 July 2022, <https://www.ietf.org/archive/id/draft-
ietf-netmod-yang-semver-07.txt>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010,
<https://www.rfc-editor.org/info/rfc6020>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
Graf, et al. Expires 23 April 2023 [Page 11]
Internet-Draft YANG Notifications Versioning October 2022
[RFC8639] Voit, E., Clemm, A., Gonzalez Prieto, A., Nilsen-Nygaard,
E., and A. Tripathy, "Subscription to YANG Notifications",
RFC 8639, DOI 10.17487/RFC8639, September 2019,
<https://www.rfc-editor.org/info/rfc8639>.
[RFC8641] Clemm, A. and E. Voit, "Subscription to YANG Notifications
for Datastore Updates", RFC 8641, DOI 10.17487/RFC8641,
September 2019, <https://www.rfc-editor.org/info/rfc8641>.
8.2. Informative References
[I-D.ietf-netconf-https-notif]
Jethanandani, M. and K. Watsen, "An HTTPS-based Transport
for YANG Notifications", Work in Progress, Internet-Draft,
draft-ietf-netconf-https-notif-12, 22 August 2022,
<https://www.ietf.org/archive/id/draft-ietf-netconf-https-
notif-12.txt>.
[I-D.ietf-netconf-udp-notif]
Zheng, G., Zhou, T., Graf, T., Francois, P., Feng, A. H.,
and P. Lucente, "UDP-based Transport for Configured
Subscriptions", Work in Progress, Internet-Draft, draft-
ietf-netconf-udp-notif-08, 12 September 2022,
<https://www.ietf.org/archive/id/draft-ietf-netconf-udp-
notif-08.txt>.
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", STD 90, RFC 8259,
DOI 10.17487/RFC8259, December 2017,
<https://www.rfc-editor.org/info/rfc8259>.
[RFC8343] Bjorklund, M., "A YANG Data Model for Interface
Management", RFC 8343, DOI 10.17487/RFC8343, March 2018,
<https://www.rfc-editor.org/info/rfc8343>.
[RFC8640] Voit, E., Clemm, A., Gonzalez Prieto, A., Nilsen-Nygaard,
E., and A. Tripathy, "Dynamic Subscription to YANG Events
and Datastores over NETCONF", RFC 8640,
DOI 10.17487/RFC8640, September 2019,
<https://www.rfc-editor.org/info/rfc8640>.
[W3C.REC-xml-20081126]
Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and
F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth
Edition)", World Wide Web Consortium Recommendation REC-
xml-20081126, November 2008,
<https://www.w3.org/TR/2008/REC-xml-20081126>.
Graf, et al. Expires 23 April 2023 [Page 12]
Internet-Draft YANG Notifications Versioning October 2022
Authors' Addresses
Thomas Graf
Swisscom
Binzring 17
CH-8045 Zurich
Switzerland
Email: thomas.graf@swisscom.com
Benoit Claise
Huawei
Email: benoit.claise@huawei.com
Alex Huang Feng
INSA-Lyon
Lyon
France
Email: alex.huang-feng@insa-lyon.fr
Graf, et al. Expires 23 April 2023 [Page 13]