LinuxBridgeRecipe

class lnst.Recipes.ENRT.LinuxBridgeRecipe.LinuxBridgeRecipe(**kwargs)

Bases: CommonHWSubConfigMixin, OffloadSubConfigMixin, BaremetalEnrtRecipe

This recipe implements Enrt testing for a simple network scenario that looks as follows

            +--------+
     +------+ switch +-----+
     |      +--------+     |
  +--+-+                 +-+--+
+-|eth0|-+             +-|eth0|-+
| +----+ |             | +----+ |
|   |    |             |   |    |
|  br0   |             |  br0   |
|        |             |        |
| host1  |             | host2  |
+--------+             +--------+

All sub configurations are included via Mixin classes.

The actual test machinery is implemented in the BaseEnrtRecipe class.

test_wide_configuration()

Test wide configuration for this recipe involves adding the matched NICs into a Linux bridge and configuring an IPv4 and IPv6 address on the bridge device on both hosts.

host1.br0 = 192.168.101.1/24 and fc00::1/64

host2.br0 = 192.168.101.2/24 and fc00::2/64

generate_test_wide_description(config: EnrtConfiguration)

Test wide description is extended with the configured addresses

generate_ping_endpoints(config)

The ping endpoints for this recipe are the created bridge devices:

host1.br0 and host2.br0

Returned as:

[PingEndpoints(self.matched.host1.br0, self.matched.host2.br0)]
generate_perf_endpoints(config: EnrtConfiguration) list[Collection[EndpointPair[IPEndpoint]]]

The perf endpoints for this recipe are the created bridge devices:

host1.br0 and host2.br0