diff --git a/test/case/all.yaml b/test/case/all.yaml index 0d9bf7ab0..ab25fb0e2 100644 --- a/test/case/all.yaml +++ b/test/case/all.yaml @@ -3,30 +3,31 @@ - case: meta/wait.py - name: Misc tests - suite: misc/all.yaml + suite: misc/misc.yaml - name: ietf-system - suite: ietf_system/all.yaml + suite: ietf_system/ietf_system.yaml - name: ietf-syslog - suite: ietf_syslog/all.yaml + suite: ietf_syslog/ietf_syslog.yaml - name: ietf-interfaces - suite: ietf_interfaces/all.yaml + suite: ietf_interfaces/ietf_interfaces.yaml - name: infix-interfaces - suite: infix_interfaces/all.yaml + suite: infix_interfaces/infix_interfaces.yaml - name: ietf-routing - suite: ietf_routing/all.yaml + suite: ietf_routing/ietf_routing.yaml - name: infix-containers - suite: infix_containers/all.yaml + suite: infix_containers/infix_containers.yaml - name: infix-dhcp - suite: infix_dhcp/all.yaml + suite: infix_dhcp/infix_dhcp.yaml - name: ietf-hardware - suite: ietf_hardware/all.yaml -#- name: infix-services -# suite: infix_services/all.yaml + suite: ietf_hardware/ietf_hardware.yaml + +- name: infix-services + suite: infix_services/infix_services.yaml diff --git a/test/case/ietf_hardware/all.yaml b/test/case/ietf_hardware/all.yaml deleted file mode 100644 index 8bc46e53d..000000000 --- a/test/case/ietf_hardware/all.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- case: usb.py diff --git a/test/case/ietf_hardware/ietf_hardware.yaml b/test/case/ietf_hardware/ietf_hardware.yaml new file mode 100644 index 000000000..e30dd9f0b --- /dev/null +++ b/test/case/ietf_hardware/ietf_hardware.yaml @@ -0,0 +1,3 @@ +--- +- name: usb + case: usb/test.py diff --git a/test/case/ietf_hardware/usb.py b/test/case/ietf_hardware/usb/test.py similarity index 98% rename from test/case/ietf_hardware/usb.py rename to test/case/ietf_hardware/usb/test.py index 65e4812ad..e09c431b4 100755 --- a/test/case/ietf_hardware/usb.py +++ b/test/case/ietf_hardware/usb/test.py @@ -9,7 +9,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") available=usb.get_usb_ports(target) diff --git a/test/case/ietf_hardware/usb/topology.dot b/test/case/ietf_hardware/usb/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/ietf_hardware/usb/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/ietf_interfaces/all.yaml b/test/case/ietf_interfaces/all.yaml deleted file mode 100644 index 2d4261148..000000000 --- a/test/case/ietf_interfaces/all.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- case: vlan_ping.py -- case: ipv4_address.py -- case: ipv6_address.py -- case: iface_phys_address.py -- case: iface_status.py -- case: routing_basic.py diff --git a/test/case/ietf_interfaces/ietf_interfaces.yaml b/test/case/ietf_interfaces/ietf_interfaces.yaml new file mode 100644 index 000000000..995ff85ed --- /dev/null +++ b/test/case/ietf_interfaces/ietf_interfaces.yaml @@ -0,0 +1,18 @@ +--- +- name: vlan_ping + case: vlan_ping/test.py + +- name: ipv4_address + case: ipv4_address/test.py + +- name: ipv6_address + case: ipv6_address/test.py + +- name: iface_phys_address + case: iface_phys_address/test.py + +- name: iface_status + case: iface_status/test.py + +- name: routing_basic + case: routing_basic/test.py diff --git a/test/case/ietf_interfaces/iface_phys_address.py b/test/case/ietf_interfaces/iface_phys_address/test.py similarity index 95% rename from test/case/ietf_interfaces/iface_phys_address.py rename to test/case/ietf_interfaces/iface_phys_address/test.py index 254a8dfa3..fa14b25df 100755 --- a/test/case/ietf_interfaces/iface_phys_address.py +++ b/test/case/ietf_interfaces/iface_phys_address/test.py @@ -8,7 +8,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") _, tport = env.ltop.xlate("target", "data") pmac = iface.get_phys_address(target, tport) diff --git a/test/case/ietf_interfaces/iface_phys_address/topology.dot b/test/case/ietf_interfaces/iface_phys_address/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/ietf_interfaces/iface_phys_address/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/ietf_interfaces/iface_status.py b/test/case/ietf_interfaces/iface_status/test.py similarity index 97% rename from test/case/ietf_interfaces/iface_status.py rename to test/case/ietf_interfaces/iface_status/test.py index 4965be52a..6a49094fa 100755 --- a/test/case/ietf_interfaces/iface_status.py +++ b/test/case/ietf_interfaces/iface_status/test.py @@ -2,6 +2,7 @@ import infamy import infamy.iface as iface +import os def print_err_msg(interface, param, val): @@ -27,7 +28,7 @@ def asser_iface_exists(target, interface): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") iface.print_all(target) diff --git a/test/case/ietf_interfaces/iface_status/topology.dot b/test/case/ietf_interfaces/iface_status/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/ietf_interfaces/iface_status/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/ietf_interfaces/ipv4_address.py b/test/case/ietf_interfaces/ipv4_address/test.py similarity index 96% rename from test/case/ietf_interfaces/ipv4_address.py rename to test/case/ietf_interfaces/ipv4_address/test.py index b0b6f1dea..3926b8cca 100755 --- a/test/case/ietf_interfaces/ipv4_address.py +++ b/test/case/ietf_interfaces/ipv4_address/test.py @@ -12,7 +12,7 @@ with infamy.Test() as test: with test.step("Setup"): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") _, interface_name = env.ltop.xlate("target", "mgmt") diff --git a/test/case/ietf_interfaces/ipv4_address/topology.dot b/test/case/ietf_interfaces/ipv4_address/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/ietf_interfaces/ipv4_address/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/ietf_interfaces/ipv6_address.py b/test/case/ietf_interfaces/ipv6_address/test.py similarity index 96% rename from test/case/ietf_interfaces/ipv6_address.py rename to test/case/ietf_interfaces/ipv6_address/test.py index fc1023fdb..8c0a854c6 100755 --- a/test/case/ietf_interfaces/ipv6_address.py +++ b/test/case/ietf_interfaces/ipv6_address/test.py @@ -6,7 +6,7 @@ with infamy.Test() as test: with test.step("Initializing ..."): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") tgtssh = env.attach("target", "mgmt", "ssh") diff --git a/test/case/ietf_interfaces/ipv6_address/topology.dot b/test/case/ietf_interfaces/ipv6_address/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/ietf_interfaces/ipv6_address/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/ietf_interfaces/routing_basic.py b/test/case/ietf_interfaces/routing_basic/test.py similarity index 98% rename from test/case/ietf_interfaces/routing_basic.py rename to test/case/ietf_interfaces/routing_basic/test.py index 61149046c..39bc737d3 100755 --- a/test/case/ietf_interfaces/routing_basic.py +++ b/test/case/ietf_interfaces/routing_basic/test.py @@ -50,7 +50,7 @@ def config_target(target, tport0, tport1, enable_fwd): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x3")) + env = infamy.Env() target = env.attach("target", "mgmt") _, tport0 = env.ltop.xlate("target", "data0") _, tport1 = env.ltop.xlate("target", "data1") diff --git a/test/case/ietf_interfaces/routing_basic/topology.dot b/test/case/ietf_interfaces/routing_basic/topology.dot new file mode 100644 index 000000000..3e13689c7 --- /dev/null +++ b/test/case/ietf_interfaces/routing_basic/topology.dot @@ -0,0 +1,25 @@ +graph "1x3" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | data0 | data1 }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data0 | data1 } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data0 -- target:data0 + host:data1 -- target:data1 +} \ No newline at end of file diff --git a/test/case/ietf_interfaces/vlan_ping.py b/test/case/ietf_interfaces/vlan_ping/test.py similarity index 97% rename from test/case/ietf_interfaces/vlan_ping.py rename to test/case/ietf_interfaces/vlan_ping/test.py index 33216be3b..ff616d433 100755 --- a/test/case/ietf_interfaces/vlan_ping.py +++ b/test/case/ietf_interfaces/vlan_ping/test.py @@ -22,7 +22,7 @@ def test_ping(hport, should_pass): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Configure VLAN 10 on target:data with IP 10.0.0.2"): diff --git a/test/case/ietf_interfaces/vlan_ping/topology.dot b/test/case/ietf_interfaces/vlan_ping/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/ietf_interfaces/vlan_ping/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/ietf_routing/all.yaml b/test/case/ietf_routing/all.yaml deleted file mode 100644 index 1f24bd383..000000000 --- a/test/case/ietf_routing/all.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- case: static_routing.py -- case: ospf_basic.py -- case: ospf_unnumbered_interface.py -- case: ospf_multiarea.py diff --git a/test/case/ietf_routing/ietf_routing.yaml b/test/case/ietf_routing/ietf_routing.yaml new file mode 100644 index 000000000..633f3a111 --- /dev/null +++ b/test/case/ietf_routing/ietf_routing.yaml @@ -0,0 +1,12 @@ +--- +- name: static_routing + case: static_routing/test.py + +- name: ospf_basic + case: ospf_basic/test.py + +- name: ospf_unnumbered_interface + case: ospf_unnumbered_interface/test.py + +- name: ospf_multiarea + case: ospf_multiarea/test.py diff --git a/test/case/ietf_routing/ospf_basic.py b/test/case/ietf_routing/ospf_basic/test.py similarity index 99% rename from test/case/ietf_routing/ospf_basic.py rename to test/case/ietf_routing/ospf_basic/test.py index b6d8bb555..37bd519bd 100755 --- a/test/case/ietf_routing/ospf_basic.py +++ b/test/case/ietf_routing/ospf_basic/test.py @@ -153,7 +153,7 @@ def config_target2(target, link): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("2x2")) + env = infamy.Env() target1 = env.attach("target1", "mgmt") target2 = env.attach("target2", "mgmt") diff --git a/test/case/ietf_routing/ospf_basic/topology.dot b/test/case/ietf_routing/ospf_basic/topology.dot new file mode 100644 index 000000000..c3b6af0b0 --- /dev/null +++ b/test/case/ietf_routing/ospf_basic/topology.dot @@ -0,0 +1,32 @@ +graph "2x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { mgmt1 | data1 | mgmt2 | data2 }", + pos="0,12!", + kind="controller", + ]; + + target1 [ + label="{ mgmt | data | target2} | target1", + pos="10,18!", + + kind="infix", + ]; + target2 [ + label="{ target1 | mgmt | data } | target2", + pos="10,6!", + + kind="infix", + ]; + host:mgmt1 -- target1:mgmt [kind=mgmt] + host:mgmt2 -- target2:mgmt [kind=mgmt] + host:data1 -- target1:data + host:data2 -- target2:data + target1:target2 -- target2:target1 +} diff --git a/test/case/ietf_routing/ospf_multiarea.py b/test/case/ietf_routing/ospf_multiarea/test.py similarity index 99% rename from test/case/ietf_routing/ospf_multiarea.py rename to test/case/ietf_routing/ospf_multiarea/test.py index 9dc7eb2c7..b79ea3199 100755 --- a/test/case/ietf_routing/ospf_multiarea.py +++ b/test/case/ietf_routing/ospf_multiarea/test.py @@ -424,7 +424,6 @@ def config_target3(target, ring1, ring2, cross, link): } }) - def config_target4(target, ring1, ring2, cross, link): target.put_config_dict("ietf-interfaces", { "interfaces": { @@ -540,7 +539,7 @@ def disable_link(target, link): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("ring-4-duts")) + env = infamy.Env() dut1 = env.attach("dut1", "mgmt") dut2 = env.attach("dut2", "mgmt") dut3 = env.attach("dut3", "mgmt") diff --git a/test/case/ietf_routing/ospf_multiarea/topology.dot b/test/case/ietf_routing/ospf_multiarea/topology.dot new file mode 100644 index 000000000..844e7b967 --- /dev/null +++ b/test/case/ietf_routing/ospf_multiarea/topology.dot @@ -0,0 +1,59 @@ +graph "ring-4-duts" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { mgmt1 | data1 | mgmt2 | data20 | data2 | mgmt3 | data3 | mgmt4 | data4 }", + pos="0,15!", + kind="controller", + ]; + + dut1 [ + label="{ mgmt | data | ring1 } | dut1 | { ring2 | cross }", + pos="10,18!", + kind="infix", + ]; + + dut2 [ + label="{ mgmt | data | ring1 } | dut2 | { ring2 | cross }", + pos="10,12!", + kind="infix", + ]; + + dut3 [ + label="{ mgmt | data | ring1 } | dut2 | { ring2 | cross}", + pos="10,12!", + kind="infix", + ]; + + dut4 [ + label="{ mgmt | data | ring1 } | dut2 | { ring2 | cross }", + pos="10,12!", + kind="infix", + ]; + + host:mgmt1 -- dut1:mgmt [kind=mgmt] + host:mgmt2 -- dut2:mgmt [kind=mgmt] + host:mgmt3 -- dut3:mgmt [kind=mgmt] + host:mgmt4 -- dut4:mgmt [kind=mgmt] + + # Host-Dut links + host:data1 -- dut1:data + host:data2 -- dut2:data + host:data3 -- dut3:data + host:data4 -- dut4:data + + # Ring + dut1:ring1 -- dut2:ring2 + dut2:ring1 -- dut3:ring2 + dut3:ring1 -- dut4:ring2 + dut4:ring1 -- dut1:ring2 + + # Cross + dut1:cross -- dut3:cross + dut2:cross -- dut4:cross +} diff --git a/test/case/ietf_routing/ospf_unnumbered_interface.py b/test/case/ietf_routing/ospf_unnumbered_interface/test.py similarity index 99% rename from test/case/ietf_routing/ospf_unnumbered_interface.py rename to test/case/ietf_routing/ospf_unnumbered_interface/test.py index 2a6159617..f752b59a7 100755 --- a/test/case/ietf_routing/ospf_unnumbered_interface.py +++ b/test/case/ietf_routing/ospf_unnumbered_interface/test.py @@ -157,7 +157,7 @@ def config_target2(target, link): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("2x2")) + env = infamy.Env() target1 = env.attach("target1", "mgmt") target2 = env.attach("target2", "mgmt") diff --git a/test/case/ietf_routing/ospf_unnumbered_interface/topology.dot b/test/case/ietf_routing/ospf_unnumbered_interface/topology.dot new file mode 100644 index 000000000..c3b6af0b0 --- /dev/null +++ b/test/case/ietf_routing/ospf_unnumbered_interface/topology.dot @@ -0,0 +1,32 @@ +graph "2x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { mgmt1 | data1 | mgmt2 | data2 }", + pos="0,12!", + kind="controller", + ]; + + target1 [ + label="{ mgmt | data | target2} | target1", + pos="10,18!", + + kind="infix", + ]; + target2 [ + label="{ target1 | mgmt | data } | target2", + pos="10,6!", + + kind="infix", + ]; + host:mgmt1 -- target1:mgmt [kind=mgmt] + host:mgmt2 -- target2:mgmt [kind=mgmt] + host:data1 -- target1:data + host:data2 -- target2:data + target1:target2 -- target2:target1 +} diff --git a/test/case/ietf_routing/static_routing.py b/test/case/ietf_routing/static_routing/test.py similarity index 99% rename from test/case/ietf_routing/static_routing.py rename to test/case/ietf_routing/static_routing/test.py index 9887da1d5..7db5ee73f 100755 --- a/test/case/ietf_routing/static_routing.py +++ b/test/case/ietf_routing/static_routing/test.py @@ -185,7 +185,7 @@ def config_target2(target, link): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("2x2")) + env = infamy.Env() target1 = env.attach("target1", "mgmt") target2 = env.attach("target2", "mgmt") diff --git a/test/case/ietf_routing/static_routing/topology.dot b/test/case/ietf_routing/static_routing/topology.dot new file mode 100644 index 000000000..c3b6af0b0 --- /dev/null +++ b/test/case/ietf_routing/static_routing/topology.dot @@ -0,0 +1,32 @@ +graph "2x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { mgmt1 | data1 | mgmt2 | data2 }", + pos="0,12!", + kind="controller", + ]; + + target1 [ + label="{ mgmt | data | target2} | target1", + pos="10,18!", + + kind="infix", + ]; + target2 [ + label="{ target1 | mgmt | data } | target2", + pos="10,6!", + + kind="infix", + ]; + host:mgmt1 -- target1:mgmt [kind=mgmt] + host:mgmt2 -- target2:mgmt [kind=mgmt] + host:data1 -- target1:data + host:data2 -- target2:data + target1:target2 -- target2:target1 +} diff --git a/test/case/ietf_routing/static_routing/topology.png b/test/case/ietf_routing/static_routing/topology.png new file mode 100644 index 000000000..bcfeb4420 Binary files /dev/null and b/test/case/ietf_routing/static_routing/topology.png differ diff --git a/test/case/ietf_syslog/all.yaml b/test/case/ietf_syslog/all.yaml deleted file mode 100644 index 281a5a281..000000000 --- a/test/case/ietf_syslog/all.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- case: basic.py -- case: remote.py diff --git a/test/case/ietf_syslog/basic.py b/test/case/ietf_syslog/basic/test.py similarity index 97% rename from test/case/ietf_syslog/basic.py rename to test/case/ietf_syslog/basic/test.py index 25974015a..a7693df06 100755 --- a/test/case/ietf_syslog/basic.py +++ b/test/case/ietf_syslog/basic/test.py @@ -9,7 +9,7 @@ with infamy.Test() as test: with test.step("Initializing ..."): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") tgtssh = env.attach("target", "mgmt", "ssh") factory = env.get_password("target") diff --git a/test/case/ietf_syslog/basic/topology.dot b/test/case/ietf_syslog/basic/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/ietf_syslog/basic/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/ietf_syslog/ietf_syslog.yaml b/test/case/ietf_syslog/ietf_syslog.yaml new file mode 100644 index 000000000..166199caf --- /dev/null +++ b/test/case/ietf_syslog/ietf_syslog.yaml @@ -0,0 +1,6 @@ +--- +- name: basic + case: basic/test.py + +- name: remote + case: remote/test.py diff --git a/test/case/ietf_syslog/remote.py b/test/case/ietf_syslog/remote/test.py similarity index 99% rename from test/case/ietf_syslog/remote.py rename to test/case/ietf_syslog/remote/test.py index b99a57c5f..5670b22b1 100755 --- a/test/case/ietf_syslog/remote.py +++ b/test/case/ietf_syslog/remote/test.py @@ -6,7 +6,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("2x2")) + env = infamy.Env() client = env.attach("target1", "mgmt") server = env.attach("target2", "mgmt") clientssh = env.attach("target1", "mgmt", "ssh") diff --git a/test/case/ietf_syslog/remote/topology.dot b/test/case/ietf_syslog/remote/topology.dot new file mode 100644 index 000000000..c3b6af0b0 --- /dev/null +++ b/test/case/ietf_syslog/remote/topology.dot @@ -0,0 +1,32 @@ +graph "2x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { mgmt1 | data1 | mgmt2 | data2 }", + pos="0,12!", + kind="controller", + ]; + + target1 [ + label="{ mgmt | data | target2} | target1", + pos="10,18!", + + kind="infix", + ]; + target2 [ + label="{ target1 | mgmt | data } | target2", + pos="10,6!", + + kind="infix", + ]; + host:mgmt1 -- target1:mgmt [kind=mgmt] + host:mgmt2 -- target2:mgmt [kind=mgmt] + host:data1 -- target1:data + host:data2 -- target2:data + target1:target2 -- target2:target1 +} diff --git a/test/case/ietf_system/add_delete_user.py b/test/case/ietf_system/add_delete_user/test.py similarity index 97% rename from test/case/ietf_system/add_delete_user.py rename to test/case/ietf_system/add_delete_user/test.py index ab01d5e6f..510bcbe49 100755 --- a/test/case/ietf_system/add_delete_user.py +++ b/test/case/ietf_system/add_delete_user/test.py @@ -19,7 +19,7 @@ def generate_restrictred_credential(): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Add new user"): diff --git a/test/case/ietf_system/add_delete_user/topology.dot b/test/case/ietf_system/add_delete_user/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/ietf_system/add_delete_user/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/ietf_system/all.yaml b/test/case/ietf_system/all.yaml deleted file mode 100644 index f970fb49a..000000000 --- a/test/case/ietf_system/all.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- case: hostname.py -- case: add_delete_user.py -- case: user_admin.py -- case: timezone.py -- case: timezone_utc_offset.py diff --git a/test/case/ietf_system/hostname.py b/test/case/ietf_system/hostname/test.py similarity index 96% rename from test/case/ietf_system/hostname.py rename to test/case/ietf_system/hostname/test.py index df500e1c3..e6f38190a 100755 --- a/test/case/ietf_system/hostname.py +++ b/test/case/ietf_system/hostname/test.py @@ -7,7 +7,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") tgtssh = env.attach("target", "mgmt", "ssh") fmt = "%h-%m" diff --git a/test/case/ietf_system/hostname/topology.dot b/test/case/ietf_system/hostname/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/ietf_system/hostname/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/ietf_system/ietf_system.yaml b/test/case/ietf_system/ietf_system.yaml new file mode 100644 index 000000000..2e3e4e56e --- /dev/null +++ b/test/case/ietf_system/ietf_system.yaml @@ -0,0 +1,15 @@ +--- +- name: hostname + case: hostname/test.py + +- name: add_delete_user + case: add_delete_user/test.py + +- name: user_admin + case: user_admin/test.py + +- name: timezone + case: timezone/test.py + +- name: timezone_utc_offset + case: timezone_utc_offset/test.py diff --git a/test/case/ietf_system/timezone.py b/test/case/ietf_system/timezone/test.py similarity index 92% rename from test/case/ietf_system/timezone.py rename to test/case/ietf_system/timezone/test.py index 32edfc248..daa324fbb 100755 --- a/test/case/ietf_system/timezone.py +++ b/test/case/ietf_system/timezone/test.py @@ -6,7 +6,7 @@ import lxml with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Set timezone"): diff --git a/test/case/ietf_system/timezone/topology.dot b/test/case/ietf_system/timezone/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/ietf_system/timezone/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/ietf_system/timezone_utc_offset.py b/test/case/ietf_system/timezone_utc_offset/test.py similarity index 91% rename from test/case/ietf_system/timezone_utc_offset.py rename to test/case/ietf_system/timezone_utc_offset/test.py index a4952b112..8f2b18209 100755 --- a/test/case/ietf_system/timezone_utc_offset.py +++ b/test/case/ietf_system/timezone_utc_offset/test.py @@ -5,7 +5,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Set timezone UTC offset"): diff --git a/test/case/ietf_system/timezone_utc_offset/topology.dot b/test/case/ietf_system/timezone_utc_offset/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/ietf_system/timezone_utc_offset/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/ietf_system/upgrade.py b/test/case/ietf_system/upgrade/test.py similarity index 97% rename from test/case/ietf_system/upgrade.py rename to test/case/ietf_system/upgrade/test.py index 831e5ab15..ec609985f 100755 --- a/test/case/ietf_system/upgrade.py +++ b/test/case/ietf_system/upgrade/test.py @@ -44,7 +44,7 @@ def __exit__(self, _, __, ___): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() if not env.args.package: print("No package supplied") test.skip() diff --git a/test/case/ietf_system/upgrade/topology.dot b/test/case/ietf_system/upgrade/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/ietf_system/upgrade/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/ietf_system/user_admin.py b/test/case/ietf_system/user_admin/test.py similarity index 98% rename from test/case/ietf_system/user_admin.py rename to test/case/ietf_system/user_admin/test.py index 2171822ac..012bb79a8 100755 --- a/test/case/ietf_system/user_admin.py +++ b/test/case/ietf_system/user_admin/test.py @@ -12,7 +12,7 @@ with infamy.Test() as test: with test.step("Initializing ..."): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") tgtssh = env.attach("target", "mgmt", "ssh") factory = env.get_password("target") diff --git a/test/case/ietf_system/user_admin/topology.dot b/test/case/ietf_system/user_admin/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/ietf_system/user_admin/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/infix_containers/all.yaml b/test/case/infix_containers/all.yaml deleted file mode 100644 index 20b251679..000000000 --- a/test/case/infix_containers/all.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- - -- case: container_basic.py -- case: container_bridge.py -- case: container_phys.py -- case: container_veth.py diff --git a/test/case/infix_containers/container_basic.py b/test/case/infix_containers/container_basic/test.py similarity index 97% rename from test/case/infix_containers/container_basic.py rename to test/case/infix_containers/container_basic/test.py index 5bc02b7c6..f2b1db486 100755 --- a/test/case/infix_containers/container_basic.py +++ b/test/case/infix_containers/container_basic/test.py @@ -18,7 +18,7 @@ def _verify(server): NAME = "web" with test.step("Set up topology and attach to target DUT"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") addr = target.get_mgmt_ip() diff --git a/test/case/infix_containers/container_basic/topology.dot b/test/case/infix_containers/container_basic/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_containers/container_basic/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_containers/container_bridge.py b/test/case/infix_containers/container_bridge/test.py similarity index 98% rename from test/case/infix_containers/container_bridge.py rename to test/case/infix_containers/container_bridge/test.py index 473f54195..bbe27ec2a 100755 --- a/test/case/infix_containers/container_bridge.py +++ b/test/case/infix_containers/container_bridge/test.py @@ -18,7 +18,7 @@ URL = f"http://{DUTIP}:8080/index.html" with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step(f"Create {NAME} container from bundled OCI image"): diff --git a/test/case/infix_containers/container_bridge/topology.dot b/test/case/infix_containers/container_bridge/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_containers/container_bridge/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_containers/container_phys.py b/test/case/infix_containers/container_phys/test.py similarity index 97% rename from test/case/infix_containers/container_phys.py rename to test/case/infix_containers/container_phys/test.py index 852379ce9..1bfc8ee27 100755 --- a/test/case/infix_containers/container_phys.py +++ b/test/case/infix_containers/container_phys/test.py @@ -16,7 +16,7 @@ URL = f"http://{DUTIP}:91/index.html" with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step(f"Create {NAME} container from bundled OCI image"): diff --git a/test/case/infix_containers/container_phys/topology.dot b/test/case/infix_containers/container_phys/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_containers/container_phys/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_containers/container_veth.py b/test/case/infix_containers/container_veth/test.py similarity index 98% rename from test/case/infix_containers/container_veth.py rename to test/case/infix_containers/container_veth/test.py index 20efca4b5..0086b9363 100755 --- a/test/case/infix_containers/container_veth.py +++ b/test/case/infix_containers/container_veth/test.py @@ -16,7 +16,7 @@ URL = f"http://{DUTIP}:91/index.html" with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step(f"Create {NAME} container from bundled OCI image"): diff --git a/test/case/infix_containers/container_veth/topology.dot b/test/case/infix_containers/container_veth/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_containers/container_veth/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_containers/infix_containers.yaml b/test/case/infix_containers/infix_containers.yaml new file mode 100644 index 000000000..0caa72fa6 --- /dev/null +++ b/test/case/infix_containers/infix_containers.yaml @@ -0,0 +1,13 @@ +--- + +- name: container_basic + case: container_basic/test.py + +- name: container_bridge + case: container_bridge/test.py + +- name: container_phys + case: container_phys/test.py + +- name: container_veth + case: container_veth/test.py diff --git a/test/case/infix_dhcp/all.yaml b/test/case/infix_dhcp/all.yaml deleted file mode 100644 index d25ec2992..000000000 --- a/test/case/infix_dhcp/all.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- case: dhcp_basic.py -- case: dhcp_router.py -- case: dhcp_routes.py diff --git a/test/case/infix_dhcp/dhcp_basic.py b/test/case/infix_dhcp/dhcp_basic/test.py similarity index 95% rename from test/case/infix_dhcp/dhcp_basic.py rename to test/case/infix_dhcp/dhcp_basic/test.py index c0e4adf79..3ee6de98c 100755 --- a/test/case/infix_dhcp/dhcp_basic.py +++ b/test/case/infix_dhcp/dhcp_basic/test.py @@ -11,7 +11,7 @@ with infamy.Test() as test: ADDRESS = '10.0.0.42' with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") _, host = env.ltop.xlate("host", "data") diff --git a/test/case/infix_dhcp/dhcp_basic/topology.dot b/test/case/infix_dhcp/dhcp_basic/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_dhcp/dhcp_basic/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_dhcp/dhcp_router.py b/test/case/infix_dhcp/dhcp_router/test.py similarity index 95% rename from test/case/infix_dhcp/dhcp_router.py rename to test/case/infix_dhcp/dhcp_router/test.py index c686f8fe5..142a66a35 100755 --- a/test/case/infix_dhcp/dhcp_router.py +++ b/test/case/infix_dhcp/dhcp_router/test.py @@ -10,7 +10,7 @@ with infamy.Test() as test: ROUTER = '192.168.0.254' with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") _, host = env.ltop.xlate("host", "data") diff --git a/test/case/infix_dhcp/dhcp_router/topology.dot b/test/case/infix_dhcp/dhcp_router/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_dhcp/dhcp_router/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_dhcp/dhcp_routes.py b/test/case/infix_dhcp/dhcp_routes/test.py similarity index 96% rename from test/case/infix_dhcp/dhcp_routes.py rename to test/case/infix_dhcp/dhcp_routes/test.py index 78e3094e3..d8350e993 100755 --- a/test/case/infix_dhcp/dhcp_routes.py +++ b/test/case/infix_dhcp/dhcp_routes/test.py @@ -11,7 +11,7 @@ PREFIX = '10.0.0.0/24' ROUTER = '192.168.0.254' with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") _, host = env.ltop.xlate("host", "data") diff --git a/test/case/infix_dhcp/dhcp_routes/topology.dot b/test/case/infix_dhcp/dhcp_routes/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_dhcp/dhcp_routes/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_dhcp/infix_dhcp.yaml b/test/case/infix_dhcp/infix_dhcp.yaml new file mode 100644 index 000000000..7aa0b4236 --- /dev/null +++ b/test/case/infix_dhcp/infix_dhcp.yaml @@ -0,0 +1,9 @@ +--- +- name: dhcp_basic + case: dhcp_basic/test.py + +- name: dhcp_router + case: dhcp_router/test.py + +- name: dhcp_routes + case: dhcp_routes/test.py diff --git a/test/case/infix_interfaces/all.yaml b/test/case/infix_interfaces/all.yaml deleted file mode 100644 index f63f902de..000000000 --- a/test/case/infix_interfaces/all.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- case: bridge_basic.py -- case: bridge_veth.py -- case: dual_bridge.py -- case: bridge_vlan.py -- case: ipv4_autoconf.py -- case: bridge_fwd_sgl_dut.py -- case: bridge_fwd_dual_dut.py -- case: bridge_vlan_separation.py -- case: igmp_basic.py -- case: igmp_vlan.py -- case: static_multicast_filters.py -- case: vlan_qos.py diff --git a/test/case/infix_interfaces/bridge_basic.py b/test/case/infix_interfaces/bridge_basic/test.py similarity index 96% rename from test/case/infix_interfaces/bridge_basic.py rename to test/case/infix_interfaces/bridge_basic/test.py index 62b5f222c..98bc34e70 100755 --- a/test/case/infix_interfaces/bridge_basic.py +++ b/test/case/infix_interfaces/bridge_basic/test.py @@ -9,7 +9,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Configure single bridge with a single physical port, bridge @ IP 10.0.0.2"): diff --git a/test/case/infix_interfaces/bridge_basic/topology.dot b/test/case/infix_interfaces/bridge_basic/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_interfaces/bridge_basic/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_interfaces/bridge_fwd_dual_dut.py b/test/case/infix_interfaces/bridge_fwd_dual_dut/test.py similarity index 99% rename from test/case/infix_interfaces/bridge_fwd_dual_dut.py rename to test/case/infix_interfaces/bridge_fwd_dual_dut/test.py index b833c9c0e..c02d7efc3 100755 --- a/test/case/infix_interfaces/bridge_fwd_dual_dut.py +++ b/test/case/infix_interfaces/bridge_fwd_dual_dut/test.py @@ -19,7 +19,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("2x4")) + env = infamy.Env() dut1 = env.attach("dut1", "mgmt") dut2 = env.attach("dut2", "mgmt") diff --git a/test/case/infix_interfaces/bridge_fwd_dual_dut/topology.dot b/test/case/infix_interfaces/bridge_fwd_dual_dut/topology.dot new file mode 100644 index 000000000..720baa3b4 --- /dev/null +++ b/test/case/infix_interfaces/bridge_fwd_dual_dut/topology.dot @@ -0,0 +1,38 @@ +graph "2x4" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { mgmt1 | data10 | data11 | mgmt2 | data20 | data21 }", + pos="0,15!", + kind="controller", + ]; + + dut1 [ + label="{ mgmt | data0 | data1 } | dut1 | { data2 }", + pos="10,18!", + + kind="infix", + ]; + + dut2 [ + label="{ mgmt | data0 | data1 } | dut2 | { data2 }", + pos="10,12!", + + kind="infix", + ]; + + host:mgmt1 -- dut1:mgmt [kind=mgmt] + host:data10 -- dut1:data0 + host:data11 -- dut1:data1 + + host:mgmt2 -- dut2:mgmt [kind=mgmt] + host:data20 -- dut2:data0 + host:data21 -- dut2:data1 + + dut1:data2 -- dut2:data2 +} \ No newline at end of file diff --git a/test/case/infix_interfaces/bridge_fwd_sgl_dut.py b/test/case/infix_interfaces/bridge_fwd_sgl_dut/test.py similarity index 97% rename from test/case/infix_interfaces/bridge_fwd_sgl_dut.py rename to test/case/infix_interfaces/bridge_fwd_sgl_dut/test.py index dd7a6ae63..5d0699fb1 100755 --- a/test/case/infix_interfaces/bridge_fwd_sgl_dut.py +++ b/test/case/infix_interfaces/bridge_fwd_sgl_dut/test.py @@ -19,7 +19,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x3")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Configure a bridge with dual physical port"): diff --git a/test/case/infix_interfaces/bridge_fwd_sgl_dut/topology.dot b/test/case/infix_interfaces/bridge_fwd_sgl_dut/topology.dot new file mode 100644 index 000000000..3e13689c7 --- /dev/null +++ b/test/case/infix_interfaces/bridge_fwd_sgl_dut/topology.dot @@ -0,0 +1,25 @@ +graph "1x3" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | data0 | data1 }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data0 | data1 } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data0 -- target:data0 + host:data1 -- target:data1 +} \ No newline at end of file diff --git a/test/case/infix_interfaces/bridge_veth.py b/test/case/infix_interfaces/bridge_veth/test.py similarity index 97% rename from test/case/infix_interfaces/bridge_veth.py rename to test/case/infix_interfaces/bridge_veth/test.py index 8d5b7554a..c1dad7403 100755 --- a/test/case/infix_interfaces/bridge_veth.py +++ b/test/case/infix_interfaces/bridge_veth/test.py @@ -9,7 +9,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Configure bridged eth port and veth pair with IP 10.0.0.2"): diff --git a/test/case/infix_interfaces/bridge_veth/topology.dot b/test/case/infix_interfaces/bridge_veth/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_interfaces/bridge_veth/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_interfaces/bridge_vlan.py b/test/case/infix_interfaces/bridge_vlan/test.py similarity index 98% rename from test/case/infix_interfaces/bridge_vlan.py rename to test/case/infix_interfaces/bridge_vlan/test.py index 423788f34..d3896300d 100755 --- a/test/case/infix_interfaces/bridge_vlan.py +++ b/test/case/infix_interfaces/bridge_vlan/test.py @@ -11,7 +11,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("2x2")) + env = infamy.Env() dut1 = env.attach("target1", "mgmt") dut2 = env.attach("target2", "mgmt") diff --git a/test/case/infix_interfaces/bridge_vlan/topology.dot b/test/case/infix_interfaces/bridge_vlan/topology.dot new file mode 100644 index 000000000..c3b6af0b0 --- /dev/null +++ b/test/case/infix_interfaces/bridge_vlan/topology.dot @@ -0,0 +1,32 @@ +graph "2x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { mgmt1 | data1 | mgmt2 | data2 }", + pos="0,12!", + kind="controller", + ]; + + target1 [ + label="{ mgmt | data | target2} | target1", + pos="10,18!", + + kind="infix", + ]; + target2 [ + label="{ target1 | mgmt | data } | target2", + pos="10,6!", + + kind="infix", + ]; + host:mgmt1 -- target1:mgmt [kind=mgmt] + host:mgmt2 -- target2:mgmt [kind=mgmt] + host:data1 -- target1:data + host:data2 -- target2:data + target1:target2 -- target2:target1 +} diff --git a/test/case/infix_interfaces/bridge_vlan_separation.py b/test/case/infix_interfaces/bridge_vlan_separation/test.py similarity index 99% rename from test/case/infix_interfaces/bridge_vlan_separation.py rename to test/case/infix_interfaces/bridge_vlan_separation/test.py index ad97b72d1..e70ce034f 100755 --- a/test/case/infix_interfaces/bridge_vlan_separation.py +++ b/test/case/infix_interfaces/bridge_vlan_separation/test.py @@ -19,7 +19,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("2x4")) + env = infamy.Env() dut1 = env.attach("dut1", "mgmt") dut2 = env.attach("dut2", "mgmt") diff --git a/test/case/infix_interfaces/bridge_vlan_separation/topology.dot b/test/case/infix_interfaces/bridge_vlan_separation/topology.dot new file mode 100644 index 000000000..720baa3b4 --- /dev/null +++ b/test/case/infix_interfaces/bridge_vlan_separation/topology.dot @@ -0,0 +1,38 @@ +graph "2x4" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { mgmt1 | data10 | data11 | mgmt2 | data20 | data21 }", + pos="0,15!", + kind="controller", + ]; + + dut1 [ + label="{ mgmt | data0 | data1 } | dut1 | { data2 }", + pos="10,18!", + + kind="infix", + ]; + + dut2 [ + label="{ mgmt | data0 | data1 } | dut2 | { data2 }", + pos="10,12!", + + kind="infix", + ]; + + host:mgmt1 -- dut1:mgmt [kind=mgmt] + host:data10 -- dut1:data0 + host:data11 -- dut1:data1 + + host:mgmt2 -- dut2:mgmt [kind=mgmt] + host:data20 -- dut2:data0 + host:data21 -- dut2:data1 + + dut1:data2 -- dut2:data2 +} \ No newline at end of file diff --git a/test/case/infix_interfaces/dual_bridge.py b/test/case/infix_interfaces/dual_bridge/test.py similarity index 98% rename from test/case/infix_interfaces/dual_bridge.py rename to test/case/infix_interfaces/dual_bridge/test.py index bb8ca184e..a06ae90fe 100755 --- a/test/case/infix_interfaces/dual_bridge.py +++ b/test/case/infix_interfaces/dual_bridge/test.py @@ -9,7 +9,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + 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"): diff --git a/test/case/infix_interfaces/dual_bridge/topology.dot b/test/case/infix_interfaces/dual_bridge/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_interfaces/dual_bridge/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_interfaces/igmp_basic.py b/test/case/infix_interfaces/igmp_basic/test.py similarity index 98% rename from test/case/infix_interfaces/igmp_basic.py rename to test/case/infix_interfaces/igmp_basic/test.py index 6c9a4121a..f626de4d3 100755 --- a/test/case/infix_interfaces/igmp_basic.py +++ b/test/case/infix_interfaces/igmp_basic/test.py @@ -22,7 +22,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x4")) + env = infamy.Env() target = env.attach("target", "mgmt") _, msend = env.ltop.xlate("target", "data0") _, mreceive = env.ltop.xlate("target", "data1") diff --git a/test/case/infix_interfaces/igmp_basic/topology.dot b/test/case/infix_interfaces/igmp_basic/topology.dot new file mode 100644 index 000000000..b8a6b5cd9 --- /dev/null +++ b/test/case/infix_interfaces/igmp_basic/topology.dot @@ -0,0 +1,26 @@ +graph "1x4" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | data0 | data1 | data2 }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data0 | data1 | data2 } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data0 -- target:data0 + host:data1 -- target:data1 + host:data2 -- target:data2 +} diff --git a/test/case/infix_interfaces/igmp_vlan.py b/test/case/infix_interfaces/igmp_vlan/test.py similarity index 99% rename from test/case/infix_interfaces/igmp_vlan.py rename to test/case/infix_interfaces/igmp_vlan/test.py index 386bd4102..1e9047a16 100755 --- a/test/case/infix_interfaces/igmp_vlan.py +++ b/test/case/infix_interfaces/igmp_vlan/test.py @@ -30,7 +30,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("2x4")) + env = infamy.Env() dut1 = env.attach("dut1", "mgmt") _, d1send = env.ltop.xlate("dut1", "data0") _, d1receiver = env.ltop.xlate("dut1", "data1") diff --git a/test/case/infix_interfaces/igmp_vlan/topology.dot b/test/case/infix_interfaces/igmp_vlan/topology.dot new file mode 100644 index 000000000..720baa3b4 --- /dev/null +++ b/test/case/infix_interfaces/igmp_vlan/topology.dot @@ -0,0 +1,38 @@ +graph "2x4" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { mgmt1 | data10 | data11 | mgmt2 | data20 | data21 }", + pos="0,15!", + kind="controller", + ]; + + dut1 [ + label="{ mgmt | data0 | data1 } | dut1 | { data2 }", + pos="10,18!", + + kind="infix", + ]; + + dut2 [ + label="{ mgmt | data0 | data1 } | dut2 | { data2 }", + pos="10,12!", + + kind="infix", + ]; + + host:mgmt1 -- dut1:mgmt [kind=mgmt] + host:data10 -- dut1:data0 + host:data11 -- dut1:data1 + + host:mgmt2 -- dut2:mgmt [kind=mgmt] + host:data20 -- dut2:data0 + host:data21 -- dut2:data1 + + dut1:data2 -- dut2:data2 +} \ No newline at end of file diff --git a/test/case/infix_interfaces/infix_interfaces.yaml b/test/case/infix_interfaces/infix_interfaces.yaml new file mode 100644 index 000000000..5b77915e1 --- /dev/null +++ b/test/case/infix_interfaces/infix_interfaces.yaml @@ -0,0 +1,36 @@ +--- +- name: bridge_basic + case: bridge_basic/test.py + +- name: bridge_veth + case: bridge_veth/test.py + +- name: dual_bridge + case: dual_bridge/test.py + +- name: bridge_vlan + case: bridge_vlan/test.py + +- name: ipv4_autoconf + case: ipv4_autoconf/test.py + +- name: bridge_fwd_sgl_dut + case: bridge_fwd_sgl_dut/test.py + +- name: bridge_fwd_dual_dut + case: bridge_fwd_dual_dut/test.py + +- name: bridge_vlan_separation + case: bridge_vlan_separation/test.py + +- name: igmp_basic + case: igmp_basic/test.py + +- name: igmp_vlan + case: igmp_vlan/test.py + +- name: static_multicast_filters + case: static_multicast_filters/test.py + +- name: vlan_qos + case: vlan_qos/test.py diff --git a/test/case/infix_interfaces/ipv4_autoconf.py b/test/case/infix_interfaces/ipv4_autoconf/test.py similarity index 95% rename from test/case/infix_interfaces/ipv4_autoconf.py rename to test/case/infix_interfaces/ipv4_autoconf/test.py index 4acf539be..444a57d14 100755 --- a/test/case/infix_interfaces/ipv4_autoconf.py +++ b/test/case/infix_interfaces/ipv4_autoconf/test.py @@ -20,7 +20,7 @@ def has_linklocal(target, iface): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Configure an interface with IPv4 ZeroConf IP"): diff --git a/test/case/infix_interfaces/ipv4_autoconf/topology.dot b/test/case/infix_interfaces/ipv4_autoconf/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_interfaces/ipv4_autoconf/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/infix_interfaces/static_multicast_filters.py b/test/case/infix_interfaces/static_multicast_filters/test.py similarity index 99% rename from test/case/infix_interfaces/static_multicast_filters.py rename to test/case/infix_interfaces/static_multicast_filters/test.py index eb75998fd..57ecb5ea6 100755 --- a/test/case/infix_interfaces/static_multicast_filters.py +++ b/test/case/infix_interfaces/static_multicast_filters/test.py @@ -49,7 +49,7 @@ def set_static_multicast_filter(target, address, port): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x4")) + env = infamy.Env() target = env.attach("target", "mgmt") _, msend = env.ltop.xlate("target", "data0") _, mreceive = env.ltop.xlate("target", "data1") diff --git a/test/case/infix_interfaces/static_multicast_filters/topology.dot b/test/case/infix_interfaces/static_multicast_filters/topology.dot new file mode 100644 index 000000000..b8a6b5cd9 --- /dev/null +++ b/test/case/infix_interfaces/static_multicast_filters/topology.dot @@ -0,0 +1,26 @@ +graph "1x4" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | data0 | data1 | data2 }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data0 | data1 | data2 } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data0 -- target:data0 + host:data1 -- target:data1 + host:data2 -- target:data2 +} diff --git a/test/case/infix_interfaces/vlan_qos.py b/test/case/infix_interfaces/vlan_qos/test.py similarity index 99% rename from test/case/infix_interfaces/vlan_qos.py rename to test/case/infix_interfaces/vlan_qos/test.py index a0a693daa..3e17f9ce3 100755 --- a/test/case/infix_interfaces/vlan_qos.py +++ b/test/case/infix_interfaces/vlan_qos/test.py @@ -31,7 +31,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x3")) + env = infamy.Env() target = env.attach("target", "mgmt") _, td0 = env.ltop.xlate("target", "data0") _, td1 = env.ltop.xlate("target", "data1") diff --git a/test/case/infix_interfaces/vlan_qos/topology.dot b/test/case/infix_interfaces/vlan_qos/topology.dot new file mode 100644 index 000000000..3e13689c7 --- /dev/null +++ b/test/case/infix_interfaces/vlan_qos/topology.dot @@ -0,0 +1,25 @@ +graph "1x3" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | data0 | data1 }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data0 | data1 } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data0 -- target:data0 + host:data1 -- target:data1 +} \ No newline at end of file diff --git a/test/case/infix_services/all.yaml b/test/case/infix_services/all.yaml deleted file mode 100644 index 65c45dc96..000000000 --- a/test/case/infix_services/all.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# Too flaky, disabled for now, needs an LLDP discovery/client function -- case: services_basic.py diff --git a/test/case/infix_services/infix_services.yaml b/test/case/infix_services/infix_services.yaml new file mode 100644 index 000000000..1e208be7d --- /dev/null +++ b/test/case/infix_services/infix_services.yaml @@ -0,0 +1,4 @@ +--- + +- name: services_basic + case: services_basic/test.py diff --git a/test/case/infix_services/services_basic.py b/test/case/infix_services/services_basic/test.py similarity index 98% rename from test/case/infix_services/services_basic.py rename to test/case/infix_services/services_basic/test.py index 339ce2797..d13edbc68 100755 --- a/test/case/infix_services/services_basic.py +++ b/test/case/infix_services/services_basic/test.py @@ -61,7 +61,7 @@ def verify(enabled, sec): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x2")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Set static IPv4 address and disable services"): diff --git a/test/case/infix_services/services_basic/topology.dot b/test/case/infix_services/services_basic/topology.dot new file mode 100644 index 000000000..1e367f14c --- /dev/null +++ b/test/case/infix_services/services_basic/topology.dot @@ -0,0 +1,24 @@ +graph "1x2" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt | | data }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt | data } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] + host:data -- target:data +} diff --git a/test/case/meta/wait.py b/test/case/meta/wait.py index 493fbd1e8..ff6c4ef9f 100755 --- a/test/case/meta/wait.py +++ b/test/case/meta/wait.py @@ -33,7 +33,8 @@ def netconf_syn(neigh): with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env() + # The test is designed to be run on a physical topology. + env = infamy.Env(ltop=False) ctrl = env.ptop.get_ctrl() infixen = env.ptop.get_infixen() diff --git a/test/case/misc/all.yaml b/test/case/misc/all.yaml deleted file mode 100644 index c2097547d..000000000 --- a/test/case/misc/all.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- case: operational_all.py diff --git a/test/case/misc/misc.yaml b/test/case/misc/misc.yaml new file mode 100644 index 000000000..637a99243 --- /dev/null +++ b/test/case/misc/misc.yaml @@ -0,0 +1,6 @@ +--- +- name: operational_all + case: operational_all/test.py + +#- name: start_from_startup +# case: start_from_startup.py \ No newline at end of file diff --git a/test/case/misc/operational_all.py b/test/case/misc/operational_all/test.py similarity index 86% rename from test/case/misc/operational_all.py rename to test/case/misc/operational_all/test.py index f83ca2959..af70f08c4 100755 --- a/test/case/misc/operational_all.py +++ b/test/case/misc/operational_all/test.py @@ -7,7 +7,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Get all Operational data"): diff --git a/test/case/misc/operational_all/topology.dot b/test/case/misc/operational_all/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/misc/operational_all/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/case/misc/start_from_startup.py b/test/case/misc/start_from_startup/test.py similarity index 94% rename from test/case/misc/start_from_startup.py rename to test/case/misc/start_from_startup/test.py index 839f9a357..166eb81bd 100755 --- a/test/case/misc/start_from_startup.py +++ b/test/case/misc/start_from_startup/test.py @@ -6,7 +6,7 @@ with infamy.Test() as test: with test.step("Initialize"): - env = infamy.Env(infamy.std_topology("1x1")) + env = infamy.Env() target = env.attach("target", "mgmt") with test.step("Configure"): diff --git a/test/case/misc/start_from_startup/topology.dot b/test/case/misc/start_from_startup/topology.dot new file mode 100644 index 000000000..dc72e816b --- /dev/null +++ b/test/case/misc/start_from_startup/topology.dot @@ -0,0 +1,23 @@ +graph "1x1" { + layout="neato"; + overlap="false"; + esep="+20"; + + node [shape=record, fontname="monospace"]; + edge [color="cornflowerblue", penwidth="2"]; + + host [ + label="host | { tgt }", + pos="0,12!", + kind="controller", + ]; + + target [ + label="{ mgmt } | target", + pos="10,12!", + + kind="infix", + ]; + + host:tgt -- target:mgmt [kind=mgmt] +} diff --git a/test/infamy/env.py b/test/infamy/env.py index 69ad60a2f..2d836110d 100644 --- a/test/infamy/env.py +++ b/test/infamy/env.py @@ -5,6 +5,7 @@ import shlex import sys import random +import inspect from . import neigh, netconf, restconf, ssh, tap, topology @@ -37,8 +38,16 @@ def __init__(self, ltop=None, argv=sys.argv[1::], environ=os.environ): self.ptop = topology.Topology(pdot) self.ltop = None - if self.args.ltop: - ldot = pydot.graph_from_dot_file(self.args.ltop)[0] + if self.args.ltop != False: + if self.args.ltop is None: + stack = inspect.stack() + caller_frame = stack[1] + top_path = caller_frame.filename + top_path = os.path.join(os.path.dirname(top_path), "topology.dot") + else: + top_path = self.args.ltop + + ldot = pydot.graph_from_dot_file(top_path)[0] self.ltop = topology.Topology(ldot) if not self.ltop.map_to(self.ptop): raise tap.TestSkip()