TeamRecipe

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

Bases: PerfReversibleFlowMixin, CommonHWSubConfigMixin, OffloadSubConfigMixin, BaremetalEnrtRecipe

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

                            .--------.
           .----------------+        |
           |        .-------+ switch +-------.
           |        |       '--------'       |
     .-------------------.                   |
     |     | team0  |    |                   |
     | .---'--. .---'--. |               .---'--.
.----|-| eth0 |-| eth1 |-|----.     .----| eth0 |----.
|    | '------' '------' |    |     |    '------'    |
|    '-------------------'    |     |                |
|                             |     |                |
|            host1            |     |      host2     |
'-----------------------------'     '----------------'

The recipe provides additional recipe parameters to configure the teaming device.

param runner_name:

(mandatory test parameter) the teamd runner to be use on the team0 device (ex. activebackup, roundrobin, etc)

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 creating a team device using the two matched physical devices as ports on host1. The teamd daemon is configured with the runner_name according to the recipe parameters. IPv4 and IPv6 addresses are added to the teaming device and to the matched ethernet device on host2.

host1.team0 = 192.168.10.1/24 and fc00:0:0:1::1/64
host2.eth0 = 192.168.10.2/24 and fc00:0:0:1::2/64
generate_test_wide_description(config: EnrtConfiguration)

Test wide description is extended with the configured IP addresses, the configured team device ports, and runner name.

generate_ping_endpoints(config)

The ping endpoints for this recipe are the configured team device on host1 and the matched ethernet device on host2.

Returned as:

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

The perf endpoints for this recipe are the configured team device on host1 and the matched ethernet device on host2. The traffic egresses the team device.

host1.team0
host2.eth0
property offload_nics

The offload_nics property value for this scenario is a list containing the configured team device on host1 and the matched ethernet device on host2.

host1.team0
host2.eth0

For detailed explanation of this property see OffloadSubConfigMixin class and OffloadSubConfigMixin.offload_nics.

property mtu_hw_config_dev_list

The mtu_hw_config_dev_list property value for this scenario is a list containing the configured teaming device on host1 and the matched ethernet device on host2.

host1.team0
host2.eth0

For detailed explanation of this property see MTUHWConfigMixin class and MTUHWConfigMixin.mtu_hw_config_dev_list.

property dev_interrupt_hw_config_dev_list

The dev_interrupt_hw_config_dev_list property value for this scenario is a list containing the matched physical devices used to create the teaming device on host1 and the matched ethernet device on host2.

host1.eth0, host1.eth1
host2.eth0

For detailed explanation of this property see DevInterruptHWConfigMixin class and DevInterruptHWConfigMixin.dev_interrupt_hw_config_dev_list.

property parallel_stream_qdisc_hw_config_dev_list

The parallel_stream_qdisc_hw_config_dev_list property value for this scenario is a list containing the matched physical devices used to create the teaming device on host1 and the matched ethernet device on host2.

host1.eth0, host.eth1
host2.eth0

For detailed explanation of this property see ParallelStreamQDiscHWConfigMixin class and ParallelStreamQDiscHWConfigMixin.parallel_stream_qdisc_hw_config_dev_list.