Commit 873c721 1 parent c4a339f commit 873c721 Copy full SHA for 873c721
File tree 7 files changed +18
-2043
lines changed
7 files changed +18
-2043
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 19
19
'EXP_TO_FC_MAP_LIST' ,
20
20
'CABLE_LENGTH_LIST' ,
21
21
'MPLS_TC_TO_TC_MAP_LIST' ,
22
- 'TC_TO_DSCP_MAP_LIST'
22
+ 'TC_TO_DSCP_MAP_LIST' ,
23
23
]
24
24
25
25
# Workaround for those fields who is defined as leaf-list in YANG model but have string value in config DB.
Original file line number Diff line number Diff line change 2365
2365
2366
2366
"STP" : {
2367
2367
"GLOBAL" : {
2368
+ "global-stp-mode" : " GLOBAL" ,
2368
2369
"mode" : " pvst" ,
2369
2370
"rootguard_timeout" : " 30" ,
2370
2371
"forward_delay" : " 15" ,
2438
2439
2439
2440
"STP_MST" : {
2440
2441
"GLOBAL" : {
2442
+ "global-stp-mode" : " GLOBAL" ,
2441
2443
"name" : " region1" ,
2442
2444
"revision" : " 0" ,
2443
2445
"max_hops" : " 20" ,
Original file line number Diff line number Diff line change @@ -263,12 +263,10 @@ def test_run_tests(self):
263
263
for test in self .tests :
264
264
test = test .strip ()
265
265
if test in self .ExceptionTests :
266
- ret = ret + self .runExceptionTest (test );
266
+ ret = ret + self .runExceptionTest (test )
267
267
elif test in self .SpecialTests :
268
- ret = ret + self .runSpecialTest (test );
268
+ ret = ret + self .runSpecialTest (test )
269
269
else :
270
- #log.error("Unexpected Test: {}".format(test))
271
- #ret = ret + 1
272
270
raise Exception ("Unexpected Test" )
273
271
except Exception as e :
274
272
ret = FAIL * len (self .tests )
Original file line number Diff line number Diff line change 22
22
"GLOBAL" : [
23
23
{
24
24
"global-stp-mode" : " GLOBAL" ,
25
- "mode" : " mst" ,
26
- "forward_delay" : 15 ,
27
- "hello_time" : 2 ,
28
- "max_age" : 20 ,
29
- "priority" : 32768
25
+ "mode" : " mst"
30
26
}
31
27
]
32
28
},
33
29
"sonic-spanning-tree:STP_MST" : {
34
- "MST_GLOBAL " : [
30
+ "GLOBAL " : [
35
31
{
36
32
"global-stp-mode" : " GLOBAL" ,
37
33
"name" : " region1" ,
38
34
"revision" : 0 ,
39
35
"max_hops" : 20 ,
40
- "hello_time" : 2 ,
41
36
"max_age" : 20 ,
37
+ "hello_time" : 2 ,
42
38
"forward_delay" : 15
43
39
}
44
40
]
Original file line number Diff line number Diff line change @@ -151,10 +151,7 @@ module sonic-spanning-tree {
151
151
}
152
152
units "seconds" ;
153
153
default 30 ;
154
- must "../mode != 'mst'" {
155
- error-message "Root guard timeout is not allowed in MST mode." ;
156
- error-app-tag stp-invalid;
157
- }
154
+ when "../mode = 'pvst'" ; // Only apply the default when mode is pvst
158
155
description
159
156
"Time before re-enabling a port in root-guard mode." ;
160
157
}
@@ -320,7 +317,7 @@ module sonic-spanning-tree {
320
317
description
321
318
"MST specific configuration container, maps to STP_MST_TABLE" ;
322
319
323
- list MST_GLOBAL {
320
+ list GLOBAL {
324
321
description
325
322
"List of MST global configurations" ;
326
323
max-elements 1 ;
@@ -375,30 +372,30 @@ module sonic-spanning-tree {
375
372
"MST Max hops" ;
376
373
}
377
374
378
- leaf hello_time {
375
+ leaf max_age {
379
376
type uint8 {
380
- range "1..10 " ;
377
+ range "6..40 " ;
381
378
}
382
- default 2 ;
379
+ default 20 ;
383
380
must "../../../STP/GLOBAL[global-stp-mode='GLOBAL']/mode='mst'" {
384
381
error-message "Configuration allowed in MST mode" ;
385
382
error-app-tag stp-invalid;
386
383
}
387
384
description
388
- "MST hello time in seconds" ;
385
+ "MST max age in seconds" ;
389
386
}
390
387
391
- leaf max_age {
388
+ leaf hello_time {
392
389
type uint8 {
393
- range "6..40 " ;
390
+ range "1..10 " ;
394
391
}
395
- default 20 ;
392
+ default 2 ;
396
393
must "../../../STP/GLOBAL[global-stp-mode='GLOBAL']/mode='mst'" {
397
394
error-message "Configuration allowed in MST mode" ;
398
395
error-app-tag stp-invalid;
399
396
}
400
397
description
401
- "MST max age in seconds" ;
398
+ "MST hello time in seconds" ;
402
399
}
403
400
404
401
leaf forward_delay {
You can’t perform that action at this time.
0 commit comments