| 1 |
--- |
| 2 |
ansible_connection: httpapi |
| 3 |
|
| 4 |
sonic_stp_tests: |
| 5 |
- name: test_case_01 |
| 6 |
description: Add STP configuration for mst protocol |
| 7 |
state: merged |
| 8 |
input: |
| 9 |
global: |
| 10 |
enabled_protocol: mst |
| 11 |
loop_guard: true |
| 12 |
bpdu_filter: true |
| 13 |
hello_time: 5 |
| 14 |
max_age: 10 |
| 15 |
fwd_delay: 15 |
| 16 |
bridge_priority: 4096 |
| 17 |
interfaces: |
| 18 |
- intf_name: '{{ interface1 }}' |
| 19 |
edge_port: true |
| 20 |
link_type: shared |
| 21 |
guard: loop |
| 22 |
bpdu_guard: true |
| 23 |
bpdu_filter: true |
| 24 |
uplink_fast: true |
| 25 |
shutdown: true |
| 26 |
cost: 20 |
| 27 |
port_priority: 30 |
| 28 |
stp_enable: true |
| 29 |
- intf_name: '{{ interface2 }}' |
| 30 |
edge_port: true |
| 31 |
link_type: point-to-point |
| 32 |
guard: root |
| 33 |
bpdu_guard: true |
| 34 |
bpdu_filter: true |
| 35 |
uplink_fast: true |
| 36 |
shutdown: true |
| 37 |
cost: 40 |
| 38 |
port_priority: 50 |
| 39 |
stp_enable: true |
| 40 |
- intf_name: '{{ interface3 }}' |
| 41 |
edge_port: true |
| 42 |
link_type: shared |
| 43 |
guard: none |
| 44 |
bpdu_guard: true |
| 45 |
bpdu_filter: true |
| 46 |
uplink_fast: true |
| 47 |
shutdown: true |
| 48 |
cost: 60 |
| 49 |
port_priority: 70 |
| 50 |
stp_enable: true |
| 51 |
mstp: |
| 52 |
mst_name: mst1 |
| 53 |
mst_instances: |
| 54 |
- mst_id: 1 |
| 55 |
vlans: |
| 56 |
- 304 |
| 57 |
- 302 |
| 58 |
- 301 |
| 59 |
- 303 |
| 60 |
|
| 61 |
- name: test_case_02 |
| 62 |
description: Modify mst configuration |
| 63 |
state: merged |
| 64 |
input: |
| 65 |
mstp: |
| 66 |
mst_name: mst1 |
| 67 |
revision: 1 |
| 68 |
max_hop: 3 |
| 69 |
hello_time: 6 |
| 70 |
max_age: 9 |
| 71 |
fwd_delay: 12 |
| 72 |
mst_instances: |
| 73 |
- mst_id: 1 |
| 74 |
bridge_priority: 2048 |
| 75 |
vlans: |
| 76 |
- 301 |
| 77 |
interfaces: |
| 78 |
- intf_name: '{{ interface1 }}' |
| 79 |
cost: 60 |
| 80 |
port_priority: 65 |
| 81 |
- mst_id: 2 |
| 82 |
bridge_priority: 1024 |
| 83 |
vlans: |
| 84 |
- 302 |
| 85 |
interfaces: |
| 86 |
- intf_name: '{{ interface2 }}' |
| 87 |
cost: 50 |
| 88 |
port_priority: 55 |
| 89 |
|
| 90 |
- name: test_case_03 |
| 91 |
description: Replace at mst instance and interface level |
| 92 |
state: replaced |
| 93 |
input: |
| 94 |
mstp: |
| 95 |
mst_instances: |
| 96 |
- mst_id: 1 |
| 97 |
bridge_priority: 1024 |
| 98 |
vlans: |
| 99 |
- 303 |
| 100 |
- 302 |
| 101 |
- mst_id: 2 |
| 102 |
bridge_priority: 1024 |
| 103 |
interfaces: |
| 104 |
- intf_name: '{{ interface2 }}' |
| 105 |
cost: 52 |
| 106 |
port_priority: 57 |
| 107 |
- intf_name: '{{ interface3 }}' |
| 108 |
cost: 40 |
| 109 |
port_priority: 45 |
| 110 |
- mst_id: 3 |
| 111 |
bridge_priority: 3072 |
| 112 |
|
| 113 |
- name: test_case_04 |
| 114 |
description: Replace at mstp level |
| 115 |
state: replaced |
| 116 |
input: |
| 117 |
mstp: |
| 118 |
mst_name: mst2 |
| 119 |
revision: 2 |
| 120 |
max_hop: 2 |
| 121 |
hello_time: 8 |
| 122 |
max_age: 10 |
| 123 |
fwd_delay: 14 |
| 124 |
|
| 125 |
- name: test_case_05 |
| 126 |
description: Modify mst configuration |
| 127 |
state: merged |
| 128 |
input: |
| 129 |
mstp: |
| 130 |
mst_name: mst1 |
| 131 |
revision: 3 |
| 132 |
max_hop: 3 |
| 133 |
hello_time: 9 |
| 134 |
max_age: 11 |
| 135 |
fwd_delay: 15 |
| 136 |
mst_instances: |
| 137 |
- mst_id: 1 |
| 138 |
vlans: |
| 139 |
- 301 |
| 140 |
interfaces: |
| 141 |
- intf_name: '{{ interface1 }}' |
| 142 |
cost: 70 |
| 143 |
port_priority: 75 |
| 144 |
- mst_id: 2 |
| 145 |
bridge_priority: 2048 |
| 146 |
vlans: |
| 147 |
- 301-303 |
| 148 |
interfaces: |
| 149 |
- intf_name: '{{ interface2 }}' |
| 150 |
cost: 52 |
| 151 |
port_priority: 57 |
| 152 |
- intf_name: '{{ interface3 }}' |
| 153 |
cost: 45 |
| 154 |
port_priority: 47 |
| 155 |
|
| 156 |
- name: test_case_06 |
| 157 |
description: Delete mstp attributes |
| 158 |
state: deleted |
| 159 |
input: |
| 160 |
mstp: |
| 161 |
mst_name: mst1 |
| 162 |
revision: 3 |
| 163 |
max_hop: 3 |
| 164 |
hello_time: 9 |
| 165 |
max_age: 11 |
| 166 |
fwd_delay: 15 |
| 167 |
mst_instances: |
| 168 |
- mst_id: 1 |
| 169 |
- mst_id: 2 |
| 170 |
bridge_priority: 2048 |
| 171 |
vlans: |
| 172 |
- 302 |
| 173 |
interfaces: |
| 174 |
- intf_name: '{{ interface2 }}' |
| 175 |
cost: 52 |
| 176 |
port_priority: 57 |
| 177 |
- intf_name: '{{ interface3 }}' |
| 178 |
|
| 179 |
- name: test_case_07 |
| 180 |
description: Delete global mstp configuration |
| 181 |
state: deleted |
| 182 |
input: |
| 183 |
global: |
| 184 |
enabled_protocol: mst |
| 185 |
|
| 186 |
- name: test_case_08 |
| 187 |
description: Add STP configuration for pvst protocol |
| 188 |
state: merged |
| 189 |
input: |
| 190 |
global: |
| 191 |
enabled_protocol: pvst |
| 192 |
bpdu_filter: true |
| 193 |
root_guard_timeout: 25 |
| 194 |
portfast: true |
| 195 |
hello_time: 5 |
| 196 |
max_age: 10 |
| 197 |
fwd_delay: 20 |
| 198 |
bridge_priority: 4096 |
| 199 |
pvst: |
| 200 |
- vlan_id: 301 |
| 201 |
hello_time: 4 |
| 202 |
max_age: 6 |
| 203 |
fwd_delay: 8 |
| 204 |
bridge_priority: 4096 |
| 205 |
interfaces: |
| 206 |
- intf_name: '{{ interface1 }}' |
| 207 |
cost: 10 |
| 208 |
port_priority: 50 |
| 209 |
- vlan_id: 302 |
| 210 |
hello_time: 5 |
| 211 |
max_age: 7 |
| 212 |
fwd_delay: 9 |
| 213 |
bridge_priority: 4096 |
| 214 |
interfaces: |
| 215 |
- intf_name: '{{ interface2 }}' |
| 216 |
cost: 20 |
| 217 |
port_priority: 60 |
| 218 |
- intf_name: '{{ interface3 }}' |
| 219 |
cost: 30 |
| 220 |
port_priority: 70 |
| 221 |
|
| 222 |
- name: test_case_09 |
| 223 |
description: Replace pvst configuration |
| 224 |
state: replaced |
| 225 |
input: |
| 226 |
pvst: |
| 227 |
- vlan_id: 301 |
| 228 |
hello_time: 7 |
| 229 |
max_age: 8 |
| 230 |
fwd_delay: 9 |
| 231 |
bridge_priority: 8192 |
| 232 |
- vlan_id: 302 |
| 233 |
interfaces: |
| 234 |
- intf_name: '{{ interface2 }}' |
| 235 |
cost: 2 |
| 236 |
port_priority: 60 |
| 237 |
- intf_name: '{{ interface3 }}' |
| 238 |
cost: 31 |
| 239 |
port_priority: 71 |
| 240 |
|
| 241 |
- name: test_case_10 |
| 242 |
description: Modify pvst configuration |
| 243 |
state: merged |
| 244 |
input: |
| 245 |
pvst: |
| 246 |
- vlan_id: 301 |
| 247 |
interfaces: |
| 248 |
- intf_name: '{{ interface1 }}' |
| 249 |
cost: 11 |
| 250 |
port_priority: 51 |
| 251 |
- vlan_id: 302 |
| 252 |
hello_time: 3 |
| 253 |
max_age: 9 |
| 254 |
fwd_delay: 11 |
| 255 |
bridge_priority: 4096 |
| 256 |
|
| 257 |
- name: test_case_11 |
| 258 |
description: Delete pvst attributes |
| 259 |
state: deleted |
| 260 |
input: |
| 261 |
pvst: |
| 262 |
- vlan_id: 301 |
| 263 |
hello_time: 7 |
| 264 |
max_age: 8 |
| 265 |
fwd_delay: 9 |
| 266 |
bridge_priority: 8192 |
| 267 |
interfaces: |
| 268 |
- intf_name: '{{ interface1 }}' |
| 269 |
cost: 11 |
| 270 |
- vlan_id: 302 |
| 271 |
interfaces: |
| 272 |
- intf_name: '{{ interface2 }}' |
| 273 |
- intf_name: '{{ interface3 }}' |
| 274 |
cost: 31 |
| 275 |
port_priority: 71 |
| 276 |
|
| 277 |
- name: test_case_12 |
| 278 |
description: Delete pvst and global pvst configuration |
| 279 |
state: deleted |
| 280 |
input: |
| 281 |
global: |
| 282 |
enabled_protocol: pvst |
| 283 |
|
| 284 |
- name: test_case_13 |
| 285 |
description: Add STP configuration for rapid-pvst protocol |
| 286 |
state: merged |
| 287 |
input: |
| 288 |
global: |
| 289 |
enabled_protocol: rapid_pvst |
| 290 |
bpdu_filter: true |
| 291 |
root_guard_timeout: 25 |
| 292 |
hello_time: 5 |
| 293 |
max_age: 10 |
| 294 |
fwd_delay: 20 |
| 295 |
bridge_priority: 4096 |
| 296 |
rapid_pvst: |
| 297 |
- vlan_id: 301 |
| 298 |
hello_time: 4 |
| 299 |
max_age: 6 |
| 300 |
fwd_delay: 8 |
| 301 |
bridge_priority: 4096 |
| 302 |
interfaces: |
| 303 |
- intf_name: '{{ interface1 }}' |
| 304 |
cost: 10 |
| 305 |
port_priority: 50 |
| 306 |
- vlan_id: 302 |
| 307 |
hello_time: 5 |
| 308 |
max_age: 7 |
| 309 |
fwd_delay: 9 |
| 310 |
bridge_priority: 4096 |
| 311 |
interfaces: |
| 312 |
- intf_name: '{{ interface2 }}' |
| 313 |
cost: 20 |
| 314 |
port_priority: 60 |
| 315 |
- intf_name: '{{ interface3 }}' |
| 316 |
cost: 30 |
| 317 |
port_priority: 70 |
| 318 |
|
| 319 |
- name: test_case_14 |
| 320 |
description: Replace rapid-pvst configuration |
| 321 |
state: replaced |
| 322 |
input: |
| 323 |
rapid_pvst: |
| 324 |
- vlan_id: 301 |
| 325 |
hello_time: 7 |
| 326 |
max_age: 8 |
| 327 |
fwd_delay: 9 |
| 328 |
bridge_priority: 8192 |
| 329 |
- vlan_id: 302 |
| 330 |
interfaces: |
| 331 |
- intf_name: '{{ interface2 }}' |
| 332 |
cost: 2 |
| 333 |
port_priority: 60 |
| 334 |
- intf_name: '{{ interface3 }}' |
| 335 |
cost: 31 |
| 336 |
port_priority: 71 |
| 337 |
|
| 338 |
- name: test_case_15 |
| 339 |
description: Modify rapid-pvst configuration |
| 340 |
state: merged |
| 341 |
input: |
| 342 |
rapid_pvst: |
| 343 |
- vlan_id: 301 |
| 344 |
interfaces: |
| 345 |
- intf_name: '{{ interface1 }}' |
| 346 |
cost: 11 |
| 347 |
port_priority: 51 |
| 348 |
- vlan_id: 302 |
| 349 |
hello_time: 3 |
| 350 |
max_age: 9 |
| 351 |
fwd_delay: 11 |
| 352 |
bridge_priority: 4096 |
| 353 |
|
| 354 |
- name: test_case_16 |
| 355 |
description: Delete rapid-pvst attributes |
| 356 |
state: deleted |
| 357 |
input: |
| 358 |
rapid_pvst: |
| 359 |
- vlan_id: 301 |
| 360 |
hello_time: 7 |
| 361 |
max_age: 8 |
| 362 |
fwd_delay: 9 |
| 363 |
bridge_priority: 8192 |
| 364 |
interfaces: |
| 365 |
- intf_name: '{{ interface1 }}' |
| 366 |
cost: 11 |
| 367 |
port_priority: 51 |
| 368 |
- vlan_id: 302 |
| 369 |
interfaces: |
| 370 |
- intf_name: '{{ interface2 }}' |
| 371 |
- intf_name: '{{ interface3 }}' |
| 372 |
cost: 31 |
| 373 |
port_priority: 71 |
| 374 |
|
| 375 |
- name: test_case_17 |
| 376 |
description: Delete rapid-pvst and global pvst configuration |
| 377 |
state: deleted |
| 378 |
input: |
| 379 |
global: |
| 380 |
enabled_protocol: rapid_pvst |
| 381 |
|
| 382 |
- name: test_case_18 |
| 383 |
description: Configure STP global and interfaces |
| 384 |
state: merged |
| 385 |
input: |
| 386 |
global: |
| 387 |
enabled_protocol: mst |
| 388 |
bpdu_filter: true |
| 389 |
hello_time: 5 |
| 390 |
max_age: 10 |
| 391 |
fwd_delay: 20 |
| 392 |
bridge_priority: 4096 |
| 393 |
interfaces: |
| 394 |
- intf_name: '{{ interface1 }}' |
| 395 |
edge_port: true |
| 396 |
link_type: shared |
| 397 |
guard: loop |
| 398 |
bpdu_guard: true |
| 399 |
bpdu_filter: true |
| 400 |
uplink_fast: true |
| 401 |
shutdown: true |
| 402 |
cost: 20 |
| 403 |
port_priority: 30 |
| 404 |
stp_enable: true |
| 405 |
- intf_name: '{{ interface2 }}' |
| 406 |
edge_port: true |
| 407 |
link_type: point-to-point |
| 408 |
guard: root |
| 409 |
bpdu_guard: true |
| 410 |
bpdu_filter: true |
| 411 |
uplink_fast: true |
| 412 |
shutdown: true |
| 413 |
cost: 40 |
| 414 |
port_priority: 50 |
| 415 |
stp_enable: true |
| 416 |
- intf_name: '{{ interface3 }}' |
| 417 |
edge_port: true |
| 418 |
link_type: shared |
| 419 |
guard: none |
| 420 |
bpdu_guard: true |
| 421 |
bpdu_filter: true |
| 422 |
uplink_fast: true |
| 423 |
shutdown: true |
| 424 |
cost: 60 |
| 425 |
port_priority: 70 |
| 426 |
stp_enable: true |
| 427 |
|
| 428 |
- name: test_case_19 |
| 429 |
description: Modify STP interface |
| 430 |
state: merged |
| 431 |
input: |
| 432 |
global: |
| 433 |
bpdu_filter: false |
| 434 |
hello_time: 7 |
| 435 |
max_age: 20 |
| 436 |
fwd_delay: 30 |
| 437 |
bridge_priority: 8192 |
| 438 |
interfaces: |
| 439 |
- intf_name: '{{ interface1 }}' |
| 440 |
edge_port: false |
| 441 |
link_type: point-to-point |
| 442 |
guard: root |
| 443 |
bpdu_guard: false |
| 444 |
bpdu_filter: false |
| 445 |
uplink_fast: false |
| 446 |
shutdown: false |
| 447 |
cost: 28 |
| 448 |
port_priority: 32 |
| 449 |
stp_enable: false |
| 450 |
|
| 451 |
- name: test_case_20 |
| 452 |
description: Replace STP interface |
| 453 |
state: replaced |
| 454 |
input: |
| 455 |
interfaces: |
| 456 |
- intf_name: '{{ interface3 }}' |
| 457 |
cost: 80 |
| 458 |
port_priority: 90 |
| 459 |
|
| 460 |
- name: test_case_21 |
| 461 |
description: Delete STP interfaces |
| 462 |
state: deleted |
| 463 |
input: |
| 464 |
interfaces: |
| 465 |
- intf_name: '{{ interface2 }}' |
| 466 |
edge_port: true |
| 467 |
link_type: point-to-point |
| 468 |
guard: root |
| 469 |
bpdu_guard: true |
| 470 |
bpdu_filter: true |
| 471 |
uplink_fast: true |
| 472 |
shutdown: true |
| 473 |
cost: 40 |
| 474 |
port_priority: 50 |
| 475 |
stp_enable: true |
| 476 |
- intf_name: '{{ interface3 }}' |
| 477 |
|
| 478 |
- name: test_case_22 |
| 479 |
description: Replace at global level |
| 480 |
state: replaced |
| 481 |
input: |
| 482 |
global: |
| 483 |
enabled_protocol: mst |
| 484 |
interfaces: |
| 485 |
- intf_name: '{{ interface1 }}' |
| 486 |
- intf_name: '{{ interface2 }}' |
| 487 |
- intf_name: '{{ interface3 }}' |
| 488 |
|
| 489 |
- name: test_case_23 |
| 490 |
description: Override STP configuration |
| 491 |
state: overridden |
| 492 |
input: |
| 493 |
global: |
| 494 |
enabled_protocol: mst |
| 495 |
loop_guard: true |
| 496 |
bpdu_filter: true |
| 497 |
hello_time: 5 |
| 498 |
max_age: 10 |
| 499 |
fwd_delay: 15 |
| 500 |
bridge_priority: 4096 |
| 501 |
interfaces: |
| 502 |
- intf_name: '{{ interface1 }}' |
| 503 |
edge_port: true |
| 504 |
link_type: shared |
| 505 |
guard: loop |
| 506 |
bpdu_guard: true |
| 507 |
bpdu_filter: true |
| 508 |
uplink_fast: true |
| 509 |
shutdown: true |
| 510 |
cost: 20 |
| 511 |
port_priority: 30 |
| 512 |
stp_enable: true |
| 513 |
- intf_name: '{{ interface2 }}' |
| 514 |
edge_port: true |
| 515 |
link_type: point-to-point |
| 516 |
guard: root |
| 517 |
bpdu_guard: true |
| 518 |
bpdu_filter: true |
| 519 |
uplink_fast: true |
| 520 |
shutdown: true |
| 521 |
cost: 40 |
| 522 |
port_priority: 50 |
| 523 |
stp_enable: true |
| 524 |
- intf_name: '{{ interface3 }}' |
| 525 |
edge_port: true |
| 526 |
link_type: shared |
| 527 |
guard: none |
| 528 |
bpdu_guard: true |
| 529 |
bpdu_filter: true |
| 530 |
uplink_fast: true |
| 531 |
shutdown: true |
| 532 |
cost: 60 |
| 533 |
port_priority: 70 |
| 534 |
stp_enable: true |
| 535 |
mstp: |
| 536 |
mst_name: mst1 |
| 537 |
revision: 1 |
| 538 |
max_hop: 3 |
| 539 |
hello_time: 6 |
| 540 |
max_age: 9 |
| 541 |
fwd_delay: 12 |
| 542 |
mst_instances: |
| 543 |
- mst_id: 1 |
| 544 |
bridge_priority: 2048 |
| 545 |
vlans: |
| 546 |
- 304 |
| 547 |
- 303 |
| 548 |
- 302 |
| 549 |
interfaces: |
| 550 |
- intf_name: '{{ interface1 }}' |
| 551 |
cost: 60 |
| 552 |
port_priority: 65 |
| 553 |
- mst_id: 2 |
| 554 |
bridge_priority: 1024 |
| 555 |
vlans: |
| 556 |
- 302 |
| 557 |
interfaces: |
| 558 |
- intf_name: '{{ interface2 }}' |
| 559 |
cost: 50 |
| 560 |
port_priority: 55 |
| 561 |
|
| 562 |
- name: test_case_24 |
| 563 |
description: Delete all STP configuration |
| 564 |
state: deleted |
| 565 |
input: {} |