-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validated STP/RSTP/PVRST integration tests
The original tests were moved to netlab-examples repository.
- Loading branch information
Showing
19 changed files
with
451 additions
and
795 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
message: | | ||
The devices under test form a layer-2 triangle in the red VLAN. | ||
The bridge with the highest priority (s1) should become the root, the link | ||
x1-x2 should get blocked | ||
module: [ vlan, stp ] | ||
|
||
groups: | ||
_auto_create: true | ||
probes: | ||
members: [ x1, x2 ] | ||
device: frr | ||
|
||
nodes: | ||
dut: | ||
stp.priority: 4096 # High STP bridge priority (low value) -> becomes root | ||
x2: | ||
stp.priority: 8192 | ||
|
||
vlans: | ||
red: | ||
mode: bridge | ||
id: 42 | ||
links: [ dut-x1, dut-x2, x1-x2 ] | ||
|
||
validate: | ||
link_fwd: | ||
wait: 40 | ||
wait_msg: Waiting for STP | ||
nodes: [ x1 ] | ||
pass: Link X1-DUT is forwarding; DUT is STP root | ||
fail: Link X1-DUT is not forwarding; DUT is not STP root | ||
devices: [ frr ] | ||
exec: bridge link show|grep {{ interfaces[0].ifname }} | ||
valid: | | ||
"forwarding" in stdout | ||
link_block: | ||
wait: 10 | ||
wait_msg: Waiting for STP | ||
nodes: [ x1 ] | ||
pass: Link X1-X2 is blocking; DUT is STP root | ||
fail: Link X1-X2 is not blocking; DUT is not STP root | ||
devices: [ frr ] | ||
exec: bridge link show|grep {{ interfaces[1].ifname }} | ||
valid: | | ||
"blocking" in stdout |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
message: | | ||
The devices under test form a layer-2 triangle of VLAN trunks | ||
The bridge with the highest priority (s1) should become the root on all VLANs, | ||
the link x1-x2 should get blocked. Please note that we're running traditional | ||
STP where BPDUs are sent untagged. | ||
module: [ vlan, stp ] | ||
|
||
groups: | ||
_auto_create: true | ||
probes: | ||
members: [ x1, x2 ] | ||
device: eos | ||
|
||
nodes: | ||
dut: | ||
stp.priority: 4096 # High STP bridge priority (low value) -> becomes root | ||
x2: | ||
stp.priority: 16384 | ||
|
||
vlans: | ||
red: | ||
mode: bridge | ||
id: 42 | ||
blue: | ||
mode: bridge | ||
id: 76 | ||
|
||
links: | ||
- dut: | ||
x1: | ||
vlan.trunk: [ red, blue ] | ||
- dut: | ||
x2: | ||
vlan.trunk: [ red, blue ] | ||
- x1: | ||
x2: | ||
vlan.trunk: [ red, blue ] | ||
|
||
validate: | ||
link_fwd: | ||
wait: 40 | ||
wait_msg: Waiting for STP | ||
nodes: [ x1 ] | ||
devices: [ eos ] | ||
pass: Port X1 => DUT the root port; DUT is STP root | ||
fail: Port X1 => DUT the not root port; DUT is not STP root | ||
show: spanning-tree | json | ||
valid: | | ||
spanningTreeInstances.MST0.rootPort.interface == 'Ethernet1' | ||
link_block: | ||
wait: 10 | ||
wait_msg: Waiting for STP | ||
nodes: [ x1 ] | ||
devices: [ eos ] | ||
pass: Link X1-X2 is blocking; DUT is STP root | ||
fail: Link X1-X2 is not blocking; DUT is not STP root | ||
show: spanning-tree | json | ||
valid: | | ||
spanningTreeInstances.MST0.interfaces.Ethernet2.state == 'discarding' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
message: | | ||
The devices under test form a loop in the red VLAN. | ||
The link with the lowest port_priority should be forwarding, all other links | ||
should be blocked. | ||
module: [ vlan, stp ] | ||
|
||
groups: | ||
_auto_create: true | ||
probes: | ||
members: [ x1 ] | ||
device: frr | ||
|
||
nodes: | ||
dut: | ||
stp.priority: 4096 # High STP bridge priority (low value) -> becomes root | ||
|
||
vlans: | ||
red: | ||
mode: bridge | ||
id: 42 | ||
|
||
links: | ||
- dut: | ||
stp.port_priority: 12 | ||
x1: | ||
vlan.access: red | ||
- dut: | ||
stp.port_priority: 10 | ||
x1: | ||
vlan.access: red | ||
- dut: | ||
stp.port_priority: 0 | ||
x1: | ||
vlan.access: red | ||
|
||
validate: | ||
eth3_fwd: | ||
wait: 40 | ||
wait_msg: Waiting for STP | ||
nodes: [ x1 ] | ||
devices: [ frr ] | ||
pass: Third link is forwarding; DUT set the correct port priority | ||
fail: Third link is not forwarding; DUT probably did not set port priority | ||
stop_on_error: True | ||
exec: bridge link show|grep {{ interfaces[2].ifname }} | ||
valid: | | ||
"forwarding" in stdout | ||
eth1_block: | ||
wait: 10 | ||
wait_msg: Waiting for STP | ||
nodes: [ x1 ] | ||
devices: [ frr ] | ||
pass: Second link is blocking; DUT set the correct port priority | ||
fail: Second link is not blocking; DUT probably did not set port priority | ||
stop_on_error: True | ||
exec: bridge link show|grep {{ interfaces[0].ifname }} | ||
valid: | | ||
"blocking" in stdout | ||
eth2_block: | ||
wait: 10 | ||
wait_msg: Waiting for STP | ||
nodes: [ x1 ] | ||
devices: [ frr ] | ||
pass: First link is blocking; DUT set the correct port priority | ||
fail: First link is not blocking; DUT probably did not set port priority | ||
stop_on_error: True | ||
exec: bridge link show|grep {{ interfaces[1].ifname }} | ||
valid: | | ||
"blocking" in stdout |
Oops, something went wrong.