File tree 6 files changed +83
-26
lines changed
tests/yang_model_tests/tests_config
6 files changed +83
-26
lines changed Original file line number Diff line number Diff line change 13
13
{
14
14
"dscp" :" 2" ,
15
15
"tc" :" 2"
16
+ },
17
+ {
18
+ "dscp" :" 8" ,
19
+ "tc" :" 8"
16
20
}
17
21
]
18
22
},
26
30
{
27
31
"dscp" :" 2" ,
28
32
"tc" :" 2"
33
+ },
34
+ {
35
+ "dscp" :" 8" ,
36
+ "tc" :" 8"
29
37
}
30
38
]
31
39
}
65
73
"DSCP_TO_TC_MAP" : [
66
74
{
67
75
"dscp" : " 1" ,
68
- "tc" : " 8 "
76
+ "tc" : " 16 "
69
77
},
70
78
{
71
79
"dscp" :" 2" ,
92
100
{
93
101
"dot1p" :" 2" ,
94
102
"tc" :" 2"
103
+ },
104
+ {
105
+ "dot1p" :" 3" ,
106
+ "tc" :" 8"
95
107
}
96
108
]
97
109
},
105
117
{
106
118
"dot1p" :" 2" ,
107
119
"tc" :" 2"
120
+ },
121
+ {
122
+ "dot1p" :" 3" ,
123
+ "tc" :" 8"
108
124
}
109
125
]
110
126
}
144
160
"DOT1P_TO_TC_MAP" : [
145
161
{
146
162
"dot1p" : " 1" ,
147
- "tc" : " 8 "
163
+ "tc" : " 16 "
148
164
},
149
165
{
150
166
"dot1p" :" 2" ,
171
187
{
172
188
"tc" :" 2" ,
173
189
"qindex" :" 2"
190
+ },
191
+ {
192
+ "tc" :" 8" ,
193
+ "qindex" :" 3"
174
194
}
175
195
]
176
196
},
184
204
{
185
205
"tc" :" 2" ,
186
206
"qindex" :" 2"
207
+ },
208
+ {
209
+ "tc" :" 8" ,
210
+ "qindex" :" 3"
187
211
}
188
212
]
189
213
}
250
274
{
251
275
"tc" :" 2" ,
252
276
"pg" :" 2"
277
+ },
278
+ {
279
+ "tc" :" 8" ,
280
+ "pg" :" 3"
253
281
}
254
282
]
255
283
},
263
291
{
264
292
"tc" :" 2" ,
265
293
"pg" :" 2"
294
+ },
295
+ {
296
+ "tc" :" 8" ,
297
+ "pg" :" 3"
266
298
}
267
299
]
268
300
}
487
519
{
488
520
"dscp" :" 2" ,
489
521
"tc" :" 2"
522
+ },
523
+ {
524
+ "dscp" :" 8" ,
525
+ "tc" :" 8"
490
526
}
491
527
]
492
528
}
507
543
{
508
544
"dot1p" :" 2" ,
509
545
"tc" :" 2"
546
+ },
547
+ {
548
+ "dot1p" :" 3" ,
549
+ "tc" :" 8"
510
550
}
511
551
]
512
552
}
527
567
{
528
568
"tc" :" 2" ,
529
569
"qindex" :" 2"
570
+ },
571
+ {
572
+ "tc" :" 8" ,
573
+ "qindex" :" 3"
530
574
}
531
575
]
532
576
}
546
590
{
547
591
"tc" :" 2" ,
548
592
"pg" :" 2"
593
+ },
594
+ {
595
+ "tc" :" 8" ,
596
+ "pg" :" 3"
549
597
}
550
598
]
551
599
}
643
691
{
644
692
"dscp" :" 2" ,
645
693
"tc" :" 2"
694
+ },
695
+ {
696
+ "dscp" :" 8" ,
697
+ "tc" :" 8"
646
698
}
647
699
]
648
700
}
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ module sonic-dot1p-tc-map {
6
6
7
7
prefix dot1ptm;
8
8
9
+ import sonic-types {
10
+ prefix stypes;
11
+ }
12
+
9
13
organization
10
14
"SONiC" ;
11
15
@@ -54,12 +58,7 @@ module sonic-dot1p-tc-map {
54
58
}
55
59
56
60
leaf tc {
57
- type string {
58
- pattern "[0-7]?" {
59
- error-message "Invalid Traffic Class" ;
60
- error-app-tag tc-invalid;
61
- }
62
- }
61
+ type stypes:tc_type;
63
62
}
64
63
}
65
64
}
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ module sonic-dscp-tc-map {
6
6
7
7
prefix dtm;
8
8
9
+ import sonic-types {
10
+ prefix stypes;
11
+ }
12
+
9
13
organization
10
14
"SONiC" ;
11
15
@@ -54,12 +58,7 @@ module sonic-dscp-tc-map {
54
58
}
55
59
56
60
leaf tc {
57
- type string {
58
- pattern "[0-7]?" {
59
- error-message "Invalid Traffic Class" ;
60
- error-app-tag tc-invalid;
61
- }
62
- }
61
+ type stypes:tc_type;
63
62
}
64
63
}
65
64
}
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ module sonic-tc-priority-group-map {
6
6
7
7
prefix tpgm;
8
8
9
+ import sonic-types {
10
+ prefix stypes;
11
+ }
12
+
9
13
organization
10
14
"SONiC" ;
11
15
@@ -45,12 +49,7 @@ module sonic-tc-priority-group-map {
45
49
key "tc" ;
46
50
47
51
leaf tc {
48
- type string {
49
- pattern "[0-7]?" {
50
- error-message "Invalid Traffic Class" ;
51
- error-app-tag tc-invalid;
52
- }
53
- }
52
+ type stypes:tc_type;
54
53
}
55
54
56
55
leaf pg {
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ module sonic-tc-queue-map {
6
6
7
7
prefix tqm;
8
8
9
+ import sonic-types {
10
+ prefix stypes;
11
+ }
12
+
9
13
organization
10
14
"SONiC" ;
11
15
@@ -45,12 +49,7 @@ module sonic-tc-queue-map {
45
49
key "tc" ;
46
50
47
51
leaf tc {
48
- type string {
49
- pattern "[0-7]?" {
50
- error-message "Invalid Traffic Class" ;
51
- error-app-tag tc-invalid;
52
- }
53
- }
52
+ type stypes:tc_type;
54
53
}
55
54
56
55
leaf qindex {
Original file line number Diff line number Diff line change @@ -270,6 +270,15 @@ module sonic-types {
270
270
"VXLAN Network Identifier";
271
271
}
272
272
273
+ typedef tc_type {
274
+ type uint8 {
275
+ range "0..15" {
276
+ error-message "Invalid Traffic Class";
277
+ error-app-tag tc-invalid;
278
+ }
279
+ }
280
+ }
281
+
273
282
{% if yang_model_type == "cvl" %}
274
283
/* Required for CVL */
275
284
container operation {
You can’t perform that action at this time.
0 commit comments