Skip to content

Commit

Permalink
test: update virt topologies, add lag
Browse files Browse the repository at this point in the history
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: add coloring similar to quad.

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Dec 16, 2024
1 parent ace8a9a commit 13d1047
Show file tree
Hide file tree
Showing 5 changed files with 407 additions and 33 deletions.
6 changes: 3 additions & 3 deletions test/infamy/topologies/ring-4-duts.dot
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
17 changes: 10 additions & 7 deletions test/virt/dual/topology.dot.in
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand All @@ -14,7 +15,9 @@ graph "dual" {

host [
label="host | { <d1a> d1a | <d1b> d1b | <d1c> d1c | <d2a> d2a | <d2b> d2b | <d2c> d2c }",
color="grey",fontcolor="grey",pos="0,15!",
color="grey",
fontcolor="grey",
pos="0,15!",
kind="controller",
];

Expand All @@ -35,15 +38,15 @@ graph "dual" {
qn_usb="dut2.usb"
];

host:d1a -- dut1:e1 [kind=mgmt]
host:d1a -- dut1:e1 [kind=mgmt, color="lightgray"]
host:d1b -- dut1:e2
host:d1c -- dut1:e3

host:d2a -- dut2:e1 [kind=mgmt]
host:d2a -- dut2:e1 [kind=mgmt, color="lightgray"]
host:d2b -- dut2:e2
host:d2c -- dut2:e3

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"]
}
112 changes: 112 additions & 0 deletions test/virt/dual/topology.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 28 additions & 23 deletions test/virt/quad/topology.dot.in
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand All @@ -13,72 +14,76 @@ graph "quad" {
qn_append="quiet";

host [
label="host | { <d1a> d1a | <d1b> d1b | <d1c> d1c | <d1c> d1d | <d2a> d2a | <d2b> d2b | <d2c> d2c | <d2d> d2d | <d2a> d3a | <d3b> d3b | <d3c> d3c | <d3c> d3d | <d4a> d4a | <d4b> d4b | <d4c> d4c | <d4c> d4d }",
color="grey",fontcolor="grey",pos="0,15!",
label="host | { <d1a> d1a | <d1b> d1b | <d1c> d1c | <d1d> d1d | <d2a> d2a | <d2b> d2b | <d2c> d2c | <d2d> d2d | <d3a> d3a | <d3b> d3b | <d3c> d3c | <d3d> d3d | <d4a> d4a | <d4b> d4b | <d4c> d4c | <d4d> d4d }",
color="grey", fontcolor="grey",
pos="-15,15!",
kind="controller",
];

dut1 [
label="{ <e1> e1 | <e2> e2 | <e3> e3 } | dut1 | { <e4> e4 | <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="10,18!",
label="{ <e1> e1 | <e2> e2 | <e3> e3 | <e4> e4 } | dut1 | { <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="10,30!",
kind="infix",
qn_console=9001,
qn_mem="384M",
qn_usb="dut1.usb"
];
dut2 [
label="{ <e1> e1 | <e2> e2 | <e3> e3 } | dut2 | { <e4> e4 | <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="10,12!",
label="{ <e1> e1 | <e2> e2 | <e3> e3 | <e4> e4 } | dut2 | { <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="0,20!",
kind="infix",
qn_console=9002,
qn_mem="384M",
qn_usb="dut2.usb"
];
dut3 [
label="{ <e1> e1 | <e2> e2 | <e3> e3 } | dut2 | { <e4> e4 | <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="10,12!",
label="{ <e1> e1 | <e2> e2 | <e3> e3 | <e4> e4 } | dut3 | { <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="0,10!",
kind="infix",
qn_console=9003,
qn_mem="384M",
qn_usb="dut3.usb"
];

dut4 [
label="{ <e1> e1 | <e2> e2 | <e3> e3 } | dut2 | { <e4> e4 | <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="10,12!",
label="{ <e1> e1 | <e2> e2 | <e3> e3 | <e4> e4 } | dut4 | { <e5> e5 | <e6> e6 | <e7> e7 | <e8> e8}",
pos="10,0!",
kind="infix",
qn_console=9004,
qn_mem="384M",
qn_usb="dut4.usb"
];

host:d1a -- dut1:e1 [kind=mgmt]
host:d1a -- dut1:e1 [kind=mgmt, color="lightgray"]
host:d1b -- dut1:e2
host:d1c -- dut1:e3
host:d1d -- dut1:e4

host:d2a -- dut2:e1 [kind=mgmt]
host:d2a -- dut2:e1 [kind=mgmt, color="lightgray"]
host:d2b -- dut2:e2
host:d2c -- dut2:e3
host:d2d -- dut2:e4

host:d3a -- dut3:e1 [kind=mgmt]
host:d3a -- dut3:e1 [kind=mgmt, color="lightgray"]
host:d3b -- dut3:e2
host:d3c -- dut3:e3
host:d3d -- dut3:e4

host:d4a -- dut4:e1 [kind=mgmt]
host:d4a -- dut4:e1 [kind=mgmt, color="lightgray"]
host:d4b -- dut4:e2
host:d4c -- dut4:e3
host:d4d -- dut4:e4

# 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"]
}
Loading

0 comments on commit 13d1047

Please sign in to comment.