From 9782ac9afab6e9e186c15cf1dffc976d1fb3cbfd Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 14 Dec 2024 22:11:35 +0100 Subject: [PATCH] test: update virt topologies, add lag This commit adds two SVGs for previewing the virtual test topologies. quad: fix a lot of copy-paste mistakes, rename nodes and ports to their correct names. Replace shell comments with C++ style comments, not all tools, e.g., dotty, support shell comments. The neato absolute positioning has also been fixed to make it possible to see all the edges, to facilitate this the used ports have been swapped around a abit. Colors are used according to the schema agreed on for tests. Finally, a second link for lag tests have been added between dut2 and dut3. dual: coloring similar to quad, update to new edge attribute matcher. Signed-off-by: Joachim Wiberg --- test/infamy/topologies/ring-4-duts.dot | 6 +- test/virt/dual/topology.dot.in | 31 +-- test/virt/dual/topology.svg | 112 +++++++++++ test/virt/quad/topology.dot.in | 51 ++--- test/virt/quad/topology.svg | 254 +++++++++++++++++++++++++ 5 files changed, 414 insertions(+), 40 deletions(-) create mode 100644 test/virt/dual/topology.svg create mode 100644 test/virt/quad/topology.svg diff --git a/test/infamy/topologies/ring-4-duts.dot b/test/infamy/topologies/ring-4-duts.dot index fb649e9b..c4c14a5c 100644 --- a/test/infamy/topologies/ring-4-duts.dot +++ b/test/infamy/topologies/ring-4-duts.dot @@ -43,19 +43,19 @@ graph "ring-4-duts" { host:mgmt3 -- R3:mgmt [kind=mgmt, color="lightgray"] host:mgmt4 -- R4:mgmt [kind=mgmt, color="lightgray"] - # host-Dut links + // host-Dut links host:data1 -- R1:data [color="darkgreen"] host:data2 -- R2:data [color="darkgreen"] host:data3 -- R3:data [color="darkgreen"] host:data4 -- R4:data [color="darkgreen"] - # Ring + // Ring R1:ring1 -- R2:ring2 [color="blue",headlabel=".2", label="10.0.12.1/30", taillabel=".1", labeldistance=1, fontcolor="blue"] R2:ring1 -- R3:ring2 [color="blue",headlabel=".2", label="10.0.23.0/30", taillabel=".1", labeldistance=1, fontcolor="blue"] R3:ring1 -- R4:ring2 [color="blue",headlabel=".2", label="192.168.4.0/24", taillabel=".1", labeldistance=1 fontcolor="blue"] R4:ring1 -- R1:ring2 [color="blue",headlabel=".2", label="10.0.41.0/30", taillabel=".1", labeldistance=1, fontcolor="blue"] - # Cross + // Cross R1:cross -- R3:cross [color="black", label="10.0.13.0/30\n\n"] R2:cross -- R4:cross [color="brown", label="\n\n10.0.24.0/30", fontcolor="brown"] } diff --git a/test/virt/dual/topology.dot.in b/test/virt/dual/topology.dot.in index 588a2ee2..3ce0fab1 100644 --- a/test/virt/dual/topology.dot.in +++ b/test/virt/dual/topology.dot.in @@ -2,7 +2,8 @@ graph "dual" { layout="neato"; overlap="false"; splines="true"; - esep="+20"; + esep="+30"; + sep="+30"; node [shape=record, fontname="monospace"]; edge [color="cornflowerblue", penwidth="2"]; @@ -14,14 +15,16 @@ graph "dual" { host [ label="host | { d1a | d1b | d1c | d2a | d2b | d2c }", - color="grey",fontcolor="grey",pos="0,15!", - kind="controller", + color="grey", + fontcolor="grey", + pos="0,15!", + provides="controller", ]; dut1 [ label="{ e1 | e2 | e3 } | dut1 | { e4 | e5 | e6 }", pos="10,18!", - kind="infix", + provides="infix", qn_console=9001, qn_mem="384M", qn_usb="dut1.usb" @@ -29,21 +32,21 @@ graph "dual" { dut2 [ label="{ e1 | e2 | e3 } | dut2 | { e4 | e5 | e6 }", pos="10,12!", - kind="infix", + provides="infix", qn_console=9002, qn_mem="384M", qn_usb="dut2.usb" ]; - host:d1a -- dut1:e1 [kind=mgmt] - host:d1b -- dut1:e2 - host:d1c -- dut1:e3 + host:d1a -- dut1:e1 [provides=mgmt, color="lightgray"] + host:d1b -- dut1:e2 [provides="ieee-mc"] + host:d1c -- dut1:e3 [provides="ieee-mc"] - host:d2a -- dut2:e1 [kind=mgmt] - host:d2b -- dut2:e2 - host:d2c -- dut2:e3 + host:d2a -- dut2:e1 [provides=mgmt, color="lightgray"] + host:d2b -- dut2:e2 [provides="ieee-mc"] + host:d2c -- dut2:e3 [provides="ieee-mc"] - dut1:e4 -- dut2:e6 - dut1:e5 -- dut2:e5 - dut1:e6 -- dut2:e4 + dut1:e4 -- dut2:e6 [color="black"] + dut1:e5 -- dut2:e5 [color="red"] + dut1:e6 -- dut2:e4 [color="black"] } diff --git a/test/virt/dual/topology.svg b/test/virt/dual/topology.svg new file mode 100644 index 00000000..c286cd29 --- /dev/null +++ b/test/virt/dual/topology.svg @@ -0,0 +1,112 @@ + + + + + + +dual + + + +host + +host + +d1a + +d1b + +d1c + +d2a + +d2b + +d2c + + + +dut1 + +e1 + +e2 + +e3 + +dut1 + +e4 + +e5 + +e6 + + + +host:d1a--dut1:e1 + + + + +host:d1b--dut1:e2 + + + + +host:d1c--dut1:e3 + + + + +dut2 + +e1 + +e2 + +e3 + +dut2 + +e4 + +e5 + +e6 + + + +host:d2a--dut2:e1 + + + + +host:d2b--dut2:e2 + + + + +host:d2c--dut2:e3 + + + + +dut1:e4--dut2:e6 + + + + +dut1:e5--dut2:e5 + + + + +dut1:e6--dut2:e4 + + + + diff --git a/test/virt/quad/topology.dot.in b/test/virt/quad/topology.dot.in index b5b56612..f548c857 100644 --- a/test/virt/quad/topology.dot.in +++ b/test/virt/quad/topology.dot.in @@ -2,7 +2,8 @@ graph "quad" { layout="neato"; overlap="false"; splines="true"; - esep="+20"; + esep="+30"; + sep="+30"; node [shape=record, fontname="monospace"]; edge [color="cornflowerblue", penwidth="2"]; @@ -13,30 +14,31 @@ graph "quad" { qn_append="quiet"; host [ - label="host | { d1a | d1b | d1c | d1d | d2a | d2b | d2c | d2d | d3a | d3b | d3c | d3d | d4a | d4b | d4c | d4d }", - color="grey",fontcolor="grey",pos="0,15!", + label="host | { d1a | d1b | d1c | d1d | d2a | d2b | d2c | d2d | d3a | d3b | d3c | d3d | d4a | d4b | d4c | d4d }", + color="grey", fontcolor="grey", + pos="-15,15!", provides="controller", ]; dut1 [ - label="{ e1 | e2 | e3 } | dut1 | { e4 | e5 | e6 | e7 | e8}", - pos="10,18!", + label="{ e1 | e2 | e3 | e4 } | dut1 | { e5 | e6 | e7 | e8}", + pos="10,30!", provides="infix", qn_console=9001, qn_mem="384M", qn_usb="dut1.usb" ]; dut2 [ - label="{ e1 | e2 | e3 } | dut2 | { e4 | e5 | e6 | e7 | e8}", - pos="10,12!", + label="{ e1 | e2 | e3 | e4 } | dut2 | { e5 | e6 | e7 | e8}", + pos="0,20!", provides="infix", qn_console=9002, qn_mem="384M", qn_usb="dut2.usb" ]; dut3 [ - label="{ e1 | e2 | e3 } | dut2 | { e4 | e5 | e6 | e7 | e8}", - pos="10,12!", + label="{ e1 | e2 | e3 | e4 } | dut3 | { e5 | e6 | e7 | e8}", + pos="0,10!", provides="infix", qn_console=9003, qn_mem="384M", @@ -44,41 +46,44 @@ graph "quad" { ]; dut4 [ - label="{ e1 | e2 | e3 } | dut2 | { e4 | e5 | e6 | e7 | e8}", - pos="10,12!", + label="{ e1 | e2 | e3 | e4 } | dut4 | { e5 | e6 | e7 | e8}", + pos="10,0!", provides="infix", qn_console=9004, qn_mem="384M", qn_usb="dut4.usb" ]; - host:d1a -- dut1:e1 [provides="mgmt"] + host:d1a -- dut1:e1 [provides="mgmt", color="lightgray"] host:d1b -- dut1:e2 [provides="ieee-mc"] host:d1c -- dut1:e3 [provides="ieee-mc"] host:d1d -- dut1:e4 [provides="ieee-mc"] - host:d2a -- dut2:e1 [provides="mgmt"] + host:d2a -- dut2:e1 [provides="mgmt", color="lightgray"] host:d2b -- dut2:e2 [provides="ieee-mc"] host:d2c -- dut2:e3 [provides="ieee-mc"] host:d2d -- dut2:e4 [provides="ieee-mc"] - host:d3a -- dut3:e1 [provides="mgmt"] + host:d3a -- dut3:e1 [provides="mgmt", color="lightgray"] host:d3b -- dut3:e2 [provides="ieee-mc"] host:d3c -- dut3:e3 [provides="ieee-mc"] host:d3d -- dut3:e4 [provides="ieee-mc"] - host:d4a -- dut4:e1 [provides="mgmt"] + host:d4a -- dut4:e1 [provides="mgmt", color="lightgray"] host:d4b -- dut4:e2 [provides="ieee-mc"] host:d4c -- dut4:e3 [provides="ieee-mc"] host:d4d -- dut4:e4 [provides="ieee-mc"] - # Ring - dut1:e5 -- dut2:e6 - dut2:e5 -- dut3:e6 - dut3:e5 -- dut4:e6 - dut4:e5 -- dut1:e6 + // Lag + dut2:e7 -- dut3:e6 [color="black", penwidth="3"] + dut2:e8 -- dut3:e5 [color="black", penwidth="3"] - # Cross-links - dut3:e7 -- dut1:e7 - dut2:e7 -- dut4:e7 + // Ring + dut1:e8 -- dut2:e5 [color="black"] + dut3:e8 -- dut4:e5 [color="black"] + dut4:e8 -- dut1:e5 [color="black"] + + // Cross-links + dut1:e6 -- dut3:e7 [color="red"] + dut2:e6 -- dut4:e7 [color="red"] } diff --git a/test/virt/quad/topology.svg b/test/virt/quad/topology.svg new file mode 100644 index 00000000..ff29e34f --- /dev/null +++ b/test/virt/quad/topology.svg @@ -0,0 +1,254 @@ + + + + + + +quad + + + +host + +host + +d1a + +d1b + +d1c + +d1d + +d2a + +d2b + +d2c + +d2d + +d3a + +d3b + +d3c + +d3d + +d4a + +d4b + +d4c + +d4d + + + +dut1 + +e1 + +e2 + +e3 + +e4 + +dut1 + +e5 + +e6 + +e7 + +e8 + + + +host:d1a--dut1:e1 + + + + +host:d1b--dut1:e2 + + + + +host:d1c--dut1:e3 + + + + +host:d1d--dut1:e4 + + + + +dut2 + +e1 + +e2 + +e3 + +e4 + +dut2 + +e5 + +e6 + +e7 + +e8 + + + +host:d2a--dut2:e1 + + + + +host:d2b--dut2:e2 + + + + +host:d2c--dut2:e3 + + + + +host:d2d--dut2:e4 + + + + +dut3 + +e1 + +e2 + +e3 + +e4 + +dut3 + +e5 + +e6 + +e7 + +e8 + + + +host:d3a--dut3:e1 + + + + +host:d3b--dut3:e2 + + + + +host:d3c--dut3:e3 + + + + +host:d3d--dut3:e4 + + + + +dut4 + +e1 + +e2 + +e3 + +e4 + +dut4 + +e5 + +e6 + +e7 + +e8 + + + +host:d4a--dut4:e1 + + + + +host:d4b--dut4:e2 + + + + +host:d4c--dut4:e3 + + + + +host:d4d--dut4:e4 + + + + +dut1:e8--dut2:e5 + + + + +dut1:e6--dut3:e7 + + + + +dut2:e7--dut3:e6 + + + + +dut2:e8--dut3:e5 + + + + +dut2:e6--dut4:e7 + + + + +dut3:e8--dut4:e5 + + + + +dut4:e8--dut1:e5 + + + +