-
Notifications
You must be signed in to change notification settings - Fork 0
/
ietf-nrp-policy.yang
465 lines (428 loc) · 12.5 KB
/
ietf-nrp-policy.yang
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
module ietf-nrp-policy {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-nrp-policy";
prefix nrp-pol;
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-routing-types {
prefix rt-types;
reference
"RFC 8294: Common YANG Data Types for the Routing Area";
}
import ietf-network {
prefix nw;
reference
"RFC 8345: A YANG Data Model for Network Topologies";
}
import ietf-access-control-list {
prefix acl;
reference
"RFC 8519: YANG Data Model for Network Access Control Lists
(ACLs)";
}
import ietf-topology-filter {
prefix topo-filt;
reference
"draft-bestbar-teas-yang-topology-filter: YANG Data Model
for Topology Filter";
}
organization
"IETF Traffic Engineering Architecture and Signaling (TEAS)
Working Group.";
contact
"WG Web: <http://tools.ietf.org/wg/teas/>
WG List: <mailto:teas@ietf.org>
Editor: Vishnu Pavan Beeram
<mailto:vbeeram@juniper.net>
Editor: Tarek Saad
<mailto:tsaad@juniper.net>
Editor: Bin Wen
<mailto:Bin_Wen@cable.comcast.com>
Editor: Daniele Ceccarelli
<mailto:daniele.ceccarelli@ericsson.com>
Editor: Shaofu Peng
<mailto:peng.shaofu@zte.com.cn>
Editor: Ran Chen
<mailto:chen.ran@zte.com.cn>
Editor: Luis M. Contreras
<mailto:luismiguel.contrerasmurillo@telefonica.com>
Editor: Xufeng Liu
<mailto:xufeng.liu.ietf@gmail.com>";
description
"This YANG module defines a data model for managing Network
Resource Partition Policies on Network Resource Partition
capable nodes and controllers.
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 Simplified 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.";
revision 2022-03-07 {
description
"Initial revision.";
reference
"RFC XXXX: YANG Data Model for Network Resource Partition
Policies.";
}
/*
* I D E N T I T I E S
*/
/*
* Identity:
* MPLS Flow Aggregate Selector (FAS) Label Position Type.
*/
identity fas-mpls-label-position-type {
description
"Base identity for the position of the MPLS FAS label.";
}
identity fas-mpls-label-position-top {
base fas-mpls-label-position-type;
description
"MPLS FAS label is at the top of the label stack.";
}
identity fas-mpls-label-position-bottom {
base fas-mpls-label-position-type;
description
"MPLS FAS label is either at the bottom or at a specific
offset from the bottom of the label stack.";
}
identity fas-mpls-label-position-indicator {
base fas-mpls-label-position-type;
description
"MPLS FAS is preceded by a special purpose
indicator label in the label stack.";
}
/*
* T Y P E D E F S
*/
typedef nrp-policy-acl-ref {
type leafref {
path "/acl:acls/acl:acl/acl:name";
}
description
"This type is used to reference an ACL.";
}
typedef nrp-policy-topo-filter-ref {
type leafref {
path "/nw:networks/topo-filt:topology-filters/"
+ "topo-filt:topology-filter/topo-filt:name";
}
description
"This type is used to reference a Topology Filter.";
}
/*
* G R O U P I N G S
*/
/*
* Grouping - MPLS FAS label location specific fields
*/
grouping nrp-pol-fas-mpls-label-location {
description
"Grouping for MPLS FAS label location specific fields.";
leaf label-position {
type identityref {
base fas-mpls-label-position-type;
}
description
"MPLS FAS label position.";
}
leaf label-position-offset {
when "derived-from-or-self(../label-position,"
+ "'nrp-pol:fas-mpls-label-position-bottom')" {
description
"MPLS label position offset is relevant only when the
label-position is set to 'bottom'.";
}
type uint8;
description
"MPLS label position offset.";
}
}
/*
* Grouping - Flow-Aggregate Selector (FAS)
*/
grouping nrp-pol-flow-agg-selector {
description
"Grouping for Flow-Aggregate Selector (FAS).";
container flow-agg-selector {
description
"Container for FAS.";
container mpls {
description
"Container for MPLS FAS.";
choice fas-type {
description
"Choices for MPLS FAS.";
case label {
choice specification-type {
description
"Choices for MPLS label specification.";
case derived {
leaf forwarding-label {
type empty;
description
"MPLS FAS Label is derived from
forwarding label.";
}
}
case explicit {
leaf label {
type rt-types:mpls-label;
description
"MPLS FAS Label is explicitly
specified.";
}
uses nrp-pol-fas-mpls-label-location;
}
}
}
case label-ranges {
list label-range {
key "index";
unique "start-label end-label";
description
"Any label from the specified set of MPLS label
ranges can be used as the FAS.";
leaf index {
type string;
description
"A string that uniquely identifies a label
range.";
}
leaf start-label {
type rt-types:mpls-label;
must '. <= ../end-label' {
error-message
"The start-label must be less than or equal "
+ "to end-label";
}
description
"Label-range start.";
}
leaf end-label {
type rt-types:mpls-label;
must '. >= ../start-label' {
error-message
"The end-label must be greater than or equal "
+ "to start-label";
}
description
"Label-range end.";
}
uses nrp-pol-fas-mpls-label-location;
}
}
}
}
container ipv4 {
description
"Container for IPv4 FAS.";
leaf-list destination-prefix {
type inet:ipv4-prefix;
description
"Any prefix from the specified set of IPv4
destination prefixes can be the FAS.";
}
}
container ipv6 {
description
"Container for IPv6 FAS.";
choice fas-type {
description
"Choices for IPv6 FAS.";
case ipv6-destination {
leaf-list destination-prefix {
type inet:ipv6-prefix;
description
"Any prefix from the specified set of IPv6
destination prefixes can be the FAS.";
}
}
case ipv6-hbh-eh {
leaf-list fas-hbh-eh {
type uint32;
description
"Set of FAS values carried in Hop-by-Hop
Option of IPv6 extension header.";
}
}
}
}
leaf-list acl-ref {
type nrp-policy-acl-ref;
description
"Flow Aggregate selection is done based on the
specified list of ACLs.";
}
}
}
/*
* Grouping - NRP Policy Resource Reservation
*/
grouping nrp-pol-resource-reservation {
description
"Grouping for NRP policy resource reservation.";
container resource-reservation {
description
"Container for NRP policy resource reservation.";
leaf preference {
type uint16;
description
"Control plane preference for the corresponding
Network Resource Partition (NRP). A higher
preference indicates a more favorable resource
reservation than a lower preference.";
}
choice max-bw-type {
description
"Choice of maximum bandwidth specification.";
case bw-value {
leaf maximum-bandwidth {
type uint64;
description
"The maximum bandwidth allocated to an NRP
- specified as absolute value.";
}
}
case bw-percentage {
leaf maximum-bandwidth-percent {
type rt-types:percentage;
description
"The maximum bandwidth allocated to an NRP
- specified as percentage of link
capacity.";
}
}
}
leaf-list shared-resource-groups {
type uint32;
description
"List of shared resource groups that an NRP
shares its allocated resources with.";
}
container protection {
description
"Container for NRP protection reservation.";
leaf backup-nrp-id {
type uint32;
description
"The ID that identifies the NRP used for
backup paths that protect primary paths
setup over a specific NRP.";
}
choice backup-bw-type {
description
"Choice of backup bandwidth specification.";
case backup-bw-value {
leaf backup-bandwidth {
type uint64;
description
"The maximum bandwidth on a network resource that
is allocated for backup traffic - specified as
absolute value.";
}
}
case backup-bw-percentage {
leaf backup-bandwidth-percent {
type rt-types:percentage;
description
"The maximum bandwidth on a network resource that
is allocated for backup traffic - specified as
percentage of the link capacity.";
}
}
}
}
}
}
/*
* Grouping - NRP policy - PHB (NRP-PHB)
*/
grouping nrp-pol-phb {
description
"Grouping for NRP-PHB.";
leaf phb {
type string;
description
"PHB profile identifier.";
}
}
/*
* Grouping - NRP Policy - Topology
*/
grouping nrp-pol-topology {
description
"Grouping for NRP topology.";
container topology {
description
"Container for NRP topology.";
container filters {
description
"Container for filters.";
list filter {
key "filter-ref";
description
"List of filters.";
leaf filter-ref {
type nrp-policy-topo-filter-ref;
description
"Reference to a specific topology filter from the
list of global topology filters.";
}
uses nrp-pol-resource-reservation;
uses nrp-pol-flow-agg-selector;
uses nrp-pol-phb;
}
}
}
}
/*
* Grouping - Network Resource Partition Policies
*/
grouping nrp-pol {
description
"Grouping for NRP policies.";
container nrp-policies {
description
"Container for nrp policies.";
list nrp-policy {
key "name";
unique "nrp-id";
description
"List of NRP policies.";
leaf name {
type string;
description
"A string that uniquely identifies the NRP policy.";
}
leaf nrp-id {
type uint32;
description
"A 32-bit ID that uniquely identifies the NRP
created by the enforcement of this NRP policy.";
}
uses nrp-pol-resource-reservation;
uses nrp-pol-flow-agg-selector;
uses nrp-pol-phb;
uses nrp-pol-topology;
}
}
}
/*
* Augment - Network Resource Partition Policies.
*/
augment "/nw:networks" {
description
"Augment networks with network resource partition
policies.";
uses nrp-pol;
}
}