Skip to content

Commit

Permalink
test: lag_*: Ensure that links making up a LAG are compatible
Browse files Browse the repository at this point in the history
Do not allow the topology matcher to setup a LAG where one link is
running at 10G while the other one runs at 1G, since the bond will
never use the 1G port as long as there the 10G link is up.
  • Loading branch information
wkz committed Feb 4, 2025
1 parent c8484a4 commit 4b47536
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions test/case/ietf_interfaces/lag_basic/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from time import sleep, time
from datetime import datetime
import infamy
import infamy.lag
from infamy.util import parallel, until


class DumbLinkBreaker:
"""Encapsulates basic, dumb link-breaking ops over SSH."""

Expand Down Expand Up @@ -135,7 +135,7 @@ def dut_init(dut, mode, addr):

with infamy.Test() as test:
with test.step("Set up topology and attach to target DUTs"):
env = infamy.Env()
env = infamy.Env(edge_mappings=infamy.lag.edge_mappings)
dut1 = env.attach("dut1", "mgmt")
dut2 = env.attach("dut2", "mgmt")

Expand Down
4 changes: 2 additions & 2 deletions test/case/ietf_interfaces/lag_basic/topology.dot
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ graph "lag" {
host:mon -- dut1:mon // Monitor connection to dut2 via dut1
host:mgmt2 -- dut2:mgmt [requires="mgmt", color=lightgrey]

dut1:link1 -- dut2:link1 [color=black, fontcolor=black, penwidth=3]
dut1:link2 -- dut2:link2 [color=black, fontcolor=black, penwidth=3]
dut1:link1 -- dut2:link1 [lag=true, color=black, fontcolor=black, penwidth=3]
dut1:link2 -- dut2:link2 [lag=true, color=black, fontcolor=black, penwidth=3]
}
3 changes: 2 additions & 1 deletion test/case/ietf_interfaces/lag_failure/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"""
from time import time
import infamy
import infamy.lag
from infamy.netns import TPMR
from infamy.util import parallel

Expand Down Expand Up @@ -120,7 +121,7 @@ def dut_init(dut, addr, peer):

with infamy.Test() as test:
with test.step("Set up topology and attach to target DUTs"):
env = infamy.Env()
env = infamy.Env(edge_mappings=infamy.lag.edge_mappings)
dut1 = env.attach("dut1")
dut2 = env.attach("dut2")

Expand Down
8 changes: 4 additions & 4 deletions test/case/ietf_interfaces/lag_failure/topology.dot
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ graph "lag" {
host:mon -- dut1:mon // Monitor connection to dut2 via dut1
host:mgmt2 -- dut2:mgmt [requires="mgmt", color=lightgrey]

dut1:link1 -- host:lb1a [requires="ieee-mc", color=black, fontcolor=black]
host:lb1b -- dut2:link1 [requires="ieee-mc", color=black, fontcolor=black]
dut1:link1 -- host:lb1a [requires="ieee-mc", lag=true, color=black, fontcolor=black]
host:lb1b -- dut2:link1 [requires="ieee-mc", lag=true, color=black, fontcolor=black]

dut1:link2 -- host:lb2a [requires="ieee-mc", color=black, fontcolor=black]
host:lb2b -- dut2:link2 [requires="ieee-mc", color=black, fontcolor=black]
dut1:link2 -- host:lb2a [requires="ieee-mc", lag=true, color=black, fontcolor=black]
host:lb2b -- dut2:link2 [requires="ieee-mc", lag=true, color=black, fontcolor=black]
}

0 comments on commit 4b47536

Please sign in to comment.