test: Update topologies and test texts
All mgmt links should be lightgrey, all mgmt ports should be named mgmt links between duts should be named link.
@@ -23,7 +23,7 @@ image::topology.png[USB configuration topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUT
|
||||
. Unlock all USB ports
|
||||
. Verify that all USB ports are unlocked
|
||||
. Lock all USB ports
|
||||
|
||||
@@ -20,7 +20,7 @@ import infamy.netconf as netconf
|
||||
from infamy.util import until, wait_boot
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
available = usb.get_usb_ports(target)
|
||||
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -16,8 +16,8 @@ image::topology.png[USB configuration with two USB ports topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Lock the first USB port, and unlock the second USB port
|
||||
. Set up topology and attach to target DUTs
|
||||
. Lock the first USB port and unlock the second USB port
|
||||
. Verify that the correct port is locked and the correct one is unlocked
|
||||
. Unlock the first USB port, and lock the second USB port
|
||||
. Verify that the correct port is locked and the correct one is unlocked
|
||||
|
||||
@@ -13,7 +13,7 @@ import infamy.netconf as netconf
|
||||
from infamy.util import until,wait_boot
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUTs"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
available=usb.get_usb_ports(target)
|
||||
@@ -21,7 +21,7 @@ with infamy.Test() as test:
|
||||
if len(available) < 2:
|
||||
test.skip()
|
||||
|
||||
with test.step("Lock the first USB port, and unlock the second USB port"):
|
||||
with test.step("Lock the first USB port and unlock the second USB port"):
|
||||
components = []
|
||||
component = {
|
||||
"name": available[0],
|
||||
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -13,12 +13,12 @@ graph "1x2" {
|
||||
];
|
||||
|
||||
target [
|
||||
label="{ <mgmt> mgmt | <data> data } | target",
|
||||
label="{ <mgmt> mgmt | <data> data } | target\n10.0.0.2/24 (br0)",
|
||||
pos="10,12!",
|
||||
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color=lightgrey]
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color="lightgray"]
|
||||
host:data -- target:data [color=black, fontcolor=black, taillabel="10.0.0.1/24"]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 9.7 KiB |
@@ -4,21 +4,20 @@ Ping through two bridges on two different DUTs.
|
||||
|
||||
....
|
||||
|
||||
,-------------------------------------, ,-------------------------------------,
|
||||
| dut1:link | | dut2:link |
|
||||
| br0 ----------|-------|--------- br0 |
|
||||
| / | | / \ |
|
||||
|dut1:mgmt dut1:data1 | | dut2:data1 dut2:data2 dut2:mgmt |
|
||||
'-------------------------------------' '-------------------------------------'
|
||||
| | | | |
|
||||
| | | | |
|
||||
,-----------------------------------------------------------------------------------------,
|
||||
| host:mgmt1 host:data11 host:data21 host:data22 host:mgmt2 |
|
||||
| [10.0.0.2] [10.0.0.3] [10.0.0.4] |
|
||||
| (ns11) (ns20) (ns21) |
|
||||
| |
|
||||
| [ HOST ] |
|
||||
'-----------------------------------------------------------------------------------------'
|
||||
,-------------------------------------, ,-------------------------------------,
|
||||
| dut1:link | | dut2:link |
|
||||
| br0 ----------|---|--------- br0 |
|
||||
| / | | / \ |
|
||||
|dut1:mgmt dut1:data1 | | dut2:data1 dut2:data2 dut2:mgmt |
|
||||
'-------------------------------------' '-------------------------------------'
|
||||
| | | | |
|
||||
| | | | |
|
||||
,-----------------------------------------------------------------------------------,
|
||||
| host:mgmt1 host:data11 host:data21 host:data22 host:mgmt2 |
|
||||
| [10.0.0.2] [10.0.0.3] [10.0.0.4] |
|
||||
| (ns11) (ns20) (ns21) |
|
||||
| [ HOST ] |
|
||||
'-----------------------------------------------------------------------------------'
|
||||
|
||||
....
|
||||
|
||||
|
||||
@@ -6,21 +6,20 @@ Ping through two bridges on two different DUTs.
|
||||
|
||||
....
|
||||
|
||||
,-------------------------------------, ,-------------------------------------,
|
||||
| dut1:link | | dut2:link |
|
||||
| br0 ----------|-------|--------- br0 |
|
||||
| / | | / \ |
|
||||
|dut1:mgmt dut1:data1 | | dut2:data1 dut2:data2 dut2:mgmt |
|
||||
'-------------------------------------' '-------------------------------------'
|
||||
| | | | |
|
||||
| | | | |
|
||||
,-----------------------------------------------------------------------------------------,
|
||||
| host:mgmt1 host:data11 host:data21 host:data22 host:mgmt2 |
|
||||
| [10.0.0.2] [10.0.0.3] [10.0.0.4] |
|
||||
| (ns11) (ns20) (ns21) |
|
||||
| |
|
||||
| [ HOST ] |
|
||||
'-----------------------------------------------------------------------------------------'
|
||||
,-------------------------------------, ,-------------------------------------,
|
||||
| dut1:link | | dut2:link |
|
||||
| br0 ----------|---|--------- br0 |
|
||||
| / | | / \ |
|
||||
|dut1:mgmt dut1:data1 | | dut2:data1 dut2:data2 dut2:mgmt |
|
||||
'-------------------------------------' '-------------------------------------'
|
||||
| | | | |
|
||||
| | | | |
|
||||
,-----------------------------------------------------------------------------------,
|
||||
| host:mgmt1 host:data11 host:data21 host:data22 host:mgmt2 |
|
||||
| [10.0.0.2] [10.0.0.3] [10.0.0.4] |
|
||||
| (ns11) (ns20) (ns21) |
|
||||
| [ HOST ] |
|
||||
'-----------------------------------------------------------------------------------'
|
||||
|
||||
....
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 20 KiB |
@@ -3,6 +3,15 @@
|
||||
This tests the possibility to add software added interfaces, in this case
|
||||
VETH and bridge it with a physical interface
|
||||
|
||||
....
|
||||
|
||||
PING --> br0
|
||||
/ \
|
||||
PC- target:data veth0a -- veth0b
|
||||
10.0.0.1 10.0.0.2
|
||||
|
||||
....
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_veth/topology.png[Bridge with a physical port and a veth topology]
|
||||
@@ -16,7 +25,7 @@ image::topology.png[Bridge with a physical port and a veth topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUT
|
||||
. Configure bridged eth port and veth pair with IP 10.0.0.2
|
||||
. Verify ping from host:data to 10.0.0.2
|
||||
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# PING --> br0
|
||||
# / \
|
||||
# PC ---- e0 veth 10.0.0.2
|
||||
#
|
||||
"""
|
||||
Bridge with a physical port and a veth
|
||||
|
||||
This tests the possibility to add software added interfaces, in this case
|
||||
VETH and bridge it with a physical interface
|
||||
|
||||
....
|
||||
|
||||
PING --> br0
|
||||
/ \\
|
||||
PC- target:data veth0a -- veth0b
|
||||
10.0.0.1 10.0.0.2
|
||||
|
||||
....
|
||||
|
||||
|
||||
"""
|
||||
import infamy
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ graph "1x2" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <tgt> tgt | <data> data }",
|
||||
label="host | { <mgmt> mgmt | <data> data }",
|
||||
pos="0,12!",
|
||||
kind="controller",
|
||||
];
|
||||
@@ -19,6 +19,6 @@ graph "1x2" {
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:tgt -- target:mgmt [kind=mgmt]
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color="lightgray"]
|
||||
host:data -- target:data [color=black, fontcolor=black, taillabel="10.0.0.1/24"]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.3 KiB |
@@ -1,6 +1,15 @@
|
||||
=== Bridge VLAN
|
||||
==== Description
|
||||
Basic test of VLAN functionality in a bridge
|
||||
Basic test of VLAN functionality in a bridge, tagged/untagged traffic and a VLAN interface in the bridge.
|
||||
....
|
||||
¦ ¦
|
||||
¦ vlan10 IP:10.0.0.2 ¦ br0 IP:10.0.0.3
|
||||
¦ / ¦ /
|
||||
¦ br0 <-- VLAN filtering ¦ link.10
|
||||
¦ u/ \t ¦ /
|
||||
PC ------data link -----------------|-- link
|
||||
¦ dut1 ¦ dut2
|
||||
....
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
@@ -15,8 +24,9 @@ image::topology.png[Bridge VLAN topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Set up topology and attach to target DUT
|
||||
. Configure DUTs
|
||||
. Verify ping from host:data1 to 10.0.0.2 and 10.0.0.3
|
||||
. Verify ping from host:data to 10.0.0.2 and 10.0.0.3
|
||||
|
||||
|
||||
<<<
|
||||
|
||||
@@ -1,29 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
# ¦ ¦
|
||||
# ¦ vlan10 IP:10.0.0.2 ¦ br0 IP:10.0.0.3
|
||||
# ¦ / ¦ /
|
||||
# ¦ br0 <-- VLAN filtering ¦ e0.10
|
||||
# ¦ u/ \t ¦ /
|
||||
# PC ------- e0 e1 ---------------------- e0
|
||||
# PING --> ¦ dut1 ¦ dut2
|
||||
#
|
||||
|
||||
"""
|
||||
Bridge VLAN
|
||||
|
||||
Basic test of VLAN functionality in a bridge
|
||||
Basic test of VLAN functionality in a bridge, tagged/untagged traffic and a VLAN interface in the bridge.
|
||||
....
|
||||
¦ ¦
|
||||
¦ vlan10 IP:10.0.0.2 ¦ br0 IP:10.0.0.3
|
||||
¦ / ¦ /
|
||||
¦ br0 <-- VLAN filtering ¦ link.10
|
||||
¦ u/ \\t ¦ /
|
||||
PC ------data link -----------------|-- link
|
||||
¦ dut1 ¦ dut2
|
||||
....
|
||||
|
||||
"""
|
||||
import infamy
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Configure DUTs"):
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
dut1 = env.attach("dut1", "mgmt")
|
||||
dut2 = env.attach("dut2", "mgmt")
|
||||
|
||||
_, dut1_e0 = env.ltop.xlate("dut1", "data")
|
||||
_, dut1_e1 = env.ltop.xlate("dut1", "to_dut2")
|
||||
_, dut2_e0 = env.ltop.xlate("dut2", "to_dut1")
|
||||
_, dut1_e1 = env.ltop.xlate("dut1", "link")
|
||||
_, dut2_e0 = env.ltop.xlate("dut2", "link")
|
||||
|
||||
with test.step("Configure DUTs"):
|
||||
dut1.put_config_dict("ietf-interfaces", {
|
||||
"interfaces": {
|
||||
"interface": [
|
||||
@@ -117,8 +121,8 @@ with infamy.Test() as test:
|
||||
}
|
||||
})
|
||||
|
||||
with test.step("Verify ping from host:data1 to 10.0.0.2 and 10.0.0.3"):
|
||||
_, hport = env.ltop.xlate("host", "data1")
|
||||
with test.step("Verify ping from host:data to 10.0.0.2 and 10.0.0.3"):
|
||||
_, hport = env.ltop.xlate("host", "data")
|
||||
|
||||
with infamy.IsolatedMacVlan(hport) as ns:
|
||||
ns.addip("10.0.0.1")
|
||||
|
||||
@@ -7,26 +7,26 @@ graph "2x2" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <mgmt1> mgmt1 | <data1> data1 | <mgmt2> mgmt2 }",
|
||||
label="host | { <mgmt1> mgmt1 | <data> data | <mgmt2> mgmt2 }",
|
||||
pos="0,16!",
|
||||
kind="controller",
|
||||
];
|
||||
|
||||
dut1 [
|
||||
label="{ <mgmt> mgmt | <data> data | <to_dut2> to_dut2} | dut1\n(10.0.0.2) ",
|
||||
label="{ <mgmt> mgmt | <data> data | <link> link} | dut1\n(10.0.0.2) ",
|
||||
pos="10,16!",
|
||||
|
||||
kind="infix",
|
||||
];
|
||||
dut2 [
|
||||
label="{ <to_dut1> to_dut1 | <mgmt> mgmt } | dut2\n(10.0.0.3)",
|
||||
label="{ <link> link | <mgmt> mgmt } | dut2\n(10.0.0.3)",
|
||||
pos="10,12!",
|
||||
|
||||
kind="infix",
|
||||
];
|
||||
host:mgmt1 -- dut1:mgmt [kind=mgmt]
|
||||
host:mgmt2 -- dut2:mgmt [kind=mgmt]
|
||||
host:data1 -- dut1:data [color=black]
|
||||
host:mgmt1 -- dut1:mgmt [kind=mgmt, color="lightgray"]
|
||||
host:mgmt2 -- dut2:mgmt [kind=mgmt, color="lightgray"]
|
||||
host:data -- dut1:data [color=black]
|
||||
|
||||
dut1:to_dut2 -- dut2:to_dut1
|
||||
dut1:link -- dut2:link [color=black]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 18 KiB |
@@ -2,6 +2,25 @@
|
||||
==== Description
|
||||
Test that two VLANs are correctly separated in the bridge
|
||||
|
||||
....
|
||||
,-----------------------------------, ,----------------------------------,
|
||||
| dut1:link | | dut2:link |
|
||||
| br0 --------|---|--------- br0 |
|
||||
| / \ | | / \ |
|
||||
|dut1:mgmt dut1:data1 dut1:data2 | | dut2:data1 dut2:data2 dut2:mgmt |
|
||||
'-----------------------------------' '----------------------------------'
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
,------------------------------------------------------------------------------,
|
||||
| host:mgmt0 host:data10 host:data11 host:data20 host:data21 host:mgmt1 |
|
||||
| [10.0.0.1] [10.0.0.2] [10.0.0.3] [10.0.0.4] |
|
||||
| (ns10) (ns11) (s20) (ns21) |
|
||||
| |
|
||||
| [ HOST ] |
|
||||
'------------------------------------------------------------------------------'
|
||||
|
||||
....
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_vlan_separation/topology.png[Bridge VLAN separation topology]
|
||||
@@ -15,7 +34,7 @@ image::topology.png[Bridge VLAN separation topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUT
|
||||
. Configure DUTs
|
||||
. Verify ping 10.0.0.3 from host:data10
|
||||
. Verify ping 10.0.0.4 from host:data11
|
||||
|
||||
@@ -1,39 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
# ,-------------------------------------, ,-------------------------------------,
|
||||
# | dut1:data2 | | dut2:data2 |
|
||||
# | br0 ----------|-------|--------- br0 |
|
||||
# | / \ | | / \ |
|
||||
# |dut1:mgmt dut1:data0 dut1:data1 | | dut2:data0 dut2:data1 dut2:mgmt |
|
||||
# '-------------------------------------' '-------------------------------------'
|
||||
# | | | | | |
|
||||
# | | | | | |
|
||||
# ,-----------------------------------------------------------------------------------------,
|
||||
# | host:mgmt0 host:data0 host:data1 host:data2 host:data3 host:mgmt1 |
|
||||
# | [10.0.0.1] [10.0.0.2] [10.0.0.3] [10.0.0.4] |
|
||||
# | (ns10) (ns11) (ns20) (ns21) |
|
||||
# | |
|
||||
# | [ HOST ] |
|
||||
# '-----------------------------------------------------------------------------------------'
|
||||
"""
|
||||
r"""
|
||||
Bridge VLAN separation
|
||||
|
||||
Test that two VLANs are correctly separated in the bridge
|
||||
|
||||
....
|
||||
,-----------------------------------, ,----------------------------------,
|
||||
| dut1:link | | dut2:link |
|
||||
| br0 --------|---|--------- br0 |
|
||||
| / \ | | / \ |
|
||||
|dut1:mgmt dut1:data1 dut1:data2 | | dut2:data1 dut2:data2 dut2:mgmt |
|
||||
'-----------------------------------' '----------------------------------'
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
,------------------------------------------------------------------------------,
|
||||
| host:mgmt0 host:data10 host:data11 host:data20 host:data21 host:mgmt1 |
|
||||
| [10.0.0.1] [10.0.0.2] [10.0.0.3] [10.0.0.4] |
|
||||
| (ns10) (ns11) (s20) (ns21) |
|
||||
| |
|
||||
| [ HOST ] |
|
||||
'------------------------------------------------------------------------------'
|
||||
|
||||
....
|
||||
"""
|
||||
import infamy
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
dut1 = env.attach("dut1", "mgmt")
|
||||
dut2 = env.attach("dut2", "mgmt")
|
||||
|
||||
with test.step("Configure DUTs"):
|
||||
_, tport10 = env.ltop.xlate("dut1", "data0")
|
||||
_, tport11 = env.ltop.xlate("dut1", "data1")
|
||||
_, tport12 = env.ltop.xlate("dut1", "data2")
|
||||
_, tport20 = env.ltop.xlate("dut2", "data0")
|
||||
_, tport21 = env.ltop.xlate("dut2", "data1")
|
||||
_, tport22 = env.ltop.xlate("dut2", "data2")
|
||||
_, tport10 = env.ltop.xlate("dut1", "data1")
|
||||
_, tport11 = env.ltop.xlate("dut1", "data2")
|
||||
_, tport12 = env.ltop.xlate("dut1", "link")
|
||||
_, tport20 = env.ltop.xlate("dut2", "data1")
|
||||
_, tport21 = env.ltop.xlate("dut2", "data2")
|
||||
_, tport22 = env.ltop.xlate("dut2", "link")
|
||||
|
||||
dut1.put_config_dict("ietf-interfaces", {
|
||||
"interfaces": {
|
||||
|
||||
@@ -13,26 +13,26 @@ graph "2x4" {
|
||||
];
|
||||
|
||||
dut1 [
|
||||
label="{ <mgmt> mgmt | <data0> data0 | <data1> data1 } | { \n dut1 \n\n | <data2> data2 }",
|
||||
label="{ <mgmt> mgmt | <data1> data1 | <data2> data2 } | { \n dut1 \n\n | <link> link }",
|
||||
pos="2,15.25!",
|
||||
fontsize=12,
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
dut2 [
|
||||
label="{ <mgmt> mgmt | <data0> data0 | <data1> data1 } | { <data2> data2 | \n dut2 \n\n }",
|
||||
label="{ <mgmt> mgmt | <data1> data1| <data2> data2 } | { <link> link | \n dut2 \n\n }",
|
||||
pos="2,14.75!",
|
||||
fontsize=12,
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:mgmt1 -- dut1:mgmt [kind=mgmt]
|
||||
host:data10 -- dut1:data0 [color=purple, fontcolor=purple, taillabel="10.0.0.1", headlabel="VLAN10 U"]
|
||||
host:data11 -- dut1:data1 [color=darkgreen, fontcolor=darkgreen, taillabel="10.0.0.2", headlabel="VLAN20 U"]
|
||||
host:mgmt1 -- dut1:mgmt [kind=mgmt, color="lightgray"]
|
||||
host:data10 -- dut1:data1 [color=purple, fontcolor=purple, taillabel="10.0.0.1", headlabel="VLAN10 U"]
|
||||
host:data11 -- dut1:data2 [color=darkgreen, fontcolor=darkgreen, taillabel="10.0.0.2", headlabel="VLAN20 U"]
|
||||
|
||||
host:mgmt2 -- dut2:mgmt [kind=mgmt]
|
||||
host:data20 -- dut2:data0 [color=purple, fontcolor=purple, taillabel="10.0.0.3", headlabel="VLAN10 U"]
|
||||
host:data21 -- dut2:data1 [color=darkgreen, fontcolor=darkgreen, taillabel="10.0.0.4", headlabel="VLAN20 U"]
|
||||
host:mgmt2 -- dut2:mgmt [kind=mgmt color="lightgrey"]
|
||||
host:data20 -- dut2:data1 [color=purple, fontcolor=purple, taillabel="10.0.0.3", headlabel="VLAN10 U"]
|
||||
host:data21 -- dut2:data2 [color=darkgreen, fontcolor=darkgreen, taillabel="10.0.0.4", headlabel="VLAN20 U"]
|
||||
|
||||
dut1:data2 -- dut2:data2 [color=black, fontcolor=black, fontsize=12, label="VLAN 10,20 T"]
|
||||
dut1:link -- dut2:link [color=black, fontcolor=black, fontsize=12, label="VLAN 10,20 T"]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 29 KiB |
@@ -1,22 +1,28 @@
|
||||
=== Dual bridges
|
||||
=== Dual bridges on one device
|
||||
==== Description
|
||||
Verify that it is possible to ping through a bridge to another bridge via VETH interfaces.
|
||||
|
||||
....
|
||||
PING --> br0 br1 10.0.0.2
|
||||
/ \ /
|
||||
PC - target:data veth0a - veth0b
|
||||
....
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/dual_bridge/topology.png[Dual bridges topology]
|
||||
image::../../test/case/ietf_interfaces/dual_bridge/topology.png[Dual bridges on one device topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::dual_bridge/topology.png[Dual bridges topology]
|
||||
image::dual_bridge/topology.png[Dual bridges on one device topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[Dual bridges topology]
|
||||
image::topology.png[Dual bridges on one device topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Configure two bridges linked with a veth pair furthest bridge has IP 10.0.0.2
|
||||
. Set up topology and attach to target DUTs
|
||||
. Configure two bridges linked and a veth pair
|
||||
. Verify ping from host:data to 10.0.0.2
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# PING --> br0 br1 10.0.0.2
|
||||
# / \ /
|
||||
# PC ---- e0 veth
|
||||
#
|
||||
|
||||
"""
|
||||
Dual bridges
|
||||
Dual bridges on one device
|
||||
|
||||
Verify that it is possible to ping through a bridge to another bridge via VETH interfaces.
|
||||
|
||||
....
|
||||
PING --> br0 br1 10.0.0.2
|
||||
/ \\ /
|
||||
PC - target:data veth0a - veth0b
|
||||
....
|
||||
"""
|
||||
import infamy
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUTs"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
|
||||
with test.step("Configure two bridges linked with a veth pair furthest bridge has IP 10.0.0.2"):
|
||||
with test.step("Configure two bridges linked and a veth pair"):
|
||||
_, tport = env.ltop.xlate("target", "data")
|
||||
|
||||
target.put_config_dict("ietf-interfaces", {
|
||||
|
||||
@@ -1 +1 @@
|
||||
../bridge_basic/topology.dot
|
||||
../../../infamy/topologies/1x2.dot
|
||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -1,8 +1,21 @@
|
||||
=== IGMP basic
|
||||
==== Description
|
||||
Test that all multicast gets flooded when IGMP is disabled and
|
||||
Verify that all multicast get flooded when no IGMP join exists in the system and
|
||||
the flooding stops as soon a join arrives
|
||||
|
||||
.1
|
||||
.---------------------------.
|
||||
| DUT |
|
||||
'-data1-----data2-----data3-'
|
||||
| | |
|
||||
| | | 10.0.0.0/24
|
||||
| | |
|
||||
.-data1-. .-data2-. .-data3-.
|
||||
| msend | | mrecv | | !memb |
|
||||
'-------' '-------' '-------'
|
||||
.2 .3 .4
|
||||
HOST
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/igmp_basic/topology.png[IGMP basic topology]
|
||||
@@ -16,13 +29,13 @@ image::topology.png[IGMP basic topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUTs
|
||||
. Configure device
|
||||
. Start multicast sender on host:data0, group 224.1.1.1
|
||||
. Verify that the group 224.1.1.1 is flooded on host:data1 and host:data2
|
||||
. Join multicast group 224.1.1.1 on host:data1
|
||||
. Verify group 224.1.1.1 is received on host:data1
|
||||
. Verify that the group 224.1.1.1 is no longer received to host:data2
|
||||
. Verify that the group 224.1.1.1 is flooded on host:data2 and host:data3
|
||||
. Join multicast group 224.1.1.1 on host:data2
|
||||
. Verify group 224.1.1.1 is received on host:data2
|
||||
. Verify that the group 224.1.1.1 is no longer received on host:data3
|
||||
|
||||
|
||||
<<<
|
||||
|
||||
@@ -4,23 +4,26 @@
|
||||
# group from `msend`, verify that `mrecv` receives it and that `!memb`
|
||||
# does not.
|
||||
#
|
||||
# .1
|
||||
# .---------------------------.
|
||||
# | DUT |
|
||||
# '-data0-----data1-----data2-'
|
||||
# | | |
|
||||
# | | | 10.0.0.0/24
|
||||
# | | |
|
||||
# .-data0-. .-data1-. .-data2-.
|
||||
# | msend | | mrecv | | !memb |
|
||||
# '-------' '-------' '-------'
|
||||
# .2 .3 .4
|
||||
|
||||
"""
|
||||
IGMP basic
|
||||
|
||||
Test that all multicast gets flooded when IGMP is disabled and
|
||||
Verify that all multicast get flooded when no IGMP join exists in the system and
|
||||
the flooding stops as soon a join arrives
|
||||
|
||||
.1
|
||||
.---------------------------.
|
||||
| DUT |
|
||||
'-data1-----data2-----data3-'
|
||||
| | |
|
||||
| | | 10.0.0.0/24
|
||||
| | |
|
||||
.-data1-. .-data2-. .-data3-.
|
||||
| msend | | mrecv | | !memb |
|
||||
'-------' '-------' '-------'
|
||||
.2 .3 .4
|
||||
HOST
|
||||
|
||||
"""
|
||||
|
||||
import infamy
|
||||
@@ -30,12 +33,12 @@ import infamy.multicast as mcast
|
||||
query_interval = 4
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUTs"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
_, msend = env.ltop.xlate("target", "data0")
|
||||
_, mreceive = env.ltop.xlate("target", "data1")
|
||||
_, nojoin = env.ltop.xlate("target", "data2")
|
||||
_, msend = env.ltop.xlate("target", "data1")
|
||||
_, mreceive = env.ltop.xlate("target", "data2")
|
||||
_, nojoin = env.ltop.xlate("target", "data3")
|
||||
|
||||
with test.step("Configure device"):
|
||||
target.put_config_dict("ietf-interfaces",
|
||||
@@ -89,9 +92,9 @@ with infamy.Test() as test:
|
||||
}
|
||||
})
|
||||
|
||||
_, hsend = env.ltop.xlate("host", "data0")
|
||||
_, hreceive = env.ltop.xlate("host", "data1")
|
||||
_, hnojoin = env.ltop.xlate("host", "data2")
|
||||
_, hsend = env.ltop.xlate("host", "data1")
|
||||
_, hreceive = env.ltop.xlate("host", "data2")
|
||||
_, hnojoin = env.ltop.xlate("host", "data3")
|
||||
with infamy.IsolatedMacVlan(hsend) as send_ns, \
|
||||
infamy.IsolatedMacVlan(hreceive) as receive_ns, \
|
||||
infamy.IsolatedMacVlan(hnojoin) as nojoin_ns:
|
||||
@@ -105,16 +108,16 @@ with infamy.Test() as test:
|
||||
nojoin_ns.must_reach("10.0.0.1")
|
||||
|
||||
with mcast.MCastSender(send_ns, "224.1.1.1"):
|
||||
with test.step("Verify that the group 224.1.1.1 is flooded on host:data1 and host:data2"):
|
||||
with test.step("Verify that the group 224.1.1.1 is flooded on host:data2 and host:data3"):
|
||||
infamy.parallel(lambda: receive_ns.must_receive("ip dst 224.1.1.1"),
|
||||
lambda: nojoin_ns.must_receive("ip dst 224.1.1.1"))
|
||||
|
||||
with test.step("Join multicast group 224.1.1.1 on host:data1"):
|
||||
with test.step("Join multicast group 224.1.1.1 on host:data2"):
|
||||
with mcast.MCastReceiver(receive_ns, "224.1.1.1"):
|
||||
with test.step("Verify group 224.1.1.1 is received on host:data1"):
|
||||
with test.step("Verify group 224.1.1.1 is received on host:data2"):
|
||||
receive_ns.must_receive("ip dst 224.1.1.1")
|
||||
|
||||
with test.step("Verify that the group 224.1.1.1 is no longer received to host:data2"):
|
||||
with test.step("Verify that the group 224.1.1.1 is no longer received on host:data3"):
|
||||
attempt = 0
|
||||
|
||||
# This retry loop exists to handle the case where the first query is lost due
|
||||
|
||||
@@ -7,20 +7,20 @@ graph "1x4" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <tgt> tgt | <data0> data0 | <data1> data1 | <data2> data2 }",
|
||||
label="host | { <mgmt> mgmt | <data1> data1 | <data2> data2 | <data3> data3 }",
|
||||
pos="0,12!",
|
||||
kind="controller",
|
||||
];
|
||||
|
||||
target [
|
||||
label="{ <mgmt> mgmt | <data0> data0 | <data1> data1 | <data2> data2 } | target \n\n(br0)\n10.0.0.1/24",
|
||||
label="{ <mgmt> mgmt | <data1> data1 | <data2> data2 | <data3> data3 } | target \n\n(br0)\n10.0.0.1/24",
|
||||
pos="10,12!",
|
||||
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:tgt -- target:mgmt [kind=mgmt]
|
||||
host:data0 -- target:data0 [color=black, fontcolor=black, taillabel="10.0.0.2/24"]
|
||||
host:data1 -- target:data1 [color=black, fontcolor=black, taillabel="10.0.0.3/24"]
|
||||
host:data2 -- target:data2 [color=black, fontcolor=black, taillabel="10.0.0.4/24"]
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color="lightgray"]
|
||||
host:data1 -- target:data1 [color=black, fontcolor=black, taillabel="10.0.0.2/24"]
|
||||
host:data2 -- target:data2 [color=black, fontcolor=black, taillabel="10.0.0.3/24"]
|
||||
host:data3 -- target:data3 [color=black, fontcolor=black, taillabel="10.0.0.4/24"]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 9.7 KiB |
@@ -16,13 +16,13 @@ image::topology.png[Routing basic topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUTs
|
||||
. Setup host
|
||||
. Enable forwarding on target:data0 and target:data1
|
||||
. Verify ping from host:data0 to 10.0.0.10
|
||||
. Verify ping from host:data1 to 192.168.0.10
|
||||
. Disable forwarding on target:data0 and target:data1
|
||||
. Verify ping does not work host:data0 to 10.0.0.10 and host:data1 to 192.168.0.10
|
||||
. Enable forwarding on target:data1 and target:data2
|
||||
. Verify ping from host:data1 to 10.0.0.10
|
||||
. Verify ping from host:data2 to 192.168.0.10
|
||||
. Disable forwarding on target:data1 and target:data2
|
||||
. Verify ping does not work host:data1 to 10.0.0.10 and host:data2 to 192.168.0.10
|
||||
|
||||
|
||||
<<<
|
||||
|
||||
@@ -55,14 +55,14 @@ def config_target(target, tport0, tport1, enable_fwd):
|
||||
})
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUTs"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
_, tport0 = env.ltop.xlate("target", "data0")
|
||||
_, tport1 = env.ltop.xlate("target", "data1")
|
||||
_, tport0 = env.ltop.xlate("target", "data1")
|
||||
_, tport1 = env.ltop.xlate("target", "data2")
|
||||
|
||||
_, hport0 = env.ltop.xlate("host", "data0")
|
||||
_, hport1 = env.ltop.xlate("host", "data1")
|
||||
_, hport0 = env.ltop.xlate("host", "data1")
|
||||
_, hport1 = env.ltop.xlate("host", "data2")
|
||||
|
||||
with infamy.IsolatedMacVlan(hport0) as ns0, \
|
||||
infamy.IsolatedMacVlan(hport1) as ns1 :
|
||||
@@ -74,19 +74,19 @@ with infamy.Test() as test:
|
||||
ns1.addip("10.0.0.10")
|
||||
ns1.addroute("default", "10.0.0.1")
|
||||
|
||||
with test.step("Enable forwarding on target:data0 and target:data1"):
|
||||
with test.step("Enable forwarding on target:data1 and target:data2"):
|
||||
config_target(target, tport0, tport1, True)
|
||||
|
||||
with test.step("Verify ping from host:data0 to 10.0.0.10"):
|
||||
with test.step("Verify ping from host:data1 to 10.0.0.10"):
|
||||
ns0.must_reach("10.0.0.10")
|
||||
|
||||
with test.step("Verify ping from host:data1 to 192.168.0.10"):
|
||||
with test.step("Verify ping from host:data2 to 192.168.0.10"):
|
||||
ns1.must_reach("192.168.0.10")
|
||||
|
||||
with test.step("Disable forwarding on target:data0 and target:data1"):
|
||||
with test.step("Disable forwarding on target:data1 and target:data2"):
|
||||
config_target(target, tport0, tport1, False)
|
||||
|
||||
with test.step("Verify ping does not work host:data0 to 10.0.0.10 and host:data1 to 192.168.0.10"):
|
||||
with test.step("Verify ping does not work host:data1 to 10.0.0.10 and host:data2 to 192.168.0.10"):
|
||||
infamy.parallel(lambda: ns0.must_not_reach("10.0.0.10"),
|
||||
lambda: ns1.must_not_reach("192.168.0.10"))
|
||||
|
||||
|
||||
@@ -7,19 +7,19 @@ graph "1x3" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <tgt> tgt | <data0> data0 | <data1> data1 }",
|
||||
label="host | { <mgmt> mgmt | <data1> data1 | <data2> data2 }",
|
||||
pos="0,12!",
|
||||
kind="controller",
|
||||
];
|
||||
|
||||
target [
|
||||
label="{ <mgmt> mgmt | <data0> data0 | <data1> data1 } | target",
|
||||
label="{ <mgmt> mgmt | <data1> data1 | <data2> data2 } | target",
|
||||
pos="10,12!",
|
||||
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:tgt -- target:mgmt [kind=mgmt]
|
||||
host:data0 -- target:data0 [color=black, fontcolor=black, fontsize=12, taillabel="192.168.0.10", headlabel="192.168.0.1"]
|
||||
host:data1 -- target:data1 [color=black, fontcolor=black, fontsize=12, taillabel="10.0.0.10", headlabel="10.0.0.1"]
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color="lightgray"]
|
||||
host:data1 -- target:data1 [color=black, fontcolor=black, fontsize=12, taillabel=".10", label="192.168.0.0/24" headlabel=".1"]
|
||||
host:data2 -- target:data2 [color=black, fontcolor=black, fontsize=12, taillabel=".10", label="10.0.0.0/24" headlabel=".1"]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 8.9 KiB |
@@ -3,6 +3,21 @@
|
||||
Verify that static multicast filters work (remember that snooping needs to
|
||||
enabled when using static multicast filters)
|
||||
|
||||
....
|
||||
.1
|
||||
.---------------------------.
|
||||
| DUT |
|
||||
'-data1-----data2-----data3-'
|
||||
| | |
|
||||
| | | 10.0.0.0/24
|
||||
| | |
|
||||
.-data1-. .-data2-. .-data3-.
|
||||
| msend | | mrecv | | !memb |
|
||||
'-------' '-------' '-------'
|
||||
.2 .3 .4
|
||||
HOST
|
||||
....
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/static_multicast_filters/topology.png[Static multicast filters topology]
|
||||
@@ -16,13 +31,13 @@ image::topology.png[Static multicast filters topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUTs
|
||||
. Configure device without static filter
|
||||
. Start multicast sender on host:data0, group 224.1.1.1
|
||||
. Verify that 224.1.1.1 is flooded to host:data1 and host:data2
|
||||
. Enable multicast filter on host:data1, group 224.1.1.1
|
||||
. Verify that the group is still forwarded host:data1
|
||||
. Verify that the group is no longer forwarded host:data2
|
||||
. Start multicast sender on host:data1, group 224.1.1.1
|
||||
. Verify that 224.1.1.1 is flooded to host:data2 and host:data3
|
||||
. Enable multicast filter on host:data2, group 224.1.1.1
|
||||
. Verify that the group is still forwarded to host:data2
|
||||
. Verify that the group is no longer forwarded to host:data3
|
||||
|
||||
|
||||
<<<
|
||||
|
||||
@@ -3,24 +3,27 @@
|
||||
# Add static filter on DUT for 224.1.1.1 containing only data1. Send
|
||||
# to that group from `msend`, verify that `mrecv` receives it and that
|
||||
# `!memb` does not.
|
||||
#
|
||||
# .1
|
||||
# .---------------------------.
|
||||
# | DUT |
|
||||
# '-data0-----data1-----data2-'
|
||||
# | | |
|
||||
# | | | 10.0.0.0/24
|
||||
# | | |
|
||||
# .-data0-. .-data1-. .-data2-.
|
||||
# | msend | | mrecv | | !memb |
|
||||
# '-------' '-------' '-------'
|
||||
# .2 .3 .4
|
||||
|
||||
"""
|
||||
Static multicast filters
|
||||
|
||||
Verify that static multicast filters work (remember that snooping needs to
|
||||
enabled when using static multicast filters)
|
||||
|
||||
....
|
||||
.1
|
||||
.---------------------------.
|
||||
| DUT |
|
||||
'-data1-----data2-----data3-'
|
||||
| | |
|
||||
| | | 10.0.0.0/24
|
||||
| | |
|
||||
.-data1-. .-data2-. .-data3-.
|
||||
| msend | | mrecv | | !memb |
|
||||
'-------' '-------' '-------'
|
||||
.2 .3 .4
|
||||
HOST
|
||||
....
|
||||
"""
|
||||
import infamy
|
||||
import time
|
||||
@@ -54,12 +57,12 @@ def set_static_multicast_filter(target, address, port):
|
||||
})
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUTs"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
_, msend = env.ltop.xlate("target", "data0")
|
||||
_, mreceive = env.ltop.xlate("target", "data1")
|
||||
_, nojoin = env.ltop.xlate("target", "data2")
|
||||
_, msend = env.ltop.xlate("target", "data1")
|
||||
_, mreceive = env.ltop.xlate("target", "data2")
|
||||
_, nojoin = env.ltop.xlate("target", "data3")
|
||||
|
||||
with test.step("Configure device without static filter"):
|
||||
target.put_config_dict("ietf-interfaces",
|
||||
@@ -110,14 +113,14 @@ with infamy.Test() as test:
|
||||
}
|
||||
})
|
||||
|
||||
_, hsend = env.ltop.xlate("host", "data0")
|
||||
_, hreceive = env.ltop.xlate("host", "data1")
|
||||
_, hnojoin = env.ltop.xlate("host", "data2")
|
||||
_, hsend = env.ltop.xlate("host", "data1")
|
||||
_, hreceive = env.ltop.xlate("host", "data2")
|
||||
_, hnojoin = env.ltop.xlate("host", "data3")
|
||||
with infamy.IsolatedMacVlan(hsend) as send_ns, \
|
||||
infamy.IsolatedMacVlan(hreceive) as receive_ns, \
|
||||
infamy.IsolatedMacVlan(hnojoin) as nojoin_ns:
|
||||
|
||||
with test.step("Start multicast sender on host:data0, group 224.1.1.1"):
|
||||
with test.step("Start multicast sender on host:data1, group 224.1.1.1"):
|
||||
send_ns.addip("10.0.0.2")
|
||||
receive_ns.addip("10.0.0.3")
|
||||
nojoin_ns.addip("10.0.0.4")
|
||||
@@ -127,18 +130,18 @@ with infamy.Test() as test:
|
||||
|
||||
print("Starting sender")
|
||||
with mcast.MCastSender(send_ns, "224.1.1.1"):
|
||||
with test.step("Verify that 224.1.1.1 is flooded to host:data1 and host:data2"):
|
||||
with test.step("Verify that 224.1.1.1 is flooded to host:data2 and host:data3"):
|
||||
infamy.parallel(lambda: receive_ns.must_receive("ip dst 224.1.1.1"),
|
||||
lambda: nojoin_ns.must_receive("ip dst 224.1.1.1"))
|
||||
|
||||
with test.step("Enable multicast filter on host:data1, group 224.1.1.1"):
|
||||
with test.step("Enable multicast filter on host:data2, group 224.1.1.1"):
|
||||
set_static_multicast_filter(target, "224.1.1.1", mreceive)
|
||||
until(lambda: iface.exist_bridge_multicast_filter(target, "224.1.1.1", mreceive, "br0"))
|
||||
|
||||
with test.step("Verify that the group is still forwarded host:data1"):
|
||||
with test.step("Verify that the group is still forwarded to host:data2"):
|
||||
receive_ns.must_receive("ip dst 224.1.1.1")
|
||||
|
||||
with test.step("Verify that the group is no longer forwarded host:data2"):
|
||||
with test.step("Verify that the group is no longer forwarded to host:data3"):
|
||||
nojoin_ns.must_not_receive("ip dst 224.1.1.1")
|
||||
|
||||
test.succeed()
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -15,6 +15,7 @@ image::topology.png[VLAN ping connectivity topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Set up topology and attach to target DUT
|
||||
. Configure VLAN 10 interface on target:data with IP 10.0.0.2
|
||||
. Waiting for links to come up
|
||||
. Ping 10.0.0.2 from VLAN 10 on host:data with IP 10.0.0.1
|
||||
|
||||
@@ -25,49 +25,50 @@ def test_ping(hport, should_pass):
|
||||
ns.must_not_reach("10.0.0.2")
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Configure VLAN 10 interface on target:data with IP 10.0.0.2"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
_, tport = env.ltop.xlate("target", "data")
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
_, tport = env.ltop.xlate("target", "data")
|
||||
|
||||
target.put_config_dict("ietf-interfaces", {
|
||||
"interfaces": {
|
||||
"interface": [
|
||||
{
|
||||
"name": tport,
|
||||
"enabled": True,
|
||||
},
|
||||
{
|
||||
"name": f"{tport}.10",
|
||||
"type": "infix-if-type:vlan",
|
||||
"vlan": {
|
||||
"id": 10,
|
||||
"lower-layer-if": tport,
|
||||
},
|
||||
|
||||
"ipv4": {
|
||||
"address": [
|
||||
{
|
||||
"ip": "10.0.0.2",
|
||||
"prefix-length": 24,
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
})
|
||||
with test.step("Configure VLAN 10 interface on target:data with IP 10.0.0.2"):
|
||||
target.put_config_dict("ietf-interfaces", {
|
||||
"interfaces": {
|
||||
"interface": [
|
||||
{
|
||||
"name": tport,
|
||||
"enabled": True,
|
||||
},
|
||||
{
|
||||
"name": f"{tport}.10",
|
||||
"type": "infix-if-type:vlan",
|
||||
"vlan": {
|
||||
"id": 10,
|
||||
"lower-layer-if": tport,
|
||||
},
|
||||
"ipv4": {
|
||||
"address": [
|
||||
{
|
||||
"ip": "10.0.0.2",
|
||||
"prefix-length": 24,
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
with test.step("Waiting for links to come up"):
|
||||
until(lambda: iface.get_oper_up(target, tport))
|
||||
with test.step("Waiting for links to come up"):
|
||||
until(lambda: iface.get_oper_up(target, tport))
|
||||
|
||||
with test.step("Ping 10.0.0.2 from VLAN 10 on host:data with IP 10.0.0.1"):
|
||||
_, hport = env.ltop.xlate("host", "data")
|
||||
test_ping(hport,True)
|
||||
with test.step("Ping 10.0.0.2 from VLAN 10 on host:data with IP 10.0.0.1"):
|
||||
_, hport = env.ltop.xlate("host", "data")
|
||||
test_ping(hport,True)
|
||||
|
||||
with test.step("Remove VLAN interface from target:data, and test again (should not be able to ping)"):
|
||||
target.delete_xpath(f"/ietf-interfaces:interfaces/interface[name='{tport}.10']")
|
||||
_, hport = env.ltop.xlate("host", "data")
|
||||
test_ping(hport,False)
|
||||
with test.step("Remove VLAN interface from target:data, and test again (should not be able to ping)"):
|
||||
target.delete_xpath(f"/ietf-interfaces:interfaces/interface[name='{tport}.10']")
|
||||
_, hport = env.ltop.xlate("host", "data")
|
||||
test_ping(hport,False)
|
||||
|
||||
test.succeed()
|
||||
test.succeed()
|
||||
|
||||
@@ -7,7 +7,7 @@ graph "1x2" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <tgt> tgt | <data> data\n(vlan10) }",
|
||||
label="host | { <mgmt> mgmt | <data> data\n(vlan10) }",
|
||||
pos="0,12!",
|
||||
kind="controller",
|
||||
];
|
||||
@@ -19,6 +19,6 @@ graph "1x2" {
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:tgt -- target:mgmt [kind=mgmt]
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color="lightgray"]
|
||||
host:data -- target:data [color=black, fontcolor=black, fontsize=12, taillabel="10.0.0.1/24", headlabel="10.0.0.2/24"]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.8 KiB |
@@ -16,6 +16,7 @@ image::topology.png[OSPF Basic topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Set up topology and attach to target DUTs
|
||||
. Configure targets
|
||||
. Wait for OSPF routes
|
||||
. Test connectivity from PC:data to 192.168.200.1
|
||||
|
||||
@@ -158,11 +158,12 @@ def config_target2(target, link):
|
||||
})
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Configure targets"):
|
||||
with test.step("Set up topology and attach to target DUTs"):
|
||||
env = infamy.Env()
|
||||
R1 = env.attach("R1", "mgmt")
|
||||
R2 = env.attach("R2", "mgmt")
|
||||
|
||||
with test.step("Configure targets"):
|
||||
_, R1data = env.ltop.xlate("R1", "data")
|
||||
_, R2link = env.ltop.xlate("R2", "link")
|
||||
_, R1link= env.ltop.xlate("R1", "link")
|
||||
|
||||
@@ -25,8 +25,8 @@ graph "2x2" {
|
||||
|
||||
kind="infix",
|
||||
];
|
||||
PC:mgmt1 -- R1:mgmt [kind=mgmt]
|
||||
PC:mgmt2 -- R2:mgmt [kind=mgmt]
|
||||
PC:data -- R1:data [color="black", headlabel="192.168.10.1/24", taillabel="192.168.10.2/24", fontcolor="black"]
|
||||
R1:link -- R2:link [headlabel="192.168.50.2/24", taillabel="192.168.50.1/24", labeldistance=1, fontcolor="black", color="black"]
|
||||
PC:mgmt1 -- R1:mgmt [kind=mgmt, color="lightgray"]
|
||||
PC:mgmt2 -- R2:mgmt [kind=mgmt, color="lightgray"]
|
||||
PC:data -- R1:data [color="black", headlabel="192.168.10.1/24", taillabel="192.168.10.2/24", fontcolor="black"]
|
||||
R1:link -- R2:link [headlabel="192.168.50.2/24", taillabel="192.168.50.1/24", labeldistance=1, fontcolor="black", color="black"]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 32 KiB |
@@ -7,6 +7,21 @@ failures using BFD, though BFD is not yet implemented in test framework (Infamy)
|
||||
This test also verifies broadcast and point-to-point interface types on /30 network, and
|
||||
explicit router-id.
|
||||
|
||||
....
|
||||
+-------------+ +---------------+ +-------------+ +---------------+
|
||||
| R1 | | R2 | | R3 | | R4 |
|
||||
| 10.0.0.1/32 | | 10.0.0.2/32 | | 10.0.0.3/32 | | 10.0.0.4/32 |
|
||||
| (lo) | | 11.0.9.1/24 | | (lo) | | (lo) |
|
||||
+-------------+ | 11.0.10.1/24 | +-------------+ +---------------+
|
||||
| 11.0.11.1/24 |
|
||||
| 11.0.12.1/24 |
|
||||
| 11.0.13.1/24 |
|
||||
| 11.0.14.1/24 |
|
||||
| 11.0.15.1/24 |
|
||||
| (lo) |
|
||||
+---------------+
|
||||
....
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_routing/ospf_multiarea/topology.png[OSPF with multiple areas topology]
|
||||
@@ -20,6 +35,7 @@ image::topology.png[OSPF with multiple areas topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Set up topology and attach to target DUTs
|
||||
. Configure targets
|
||||
. Wait for all neighbors to peer
|
||||
. Wait for routes from OSPF on all routers
|
||||
|
||||
@@ -34,6 +34,20 @@ failures using BFD, though BFD is not yet implemented in test framework (Infamy)
|
||||
This test also verifies broadcast and point-to-point interface types on /30 network, and
|
||||
explicit router-id.
|
||||
|
||||
....
|
||||
+-------------+ +---------------+ +-------------+ +---------------+
|
||||
| R1 | | R2 | | R3 | | R4 |
|
||||
| 10.0.0.1/32 | | 10.0.0.2/32 | | 10.0.0.3/32 | | 10.0.0.4/32 |
|
||||
| (lo) | | 11.0.9.1/24 | | (lo) | | (lo) |
|
||||
+-------------+ | 11.0.10.1/24 | +-------------+ +---------------+
|
||||
| 11.0.11.1/24 |
|
||||
| 11.0.12.1/24 |
|
||||
| 11.0.13.1/24 |
|
||||
| 11.0.14.1/24 |
|
||||
| 11.0.15.1/24 |
|
||||
| (lo) |
|
||||
+---------------+
|
||||
....
|
||||
"""
|
||||
import infamy
|
||||
|
||||
@@ -71,11 +85,7 @@ def config_target1(target, ring1, ring2, cross):
|
||||
"address": [{
|
||||
"ip": "10.0.13.1",
|
||||
"prefix-length": 30
|
||||
},
|
||||
{
|
||||
"ip": "10.0.0.1",
|
||||
"prefix-length": 32
|
||||
}]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -85,7 +95,11 @@ def config_target1(target, ring1, ring2, cross):
|
||||
"address": [{
|
||||
"ip": "11.0.8.1",
|
||||
"prefix-length": 24
|
||||
}]
|
||||
},
|
||||
{
|
||||
"ip": "10.0.0.1",
|
||||
"prefix-length": 32
|
||||
}]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -128,7 +142,12 @@ def config_target1(target, ring1, ring2, cross):
|
||||
"hello-interval": 1,
|
||||
"enabled": True,
|
||||
"cost": 2000
|
||||
},
|
||||
{
|
||||
"name": "lo",
|
||||
"enabled": True
|
||||
}]
|
||||
|
||||
}
|
||||
},{
|
||||
"area-id": "0.0.0.2",
|
||||
@@ -142,10 +161,6 @@ def config_target1(target, ring1, ring2, cross):
|
||||
"hello-interval": 1,
|
||||
"enabled": True,
|
||||
"interface-type": "point-to-point"
|
||||
},
|
||||
{
|
||||
"name": "lo",
|
||||
"enabled": True
|
||||
}]
|
||||
}
|
||||
}]
|
||||
@@ -513,7 +528,7 @@ def disable_link(target, link):
|
||||
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Configure targets"):
|
||||
with test.step("Set up topology and attach to target DUTs"):
|
||||
env = infamy.Env()
|
||||
R1 = env.attach("R1", "mgmt")
|
||||
R2 = env.attach("R2", "mgmt")
|
||||
@@ -534,6 +549,8 @@ with infamy.Test() as test:
|
||||
_, R2cross = env.ltop.xlate("R2", "cross")
|
||||
_, R3cross = env.ltop.xlate("R3", "cross")
|
||||
_, R4cross = env.ltop.xlate("R4", "cross")
|
||||
|
||||
with test.step("Configure targets"):
|
||||
parallel(config_target1(R1, R1ring1, R1ring2, R1cross),
|
||||
config_target2(R2, R2ring1, R2ring2, R2cross),
|
||||
config_target3(R3, R3ring2, R3cross, R3data),
|
||||
|
||||
@@ -45,8 +45,8 @@ graph "ring-4-duts" {
|
||||
PC:mgmt4 -- R4:mgmt [kind=mgmt, color="lightgray", overlap=false, weight=0.1]
|
||||
|
||||
# PC-Dut links
|
||||
PC:data3 -- R3:data [color="darkgreen", headlabel=".1", label="192.168.3.0/24", taillabel=".2", labeldistance=2, fontcolor="darkgreen"]
|
||||
PC:data4 -- R4:data [color="darkgreen", headlabel=".1", label="192.168.4.0/24 ", taillabel=".2", labeldistance=2, fontcolor="darkgreen"]
|
||||
PC:data3 -- R3:data [color="purple", headlabel=".1", label="192.168.3.0/24\n(Area 1)", taillabel=".2", labeldistance=2, fontcolor="purple"]
|
||||
PC:data4 -- R4:data [color="black", headlabel=".1", label="192.168.4.0/24 ", taillabel=".2", labeldistance=2, fontcolor="black"]
|
||||
|
||||
# Ring
|
||||
R1:ring1 -- R2:ring2 [color="blue", headlabel=".2", label="(Area 0)\n10.0.12.0/30", taillabel=".1", labeldistance=2, fontcolor="blue"]
|
||||
|
||||
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 76 KiB |
@@ -20,9 +20,10 @@ image::topology.png[OSPF unnumbered interfaces topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Set up topology and attach to target DUTs
|
||||
. Configure targets
|
||||
. Wait for OSPF routes
|
||||
. Check interface type
|
||||
. Verify interface type on R1:link and R2:link is point-to-point
|
||||
. Verify there are no OSPF HELLO packets on PC:data
|
||||
. Test connectivity from PC:data to 192.168.200.1
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ def config_target2(target, link):
|
||||
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Configure targets"):
|
||||
with test.step("Set up topology and attach to target DUTs"):
|
||||
env = infamy.Env()
|
||||
R1 = env.attach("R1", "mgmt")
|
||||
R2 = env.attach("R2", "mgmt")
|
||||
@@ -162,15 +162,17 @@ with infamy.Test() as test:
|
||||
_, R2link = env.ltop.xlate("R2", "link")
|
||||
_, R1link = env.ltop.xlate("R1", "link")
|
||||
|
||||
with test.step("Configure targets"):
|
||||
parallel(lambda: config_target1(R1, R1data, R1link),
|
||||
lambda: config_target2(R2, R2link))
|
||||
|
||||
with test.step("Wait for OSPF routes"):
|
||||
print("Waiting for OSPF routes..")
|
||||
until(lambda: route.ipv4_route_exist(R1, "192.168.200.1/32", proto="ietf-ospf:ospfv2"), attempts=200)
|
||||
until(lambda: route.ipv4_route_exist(R2, "192.168.100.1/32", proto="ietf-ospf:ospfv2"), attempts=200)
|
||||
until(lambda: route.ipv4_route_exist(R2, "192.168.10.0/24", proto="ietf-ospf:ospfv2"), attempts=200)
|
||||
|
||||
with test.step("Check interface type"):
|
||||
with test.step("Verify interface type on R1:link and R2:link is point-to-point"):
|
||||
assert(route.ospf_get_interface_type(R1, "0.0.0.0", R1link) == "point-to-point")
|
||||
assert(route.ospf_get_interface_type(R2, "0.0.0.0", R2link) == "point-to-point")
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ graph "2x2" {
|
||||
|
||||
kind="infix",
|
||||
];
|
||||
PC:mgmt1 -- R1:mgmt [kind=mgmt]
|
||||
PC:mgmt2 -- R2:mgmt [kind=mgmt]
|
||||
PC:mgmt1 -- R1:mgmt [kind=mgmt, color="lightgray"]
|
||||
PC:mgmt2 -- R2:mgmt [kind=mgmt, color="lightgray"]
|
||||
PC:data -- R1:data [color="black", headlabel="192.168.10.1/24", taillabel="192.168.10.2/24", fontcolor="black"]
|
||||
R1:link -- R2:link [headlabel="10.0.0.2/32", taillabel="10.0.0.1/32", labeldistance=1, fontcolor="black", color="black"]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 30 KiB |
@@ -16,6 +16,7 @@ image::topology.png[Static routing topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Set up topology and attach to target DUTs
|
||||
. Configure targets
|
||||
. Wait for routes
|
||||
. Configure host addresses and routes
|
||||
|
||||
@@ -190,7 +190,7 @@ def config_target2(target, link):
|
||||
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Configure targets"):
|
||||
with test.step("Set up topology and attach to target DUTs"):
|
||||
env = infamy.Env()
|
||||
R1 = env.attach("R1", "mgmt")
|
||||
R2 = env.attach("R2", "mgmt")
|
||||
@@ -199,6 +199,7 @@ with infamy.Test() as test:
|
||||
_, R2link = env.ltop.xlate("R2", "link")
|
||||
_, R1link = env.ltop.xlate("R1", "link")
|
||||
|
||||
with test.step("Configure targets"):
|
||||
parallel(config_target1(R1, R1data, R1link),
|
||||
config_target2(R2, R2link))
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ graph "2x2" {
|
||||
|
||||
kind="infix",
|
||||
];
|
||||
PC:mgmt1 -- R1:mgmt [kind=mgmt]
|
||||
PC:mgmt2 -- R2:mgmt [kind=mgmt]
|
||||
PC:data -- R1:data [headlabel=".2", taillabel=".1", label="192.168.10.0/24", fontcolor="black", color="black"]
|
||||
PC:mgmt1 -- R1:mgmt [kind=mgmt, color="lightgray"]
|
||||
PC:mgmt2 -- R2:mgmt [kind=mgmt, color="lightgray"]
|
||||
PC:data -- R1:data [headlabel=".1", taillabel=".2", label="192.168.10.0/24", fontcolor="black", color="black"]
|
||||
R1:link -- R2:link [headlabel=".2", taillabel=".1", label="192.168.50.0/24", labeldistance=1, fontcolor="black", color="black"]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -1,22 +1,23 @@
|
||||
=== Get all operational
|
||||
=== Get operational
|
||||
==== Description
|
||||
Basic test just to get all operational.
|
||||
Basic test just to get operational from test-config without errors.
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/misc/operational_all/topology.png[Get all operational topology]
|
||||
image::../../test/case/misc/operational_all/topology.png[Get operational topology]
|
||||
endif::topdoc[]
|
||||
ifndef::topdoc[]
|
||||
ifdef::testgroup[]
|
||||
image::operational_all/topology.png[Get all operational topology]
|
||||
image::operational_all/topology.png[Get operational topology]
|
||||
endif::testgroup[]
|
||||
ifndef::testgroup[]
|
||||
image::topology.png[Get all operational topology]
|
||||
image::topology.png[Get operational topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Set up topology and attach to target DUT
|
||||
. Get all Operational data from 'target'
|
||||
. Copy test-config to running configuration
|
||||
. Get all Operational data from 'target', verify there are no errors
|
||||
|
||||
|
||||
<<<
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
# Test that it is possible to get all operational data
|
||||
"""
|
||||
Get all operational
|
||||
Get operational
|
||||
|
||||
Basic test just to get all operational.
|
||||
Basic test just to get operational from test-config without errors.
|
||||
"""
|
||||
import infamy
|
||||
import infamy.iface as iface
|
||||
@@ -14,7 +14,10 @@ with infamy.Test() as test:
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
|
||||
with test.step("Get all Operational data from 'target'"):
|
||||
with test.step("Copy test-config to running configuration"):
|
||||
pass
|
||||
|
||||
with test.step("Get all Operational data from 'target', verify there are no errors"):
|
||||
target.get_data(parse=False)
|
||||
|
||||
test.succeed()
|
||||
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -18,7 +18,8 @@ endif::topdoc[]
|
||||
. Initialize
|
||||
. Configure
|
||||
. Reboot and wait for the unit to come back
|
||||
. Verify hostname
|
||||
. Verify user admin is now in wheel group
|
||||
. Verify user admin is now in sys-cli group
|
||||
|
||||
|
||||
<<<
|
||||
|
||||
@@ -9,12 +9,6 @@ with infamy.Test() as test:
|
||||
target = env.attach("target", "mgmt")
|
||||
|
||||
with test.step("Configure"):
|
||||
target.put_config_dict("ietf-system", {
|
||||
"system": {
|
||||
"hostname": "test"
|
||||
}
|
||||
})
|
||||
target.delete_xpath("/ietf-hardware:hardware/component")
|
||||
target.copy("running", "startup")
|
||||
|
||||
with test.step("Reboot and wait for the unit to come back"):
|
||||
@@ -23,10 +17,15 @@ with infamy.Test() as test:
|
||||
target.reboot()
|
||||
if not wait_boot(target, env):
|
||||
test.fail()
|
||||
target = env.attach("target", "mgmt", test_default=False)
|
||||
target = env.attach("target", "mgmt", test_reset=False)
|
||||
tgtssh = env.attach("target", "mgmt", "ssh")
|
||||
|
||||
with test.step("Verify hostname"):
|
||||
data = target.get_dict("/ietf-system:system/hostname")
|
||||
assert data["system"]["hostname"] == "test"
|
||||
with test.step("Verify user admin is now in wheel group"):
|
||||
if not tgtssh.runsh("grep wheel /etc/group | grep 'admin'"):
|
||||
test.fail()
|
||||
|
||||
with test.step("Verify user admin is now in sys-cli group"):
|
||||
if not tgtssh.runsh("grep sys-cli /etc/group | grep 'admin'"):
|
||||
test.fail()
|
||||
|
||||
test.succeed()
|
||||
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -7,7 +7,7 @@ graph "1x1" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <tgt> tgt }",
|
||||
label="host | { <mgmt> mgmt }",
|
||||
pos="0,12!",
|
||||
kind="controller",
|
||||
];
|
||||
@@ -19,5 +19,5 @@ graph "1x1" {
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:tgt -- target:mgmt [kind=mgmt]
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color="lightgray"]
|
||||
}
|
||||
|
||||