-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathietf-py.yang
496 lines (466 loc) · 15.1 KB
/
ietf-py.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
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
module ietf-pw {
namespace "urn:ietf:params:xml:ns:yang:ietf-pw";
prefix "pw";
import ietf-inet-types {
prefix "inet";
}
import ietf-interfaces {
prefix "if";
}
organization "ietf";
contact "ietf";
description "pw";
revision "2017-05-05" {
description "02 revision.";
reference "draft-chen-pals-pw-yang-02.txt";
}
revision "2016-10-05" {
description "01 revision.";
reference "draft-chen-pals-pw-yang-01.txt";
}
revision "2016-03-30" {
description "Initial revision of pw model.";
reference "draft-chen-pals-pw-yang-00.txt";
}
/* typedefs */
typedef cw-capable-type {
type enumeration {
enum "non-preferred" {
description "No preference for control-word";
}
enum "preferred" {
description "Prefer to have control-word negotiation";
}
}
description "control-word capable preference type";
}
typedef cc-type {
type enumeration {
enum pw-ach {
description "PWE3 Control Word with 0001b as first nibble (PW-ACH, see [RFC4385])";
}
enum alert-label {
description "MPLS Router Alert Label";
}
enum ttl {
description "MPLS PW Label with TTL == 1";
}
}
description "The defined values for CC(Control Channel) Types for MPLS PWs.";
}
typedef cv-type {
type enumeration {
enum ICMP-ping {
description "ICMP-ping.";
}
enum LSP-ping {
description "LSP-ping";
}
enum BFD-basic-ip {
description "BFD basic ip";
}
enum BFD-basic-raw {
description "BFD basic raw ";
}
enum BFD-signalling-ip {
description "BFD signalling ip";
}
enum BFD-signalling-raw {
description "BFD signalling raw";
}
}
description "The defined values for CV(Connectivity Verification) Types for MPLS PWs";
}
typedef pw-type {
type enumeration {
enum unknown {
value 0 ;
description "The PW type is unknown";
}
enum dlciOld {
value 1 ;
description "The PW type is dlciOld";
}
enum atmSdu {
value 2 ;
description "The PW type is atmSdu";
}
enum atmCell {
value 3 ;
description "The PW type is atmCell";
}
enum vlan {
value 4 ;
description "The PW type is vlan";
}
enum ethernet {
value 5 ;
description "The PW type is ethernet";
}
enum hdlc {
value 6 ;
description "The PW type is hdlc";
}
enum ppp {
value 7 ;
description "The PW type is ppp";
}
enum sdhCESoM {
value 8 ;
description "The PW type is sdhCESoM";
}
enum atmVCCn {
value 9 ;
description "The PW type is atmVCCn";
}
enum atmVPCn {
value 10 ;
description "The PW type is atmVPCn";
}
enum ipL2 {
value 11 ;
description "The PW type is ipL2";
}
enum atmVCC1 {
value 12 ;
description "The PW type is atmVCC1";
}
enum atmVPC1 {
value 13 ;
description "The PW type is atmVPC1";
}
enum atmPDU {
value 14 ;
description "The PW type is atmPDU";
}
enum frPort {
value 15 ;
description "The PW type is frPort";
}
enum sdhCEoP {
value 16 ;
description "The PW type is sdhCEoP";
}
enum saTopE1 {
value 17 ;
description "The PW type is saTopE1";
}
enum saTopT1 {
value 18 ;
description "The PW type is saTopT1";
}
enum saTopE3 {
value 19 ;
description "The PW type is saTopE3";
}
enum saTopT3 {
value 20 ;
description "The PW type is saTopT3";
}
enum ceSoPSNB {
value 21 ;
description "The PW type is ceSoPSNB";
}
enum tdmAAL1 {
value 22 ;
description "The PW type is tdmAAL1";
}
enum ceSoPSNC {
value 23 ;
description "The PW type is ceSoPSNC";
}
enum tdmAAL2 {
value 24 ;
description "The PW type is tdmAAL2";
}
enum dlciNew {
value 25 ;
description "The PW type is dlciNew";
}
}
description "The PW type of the PW.";
}
typedef pw-rtp-flag {
type enumeration {
enum UNUSE {
value 0 ;
description 'Not use the rtp header.' ;
}
enum USE {
value 1 ;
description 'Use the rtp header.' ;
}
enum UNKNOWN {
value 3 ;
description 'The usage of the rtp header is unknown.' ;
}
}
description 'The use flag of rtp header.' ;
}
typedef pw-timestamp-mode {
type enumeration {
enum Absolute {
value 0 ;
description 'The timestamp mode is absolute.' ;
}
enum Differential {
value 1 ;
description 'The timestamp mode is differential .' ;
}
enum UNKNOWN {
value 3 ;
description 'The timestamp mode is unknown.' ;
}
}
description 'The timestamp mode of TDM service.' ;
}
container pwe3 {
description "configure pw";
container ss-pw {
description "configure ss-pw";
list ss-pw {
key "name";
leaf name {
type string;
description "ss-pseudowire name";
}
leaf peer-ip {
type inet:ip-address;
description "peer IP address";
}
leaf cw-capable {
type cw-capable-type;
default "preferred";
description "control-word negotiation preference";
}
leaf type {
type pw-type;
description "pseudo-wire type";
}
list tunnel {
key "tunnel-id";
leaf tunnel-id {
type string;
description "tunnel identifier";
}
description "tunnel list";
}
leaf leaf-type {
type pw-type;
description "pseudo-wire type";
}
leaf autodiscovery-enable{
type boolean;
description "enable the auto-discovery";
}
container interfaces {
description "Interfaces";
list interface{
key "name";
leaf name {
type if:interface-ref;
description "Interfaces used for pw";
}
leaf mtu {
type uint32;
description "pseudowire mtu";
}
leaf fcs-retention-indicator {
type uint16;
description "The negotiated fcs retention indicator of the PW";
}
container vccv-parameter {
description "vccv-parameter";
leaf cc {
type cc-type;
description "Control Channel Types";
}
leaf cv {
type cv-type;
description "Connectivity Verification Types";
}
}
leaf requested-vlan-id {
type uint32;
description "The local requested VLAN ID of the PW";
}
leaf frag-indicator {
type uint32;
description "The local fragmentation indicator of the PW";
}
leaf interface-description {
type string {
length 0..81;
}
description "The local interface description of the PW";
}
choice pw-emu-type {
description "The emulation type of the PW. It could be tdm, fr and atm. There are different interface parameters for different emulation types";
case tdm {
leaf bit-rate {
type uint32;
description "The local bit rate of the PW";
}
leaf payload-bytes {
type uint16;
description "The local payload bytes of the PW";
}
leaf cells-per-packet {
type uint16;
description "The local TDMoIP AAL1 cells per packet of the PW";
}
container tdm-options {
description "The TDM Options parameter of the PW";
leaf rtp {
type pw-rtp-flag;
description "The local rtp header usage";
}
leaf timestamp-mode {
type pw-timestamp-mode;
description "The local timestamp mode";
}
leaf frequency {
type uint16;
description "The local frequency of timestamping clock";
}
leaf ssrc {
type uint32;
description "The local value of the Synchronization source ID";
}
leaf payload-type {
type uint8;
description "The local payload type in the RTP header expected by the PW endpoint distributing this FEC";
}
leaf cas {
type uint8 ;
description "The local cas of the PW";
}
leaf sp {
type uint8 ;
description "The local sp of the PW";
}
}
container cep-option {
description "The CEP Options parameter of the PW";
leaf ais {
type uint8;
description "The local ais of CEP Options parameter of the PW";
}
leaf une {
type uint8;
description "The local une of CEP Options parameter of the PW";
}
leaf rtp {
type uint8;
description "The local rtp of CEP Options parameter of the PW";
}
leaf ebm {
type uint8;
description "The local ebm of CEP Options parameter of the PW";
}
leaf async-t3 {
type uint8;
description "The local async-t3 of CEP Options parameter of the PW";
}
leaf async-e3 {
type uint8;
description "The local async-e3 of CEP Options parameter of the PW";
}
leaf cep-type {
type uint16;
description "The local cep type of CEP Options parameter of the PW";
}
}
}
case fr {
description "The emulation type of the PW is fr";
leaf fr-dlci-len {
type uint16;
description "The local fr dlci length of the PW";
}
}
case atm {
description "The emulation type of the PW is atm";
leaf max-atm-cells {
type uint16;
description "The local max atm cells of the PW";
}
}
}
description "interface list";
}
}
choice pw-type {
description "A choice of pseudowire type";
case ldp-pw {
choice fec-type{
description "fec type";
case generalized-pwid-fec-type {
leaf agi {
type string;
description "Attachment Group Identifier";
}
leaf source-AII {
type string;
description "Source Attachment individual identifier";
}
leaf target-AII {
type string;
description "Target Attachment individual identifier";
}
}
case pwid-fec{
leaf pw-id {
type uint32;
description "pseudowire id";
}
}
}
}
case static-pw {
leaf static-pw-id {
type uint32;
description "pseudowire id";
}
leaf transmit-label {
type uint32;
description "transmit lable";
}
leaf receive-label {
type uint32;
description "receive label";
}
}
}
description "ss-pw list";
}
}
container ms-pw {
description "configure ms-pw";
list ms-pw {
key "name";
leaf name {
type string;
description "ms-pseudowire name";
}
list pw-segment-a{
key "name";
leaf name {
type string;
description "pseudowire segment a name";
}
description "pw segment-a list";
}
list pw-segment-z{
key "name";
leaf name {
type string;
description "pseudowire segment z name";
}
description "pw segment-z list";
}
description "ms-pw list";
}
}
}
}