diff --git a/test/case/infix_dhcp/dhcp_basic/test.py b/test/case/infix_dhcp/dhcp_basic/test.py index bd7d0328..e5eecf4c 100755 --- a/test/case/infix_dhcp/dhcp_basic/test.py +++ b/test/case/infix_dhcp/dhcp_basic/test.py @@ -18,13 +18,13 @@ with infamy.Test() as test: ADDRESS = '10.0.0.42' with test.step("Initialize"): env = infamy.Env() - target = env.attach("target", "mgmt") + client = env.attach("client", "mgmt") _, host = env.ltop.xlate("host", "data") with infamy.IsolatedMacVlan(host) as netns: netns.addip("10.0.0.1") with infamy.dhcp.Server(netns, ip=ADDRESS): - _, port = env.ltop.xlate("target", "data") + _, port = env.ltop.xlate("client", "data") config = { "dhcp-client": { "client-if": [{ @@ -32,9 +32,9 @@ with infamy.Test() as test: }] } } - target.put_config_dict("infix-dhcp-client", config) + client.put_config_dict("infix-dhcp-client", config) with test.step(f"Waiting for client to set DHCP lease {ADDRESS}"): - until(lambda: iface.address_exist(target, port, ADDRESS)) + until(lambda: iface.address_exist(client, port, ADDRESS)) test.succeed() diff --git a/test/case/infix_dhcp/dhcp_basic/topology.dot b/test/case/infix_dhcp/dhcp_basic/topology.dot index 1e367f14..5b31e599 100644 --- a/test/case/infix_dhcp/dhcp_basic/topology.dot +++ b/test/case/infix_dhcp/dhcp_basic/topology.dot @@ -1,24 +1,23 @@ graph "1x2" { layout="neato"; overlap="false"; - esep="+20"; + esep="+80"; node [shape=record, fontname="monospace"]; edge [color="cornflowerblue", penwidth="2"]; host [ - label="host | { tgt | | data }", - pos="0,12!", + label="host \n(10.0.0.1) | { tgt | data }", + pos="0,20!", kind="controller", ]; - target [ - label="{ mgmt | data } | target", - pos="10,12!", - + client [ + label="{ mgmt | data } | client", + pos="200,20!", kind="infix", ]; - host:tgt -- target:mgmt [kind=mgmt] - host:data -- target:data + host:tgt -- client:mgmt [kind=mgmt, color=black, taillabel="10.0.0.42/24"] + host:data -- client:data } diff --git a/test/case/infix_dhcp/dhcp_basic/topology.png b/test/case/infix_dhcp/dhcp_basic/topology.png index 953e7544..23cd9b41 100644 Binary files a/test/case/infix_dhcp/dhcp_basic/topology.png and b/test/case/infix_dhcp/dhcp_basic/topology.png differ diff --git a/test/case/infix_dhcp/dhcp_router/test.py b/test/case/infix_dhcp/dhcp_router/test.py index 5fc9f381..5230f7c5 100755 --- a/test/case/infix_dhcp/dhcp_router/test.py +++ b/test/case/infix_dhcp/dhcp_router/test.py @@ -16,13 +16,13 @@ with infamy.Test() as test: ROUTER = '192.168.0.254' with test.step("Initialize"): env = infamy.Env() - target = env.attach("target", "mgmt") + client = env.attach("client", "mgmt") _, host = env.ltop.xlate("host", "data") with infamy.IsolatedMacVlan(host) as netns: netns.addip("192.168.0.1") with infamy.dhcp.Server(netns, router=ROUTER): - _, port = env.ltop.xlate("target", "data") + _, port = env.ltop.xlate("client", "data") config = { "dhcp-client": { "client-if": [{ @@ -33,9 +33,9 @@ with infamy.Test() as test: }] } } - target.put_config_dict("infix-dhcp-client", config) + client.put_config_dict("infix-dhcp-client", config) with test.step(f"Wait for client to set up default route via {ROUTER}"): - until(lambda: route.ipv4_route_exist(target, "0.0.0.0/0", ROUTER)) + until(lambda: route.ipv4_route_exist(client, "0.0.0.0/0", ROUTER)) test.succeed() diff --git a/test/case/infix_dhcp/dhcp_router/topology.dot b/test/case/infix_dhcp/dhcp_router/topology.dot index 1e367f14..97c610cf 100644 --- a/test/case/infix_dhcp/dhcp_router/topology.dot +++ b/test/case/infix_dhcp/dhcp_router/topology.dot @@ -1,24 +1,23 @@ graph "1x2" { layout="neato"; overlap="false"; - esep="+20"; + esep="+80"; node [shape=record, fontname="monospace"]; edge [color="cornflowerblue", penwidth="2"]; host [ - label="host | { tgt | | data }", - pos="0,12!", + label="host \n(192.168.0.1) | { tgt | data }", + pos="0,20!", kind="controller", ]; - target [ - label="{ mgmt | data } | target", - pos="10,12!", - + client [ + label="{ mgmt | data } | client", + pos="200,20!", kind="infix", ]; - host:tgt -- target:mgmt [kind=mgmt] - host:data -- target:data + host:tgt -- client:mgmt [kind=mgmt, color=black, taillabel="192.168.0.254/24"] + host:data -- client:data } diff --git a/test/case/infix_dhcp/dhcp_router/topology.png b/test/case/infix_dhcp/dhcp_router/topology.png index 953e7544..27108b32 100644 Binary files a/test/case/infix_dhcp/dhcp_router/topology.png and b/test/case/infix_dhcp/dhcp_router/topology.png differ diff --git a/test/case/infix_dhcp/dhcp_routes/test.py b/test/case/infix_dhcp/dhcp_routes/test.py index 864f3a16..c20f717c 100755 --- a/test/case/infix_dhcp/dhcp_routes/test.py +++ b/test/case/infix_dhcp/dhcp_routes/test.py @@ -17,13 +17,13 @@ with infamy.Test() as test: ROUTER = '192.168.0.254' with test.step("Initialize"): env = infamy.Env() - target = env.attach("target", "mgmt") + client = env.attach("client", "mgmt") _, host = env.ltop.xlate("host", "data") with infamy.IsolatedMacVlan(host) as netns: netns.addip("192.168.0.1") with infamy.dhcp.Server(netns, prefix=PREFIX, router=ROUTER): - _, port = env.ltop.xlate("target", "data") + _, port = env.ltop.xlate("client", "data") config = { "dhcp-client": { "client-if": [{ @@ -35,13 +35,13 @@ with infamy.Test() as test: }] } } - target.put_config_dict("infix-dhcp-client", config) + client.put_config_dict("infix-dhcp-client", config) with test.step(f"Verify client sets up correct route via {ROUTER}"): # Wait for client to set the classless static route, option 121 - until(lambda: route.ipv4_route_exist(target, PREFIX, ROUTER)) + until(lambda: route.ipv4_route_exist(client, PREFIX, ROUTER)) # Ensure client did *not* use option 3 (option 121 takes precedence) - if route.ipv4_route_exist(target, "0.0.0.0/0", ROUTER): + if route.ipv4_route_exist(client, "0.0.0.0/0", ROUTER): test.fail() test.succeed() diff --git a/test/case/infix_dhcp/dhcp_routes/topology.dot b/test/case/infix_dhcp/dhcp_routes/topology.dot index 1e367f14..5090ad16 100644 --- a/test/case/infix_dhcp/dhcp_routes/topology.dot +++ b/test/case/infix_dhcp/dhcp_routes/topology.dot @@ -1,24 +1,23 @@ graph "1x2" { layout="neato"; overlap="false"; - esep="+20"; + esep="+100"; node [shape=record, fontname="monospace"]; edge [color="cornflowerblue", penwidth="2"]; host [ - label="host | { tgt | | data }", - pos="0,12!", + label="host \n(10.0.0.0/24) | { tgt | data }", + pos="0,20!", kind="controller", ]; - target [ - label="{ mgmt | data } | target", - pos="10,12!", - + client [ + label="{ mgmt | data } | client", + pos="200,20!", kind="infix", ]; - host:tgt -- target:mgmt [kind=mgmt] - host:data -- target:data + host:tgt -- client:mgmt [kind=mgmt, color=black, taillabel="192.168.0.254/24"] + host:data -- client:data } diff --git a/test/case/infix_dhcp/dhcp_routes/topology.png b/test/case/infix_dhcp/dhcp_routes/topology.png index 953e7544..84847fd3 100644 Binary files a/test/case/infix_dhcp/dhcp_routes/topology.png and b/test/case/infix_dhcp/dhcp_routes/topology.png differ