Merge pull request #726 from kernelkit/jovatn/test-cases-minor-updates

Formatting fixes for test specification and topologies
This commit is contained in:
jovatn
2024-10-17 15:52:14 +02:00
committed by GitHub
50 changed files with 183 additions and 128 deletions
+3
View File
@@ -40,3 +40,6 @@ include::vlan_qos/Readme.adoc[]
include::verify_all_interface_types/Readme.adoc[]
include::iface_enable_disable/Readme.adoc[]
include::veth_delete/Readme.adoc[]
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 10 KiB

@@ -4,20 +4,21 @@ 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 | | link [ DUT2 ] |
| br0 -----|-------|----- br0 |
| / | | / \ |
| mgmt data1 | | data1 data2 mgmt |
'-------------------------' '-------------------------'
| | | | |
| | | | |
.---------------------------------------------------------------.
| mgmt1 data11 data21 data22 mgmt2 |
| [10.0.0.2] [10.0.0.3] [10.0.0.4] |
| (ns11) (ns20) (ns21) |
| |
| [ HOST ] |
'---------------------------------------------------------------'
....
@@ -6,20 +6,21 @@ 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 | | link [ DUT2 ] |
| br0 -----|-------|----- br0 |
| / | | / \ |
| mgmt data1 | | data1 data2 mgmt |
'-------------------------' '-------------------------'
| | | | |
| | | | |
.---------------------------------------------------------------.
| mgmt1 data11 data21 data22 mgmt2 |
| [10.0.0.2] [10.0.0.3] [10.0.0.4] |
| (ns11) (ns20) (ns21) |
| |
| [ HOST ] |
'---------------------------------------------------------------'
....
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

@@ -37,7 +37,7 @@ endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUT
. Configure a bridge with dual physical port
. Verify ping from host:data0 to 10.0.0.1
. Verify ping from host:data1 to 10.0.0.2
<<<
@@ -62,7 +62,7 @@ with infamy.Test() as test:
}
})
with test.step("Verify ping from host:data0 to 10.0.0.1"):
with test.step("Verify ping from host:data1 to 10.0.0.2"):
_, hport1 = env.ltop.xlate("host", "data1")
_, hport2 = env.ltop.xlate("host", "data2")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

@@ -17,16 +17,17 @@ image::topology.png[Custom MAC address on interface topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Verify target:data MAC address is reset to default
. Initialize
. Set up topology and attach to target DUT
. Set target:data static MAC address '02:01:00:c0:ff:ee'
. Verify target:mgmt has MAC address '02:01:00:c0:ff:ee'
. Reset target:mgmt MAC address to default
. Verify target:data has MAC address '02:01:00:c0:ff:ee'
. Reset target:data MAC address to default
. Verify target:data MAC address is reset to default
. Set target:data to chassis MAC
. Verify target:data has chassis MAC
. Set target:data to chassis MAC + offset
. Verify target:data has chassis MAC + offset
. Reset target:mgmt MAC address to default
. Reset target:data MAC address to default
. Verify target:data MAC address is reset to default
<<<
@@ -27,19 +27,17 @@ def calc_mac(base_mac, mac_offset):
return ':'.join(f'{x:02x}' for x in result)
def reset_mac(tgt, port, mac):
def reset_mac(tgt, port):
"""Reset DUT interface MAC address to default."""
node = "infix-interfaces:custom-phys-address"
xpath = iface.get_xpath(port, node)
tgt.delete_xpath(xpath)
with test.step("Verify target:data MAC address is reset to default"):
until(lambda: iface.get_phys_address(tgt, tport) == mac)
with infamy.Test() as test:
CMD = "jq -r '.[\"mac-address\"]' /run/system.json"
with test.step("Initialize"):
with test.step("Set up topology and attach to target DUT"):
env = infamy.Env()
target = env.attach("target", "mgmt")
tgtssh = env.attach("target", "mgmt", "ssh")
@@ -65,14 +63,17 @@ with infamy.Test() as test:
}
target.put_config_dict("ietf-interfaces", config)
with test.step("Verify target:mgmt has MAC address '02:01:00:c0:ff:ee'"):
with test.step("Verify target:data has MAC address '02:01:00:c0:ff:ee'"):
mac = iface.get_phys_address(target, tport)
print(f"Current MAC: {mac}, should be: {STATIC}")
assert mac == STATIC
with test.step("Reset target:mgmt MAC address to default"):
reset_mac(target, tport, pmac)
with test.step("Reset target:data MAC address to default"):
reset_mac(target, tport)
with test.step("Verify target:data MAC address is reset to default"):
until(lambda: iface.get_phys_address(target, tport) == pmac)
with test.step("Set target:data to chassis MAC"):
config = {
"interfaces": {
@@ -113,7 +114,11 @@ with infamy.Test() as test:
print(f"Current MAC: {mac}, should be: {BMAC} (calculated)")
assert mac == BMAC
with test.step("Reset target:mgmt MAC address to default"):
reset_mac(target, tport, pmac)
with test.step("Reset target:data MAC address to default"):
reset_mac(target, tport)
with test.step("Verify target:data MAC address is reset to default"):
until(lambda: iface.get_phys_address(target, tport) == pmac)
test.succeed()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@@ -3,26 +3,20 @@
Test tagged IGMP control traffic and that VLAN separation is respected for multicast
....
VLAN55 VLAN77 VLAN55 VLAN77
10.0.1.1 10.0.2.1 10.0.1.2 10.0.2.2
\ / \ /
\ / \ /
\ / \ /
\--------------/ VLAN 1,2 T \---------------/
| DUT1 +---------------------------------+ DUT2 |
| |dut1:link dut2:link| |
+--------------+ +-----+---------+
| | | |
dut1:data1| |dut1:data2 dut2:data1| |dut2:data2
VLAN55 U | | VLAN77 U VLAN55 U | | VLAN77 U
| | | |
| | | |
+-------+ | +----------+ +------------+ +--------+
| msend +--+ | mreceive | | mreceive | | msend |
+-------+ +----------+ +------------+ +--------+
10.0.1.11 10.0.2.11 10.0.1.22 10.0.2.22
....
==== Topology
@@ -5,26 +5,20 @@ IGMP VLAN
Test tagged IGMP control traffic and that VLAN separation is respected for multicast
....
VLAN55 VLAN77 VLAN55 VLAN77
10.0.1.1 10.0.2.1 10.0.1.2 10.0.2.2
\ / \ /
\ / \ /
\ / \ /
\--------------/ VLAN 1,2 T \---------------/
| DUT1 +---------------------------------+ DUT2 |
| |dut1:link dut2:link| |
+--------------+ +-----+---------+
| | | |
dut1:data1| |dut1:data2 dut2:data1| |dut2:data2
VLAN55 U | | VLAN77 U VLAN55 U | | VLAN77 U
| | | |
| | | |
+-------+ | +----------+ +------------+ +--------+
| msend +--+ | mreceive | | mreceive | | msend |
+-------+ +----------+ +------------+ +--------+
10.0.1.11 10.0.2.11 10.0.1.22 10.0.2.22
....
"""
@@ -18,12 +18,12 @@ endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to target DUT
. Configure interface target:mgmt with IPv4 ZeroConf IP
. Verify link-local address exist on target:mgmt
. Configure target:mgmt with a specific IPv4 ZeroConf IP
. Verify target:mgmt has link-local address 169.254.42.42
. Remove IPv4 link-local addresses from target:mgmt
. Verify link-local addresses has been removed from target:mgmt
. Configure interface target:data with IPv4 ZeroConf IP
. Verify link-local address exist on target:data
. Configure target:data with a specific IPv4 ZeroConf IP
. Verify target:data has link-local address 169.254.42.42
. Remove IPv4 link-local addresses from target:data
. Verify link-local addresses has been removed from target:data
<<<
@@ -47,7 +47,7 @@ with infamy.Test() as test:
env = infamy.Env()
target = env.attach("target", "mgmt")
with test.step("Configure interface target:mgmt with IPv4 ZeroConf IP"):
with test.step("Configure interface target:data with IPv4 ZeroConf IP"):
_, tport = env.ltop.xlate("target", "data")
target.put_config_dict("ietf-interfaces", {
@@ -66,10 +66,10 @@ with infamy.Test() as test:
}
})
with test.step("Verify link-local address exist on target:mgmt"):
with test.step("Verify link-local address exist on target:data"):
until(lambda: has_linklocal(target, tport), attempts=30)
with test.step("Configure target:mgmt with a specific IPv4 ZeroConf IP"):
with test.step("Configure target:data with a specific IPv4 ZeroConf IP"):
_, tport = env.ltop.xlate("target", "data")
target.put_config_dict("ietf-interfaces", {
@@ -89,16 +89,16 @@ with infamy.Test() as test:
}
})
with test.step("Verify target:mgmt has link-local address 169.254.42.42"):
with test.step("Verify target:data has link-local address 169.254.42.42"):
until(lambda: has_linklocal(target, tport, request="169.254.42.42"),
attempts=30)
with test.step("Remove IPv4 link-local addresses from target:mgmt"):
with test.step("Remove IPv4 link-local addresses from target:data"):
xpath = f"/ietf-interfaces:interfaces/interface[name='{tport}']" \
"/ietf-ip:ipv4/infix-ip:autoconf"
target.delete_xpath(xpath)
with test.step("Verify link-local addresses has been removed from target:mgmt"):
with test.step("Verify link-local addresses has been removed from target:data"):
until(lambda: no_linklocal(target, tport), attempts=30)
test.succeed()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@@ -1,7 +1,7 @@
=== Verify that VETH pairs can be deleted
==== Description
```
veth0b veth0a e1 e2
veth0b veth0a data1 data2
`---------'
```
@@ -21,13 +21,13 @@ image::topology.png[Verify that VETH pairs can be deleted topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Initialize
. Set up topology and attach to target DUT
. Create VETH pair
. Verify interfaces 'veth0a' and 'veth0b' exists
. Set IP address on target:eth0 (dummy op)
. Set IP address on target:eth1 (dummy op)
. Verify interfaces 'veth0a' and 'veth0b' exist
. Set IP address on target:data1 (dummy op)
. Set IP address on target:data2 (dummy op)
. Reset configuration
. Verify target:eth0 and target:eth1 still exist
. Verify target:data1 and target:data2 still exist
. Verify VETH pair have been removed
+14 -14
View File
@@ -2,7 +2,7 @@
"""Verify that VETH pairs can be deleted
```
veth0b veth0a e1 e2
veth0b veth0a data1 data2
`---------'
```
@@ -16,12 +16,12 @@ import infamy.iface as iface
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")
_, eth0 = env.ltop.xlate("target", "eth0")
_, eth1 = env.ltop.xlate("target", "eth1")
_, data1 = env.ltop.xlate("target", "data1")
_, data2 = env.ltop.xlate("target", "data2")
veth0a = "veth0a"
veth0b = "veth0b"
@@ -50,17 +50,17 @@ with infamy.Test() as test:
}
})
with test.step("Verify interfaces 'veth0a' and 'veth0b' exists"):
with test.step("Verify interfaces 'veth0a' and 'veth0b' exist"):
assert iface.exist(target, veth0a), \
f"Interface <{veth0a}> does not exist."
assert iface.exist(target, veth0b), \
f"Interface <{veth0b}> does not exist."
with test.step("Set IP address on target:eth0 (dummy op)"):
with test.step("Set IP address on target:data1 (dummy op)"):
target.put_config_dict("ietf-interfaces", {
"interfaces": {
"interface": [{
"name": f"{eth0}",
"name": f"{data1}",
"ipv4": {
"address": [{
"ip": "10.0.0.1",
@@ -71,11 +71,11 @@ with infamy.Test() as test:
}
})
with test.step("Set IP address on target:eth1 (dummy op)"):
with test.step("Set IP address on target:data2 (dummy op)"):
target.put_config_dict("ietf-interfaces", {
"interfaces": {
"interface": [{
"name": f"{eth1}",
"name": f"{data2}",
"ipv4": {
"address": [{
"ip": "20.0.0.1",
@@ -96,11 +96,11 @@ with infamy.Test() as test:
# Calls target.test_reset() to apply safe-config
target = env.attach("target", "mgmt")
with test.step("Verify target:eth0 and target:eth1 still exist"):
assert iface.exist(target, eth0), \
f"Interface {eth0} missing!"
assert iface.exist(target, eth1), \
f"Interface {eth1} missing!"
with test.step("Verify target:data1 and target:data2 still exist"):
assert iface.exist(target, data1), \
f"Interface {data1} missing!"
assert iface.exist(target, data2), \
f"Interface {data2} missing!"
with test.step("Verify VETH pair have been removed"):
assert not iface.exist(target, veth0a), \
@@ -7,19 +7,19 @@ graph "1x3" {
edge [color="cornflowerblue", penwidth="2"];
host [
label="host | { <tgt> tgt | <dummy0> dummy0 | <dummy1> dummy1 }",
label="host | { <mgmt> mgmt | <data1> data1 | <data2> data2 }",
pos="0,12!",
kind="controller",
];
target [
label="{ <mgmt> mgmt | <eth0> eth0 | <eth1> eth1 } | target",
label="{ <mgmt> mgmt | <data1> data1 | <data2> data2 } | target",
pos="10,12!",
kind="infix",
];
host:tgt -- target:mgmt [kind=mgmt]
host:dummy0 -- target:eth0 [color=black]
host:dummy1 -- target:eth1 [color=black]
host:mgmt -- target:mgmt [kind=mgmt, color=lightgrey]
host:data1 -- target:data1 [color=black]
host:data2 -- target:data2 [color=black]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 10 KiB

+23 -6
View File
@@ -1,24 +1,41 @@
=== VLAN QoS
=== VLAN Interface Ingress/Egress QoS
==== Description
Inject different packets from the host and verify that the VLAN priority
is handled correctly
is handled correctly for traffic ingressing and egressing a VLAN interface.
The test verifies that ingress PCP priority is mapped correctly to internal
priority ('from pcp' or static '0..7'), and that internal priority is mapped
correctly to PCP on egress ('from internal priority' or static '0..7').
{ "id": 1, "pcp": 0, "ingress": 0, "egress": 0, "expect": 0 },
{ "id": 2, "pcp": 0, "ingress": 0, "egress": 1, "expect": 1 },
{ "id": 3, "pcp": 0, "ingress": 3, "egress": 0, "expect": 0 },
{ "id": 4, "pcp": 0, "ingress": 4, "egress": "from-priority", "expect": 4 },
{ "id": 5, "pcp": 5, "ingress": "from-pcp", "egress": "from-priority", "expect": 5 },
{ "id": 6, "pcp": 6, "ingress": "from-pcp", "egress": "from-priority", "expect": 6 },
==== Topology
ifdef::topdoc[]
image::../../test/case/ietf_interfaces/vlan_qos/topology.png[VLAN QoS topology]
image::../../test/case/ietf_interfaces/vlan_qos/topology.png[VLAN Interface Ingress/Egress QoS topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::vlan_qos/topology.png[VLAN QoS topology]
image::vlan_qos/topology.png[VLAN Interface Ingress/Egress QoS topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.png[VLAN QoS topology]
image::topology.png[VLAN Interface Ingress/Egress QoS topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Initialize
. Set up topology and attach to target DUT
. Apply initial config without priority mapping
. Setup host VLANs
. Verify that packet with id=1 egressed with pcp=0
. Verify that packet with id=2 egressed with pcp=1
. Verify that packet with id=3 egressed with pcp=0
. Verify that packet with id=4 egressed with pcp=4
. Verify that packet with id=5 egressed with pcp=5
. Verify that packet with id=6 egressed with pcp=6
<<<
+44 -9
View File
@@ -15,10 +15,23 @@
# where the tag priority is snooped, with different combinations of
# pcp<->priority mappings and verify the results.
"""
VLAN QoS
VLAN Interface Ingress/Egress QoS
Inject different packets from the host and verify that the VLAN priority
is handled correctly
is handled correctly for traffic ingressing and egressing a VLAN interface.
The test verifies that ingress PCP priority is mapped correctly to internal
priority ('from pcp' or static '0..7'), and that internal priority is mapped
correctly to PCP on egress ('from internal priority' or static '0..7').
{ "id": 1, "pcp": 0, "ingress": 0, "egress": 0, "expect": 0 },
{ "id": 2, "pcp": 0, "ingress": 0, "egress": 1, "expect": 1 },
{ "id": 3, "pcp": 0, "ingress": 3, "egress": 0, "expect": 0 },
{ "id": 4, "pcp": 0, "ingress": 4, "egress": "from-priority", "expect": 4 },
{ "id": 5, "pcp": 5, "ingress": "from-pcp", "egress": "from-priority", "expect": 5 },
{ "id": 6, "pcp": 6, "ingress": "from-pcp", "egress": "from-priority", "expect": 6 },
"""
import infamy
@@ -34,8 +47,14 @@ PACKETS = (
{ "id": 6, "pcp": 6, "ingress": "from-pcp", "egress": "from-priority", "expect": 6 },
)
def verify_priority_mapping(p):
expect = f"192.168.10.2 > 192.168.11.2: ICMP echo request, id {p['id']}"
assert expect in packets, f"Missing id={p['id']}"
expect = f"vlan 11, p {p['expect']}, ethertype IPv4 (0x0800), " + expect
assert expect in packets, f"PCP mismatch for id={p['id']}"
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")
_, td0 = env.ltop.xlate("target", "data0")
@@ -143,12 +162,28 @@ with infamy.Test() as test:
packets = pcap.tcpdump("-e")
print(packets)
for p in PACKETS:
with test.step(f"Verify that id={p['id']} was received with pcp={p['expect']}"):
expect = f"192.168.10.2 > 192.168.11.2: ICMP echo request, id {p['id']}"
assert expect in packets, f"Missing id={p['id']}"
pkt=PACKETS[0]
with test.step ("Verify that packet with id=1 egressed with pcp=0"):
verify_priority_mapping(pkt)
expect = f"vlan 11, p {p['expect']}, ethertype IPv4 (0x0800), " + expect
assert expect in packets, f"PCP mismatch for id={p['id']}"
pkt=PACKETS[1]
with test.step ("Verify that packet with id=2 egressed with pcp=1"):
verify_priority_mapping(pkt)
pkt=PACKETS[2]
with test.step ("Verify that packet with id=3 egressed with pcp=0"):
verify_priority_mapping(pkt)
pkt=PACKETS[3]
with test.step ("Verify that packet with id=4 egressed with pcp=4"):
verify_priority_mapping(pkt)
pkt=PACKETS[4]
with test.step ("Verify that packet with id=5 egressed with pcp=5"):
verify_priority_mapping(pkt)
pkt=PACKETS[5]
with test.step ("Verify that packet with id=6 egressed with pcp=6"):
verify_priority_mapping(pkt)
test.succeed()
@@ -7,7 +7,7 @@ graph "1x3" {
edge [color="cornflowerblue", penwidth="2"];
host [
label="host | { <tgt> tgt | <data0> data0 | <data1> data1 }",
label="host | { <mgmt> mgmt | <data0> data0 | <data1> data1 }",
pos="0,12!",
kind="controller",
];
@@ -19,7 +19,7 @@ graph "1x3" {
kind="infix",
];
host:tgt -- target:mgmt [kind=mgmt]
host:mgmt -- target:mgmt [kind=mgmt, color=lightgrey]
host:data0 -- target:data0 [color=black, fontcolor=black, fontsize=12, taillabel="(vlan10) 192.168.10.2/24", headlabel="192.168.10.1/24 (vlan10)"]
host:data1 -- target:data1 [color=black, fontcolor=black, fontsize=12, taillabel="(vlan11) 192.168.11.2/24", headlabel="192.168.11.1/24 (vlan11)"]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 29 KiB

+2 -2
View File
@@ -15,8 +15,8 @@ image::topology.png[Syslog Basic topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Initializing
. Configure DUT
. Set up topology and attach to target DUT
. Configure syslog on DUT to log to files '/log/bar.log' (absolute path) and 'foo' (non-absolute).
. Verify log files /var/log/foo and /var/log/bar.log have been created
+2 -2
View File
@@ -9,14 +9,14 @@ import infamy
import infamy.ssh as ssh
with infamy.Test() as test:
with test.step("Initializing"):
with test.step("Set up topology and attach to target DUT"):
env = infamy.Env()
target = env.attach("target", "mgmt")
tgtssh = env.attach("target", "mgmt", "ssh")
factory = env.get_password("target")
address = target.get_mgmt_ip()
with test.step("Configure DUT"):
with test.step("Configure syslog on DUT to log to files '/log/bar.log' (absolute path) and 'foo' (non-absolute)."):
target.put_config_dict("ietf-syslog", {
"syslog": {
"actions": {
+2 -2
View File
@@ -15,8 +15,8 @@ image::topology.png[Remote syslog topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Initialize
. Configure DUTs
. Set up topology and attach to client and server DUTs
. Configure client DUT as syslog client with server DUT as remote, and configure server DUT as syslog server
. Send security:notice log message from client
. Verify reception of client log message, incl. sorting to /log/security on server
+2 -2
View File
@@ -7,14 +7,14 @@ Verify logging to remote, acting as a remote, and RFC5424 log format.
import infamy
with infamy.Test() as test:
with test.step("Initialize"):
with test.step("Set up topology and attach to client and server DUTs"):
env = infamy.Env()
client = env.attach("client", "mgmt")
server = env.attach("server", "mgmt")
clientssh = env.attach("client", "mgmt", "ssh")
serverssh = env.attach("server", "mgmt", "ssh")
with test.step("Configure DUTs"):
with test.step("Configure client DUT as syslog client with server DUT as remote, and configure server DUT as syslog server"):
_, client_link = env.ltop.xlate("client", "link")
_, server_link = env.ltop.xlate("server", "link")
+4 -4
View File
@@ -7,13 +7,13 @@ graph "2x2" {
edge [color="cornflowerblue", penwidth="2"];
host [
label="host | { <client_mgmt> client_mgmt | <server_mgmt> server_mgmt }",
label="host | { <mgmt1> mgmt1 | <mgmt2> mgmt2 }",
pos="0,12!",
kind="controller",
];
client [
label="{ <mgmt> mgmt | <link> ĺink} | client",
label="{ <mgmt> mgmt | <link> link} | client",
pos="15,18!",
kind="infix",
@@ -24,7 +24,7 @@ graph "2x2" {
kind="infix",
];
host:cli_mgmt -- client:mgmt [kind=mgmt]
host:ser_mgmt -- server:mgmt [kind=mgmt]
host:mgmt1 -- client:mgmt [kind=mgmt, color=lightgrey]
host:mgmt2 -- server:mgmt [kind=mgmt, color=lightgrey]
client:link -- server:link [color=black, fontcolor=black, taillabel="10.0.0.2/24", headlabel="10.0.0.1/24"]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 19 KiB

+4
View File
@@ -12,3 +12,7 @@ include::user_admin/Readme.adoc[]
include::timezone/Readme.adoc[]
include::timezone_utc_offset/Readme.adoc[]
include::ssh_key_authentication/Readme.adoc[]
include::upgrade/Readme.adoc[]
+1 -1
View File
@@ -61,7 +61,7 @@ with infamy.Test() as test:
target = env.attach("target", "mgmt")
_, hport = env.ltop.xlate("host", "tgt")
_, hport = env.ltop.xlate("host", "mgmt")
_, tport = env.ltop.xlate("target", "mgmt")
hip = netifaces.ifaddresses(hport)[netifaces.AF_INET6][0]["addr"]
hip = hip.replace(f"%{hport}", f"%{tport}")
+2 -2
View File
@@ -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=lightgrey]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

@@ -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=lightgrey]
host:data -- target:data [color=black, fontcolor=black, fontsize=12, taillabel="10.0.0.1/24", headlabel="10.0.0.2/24"]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

+1 -1
View File
@@ -19,5 +19,5 @@ graph "1x1" {
kind="infix",
];
host:mgmt -- target:mgmt [kind=mgmt, color="lightgray"]
host:mgmt -- target:mgmt [kind=mgmt, color="lightgray"]
}