VlansOverBondRecipe
- class lnst.Recipes.ENRT.VlansOverBondRecipe.VlansOverBondRecipe(**kwargs)
Bases:
BondingMixin
,PerfReversibleFlowMixin
,VlanPingEvaluatorMixin
,CommonHWSubConfigMixin
,OffloadSubConfigMixin
,BaremetalEnrtRecipe
This recipe implements Enrt testing for a network scenario that looks as follows
.--------. .-------------+ switch +--------. | .---+ | | | | '--------' | .-----|---------|----. | | .---'--. .---'--. | .--'---. .-|-| eth0 |--| eth1 |-|-. .-------| eth0 |------. | | '------' '------' | | | '------' | | | bond0 | | | / | \ | | '-------/--|--\------' | | vlan0 vlan1 vlan2 | | / | \ | | id=10 id=20 id=30 | | vlan0 vlan1 vlan2 | | | | id=10 id=20 id=30 | | | | | | | | host1 | | host2 | '------------------------' '---------------------'
Refer to
BondingMixin
for parameters to configure the bonding device.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 one bonding device on the first host. This device bonds two NICs matched by the recipe. The bonding mode and miimon interval is configured on the bonding device according to the recipe parameters. Then three VLAN (802.1Q) tunnels are created on top of the bonding device on the first host and on the matched NIC on the second host. The tunnels are configured with VLAN ids from vlan0_id, vlan1_id and vlan2_id params (by default: 10, 20, 30).
An IPv4 and IPv6 address is configured on each tunnel endpoint.
host1.vlan0 = 192.168.10.1/24 and fc00:0:0:1::1/64host1.vlan1 = 192.168.20.1/24 and fc00:0:0:2::1/64host1.vlan2 = 192.168.30.1/24 and fc00:0:0:3::1/64host2.vlan0 = 192.168.10.2/24 and fc00:0:0:1::2/64host2.vlan1 = 192.168.20.2/24 and fc00:0:0:2::2/64host2.vlan2 = 192.168.30.2/24 and fc00:0:0:3::2/64
- generate_ping_endpoints(config)
The ping endpoints for this recipe are the matching VLAN tunnel endpoints of the hosts.
Returned as:
[PingEndpoints(host1.vlan0, host2.vlan0), PingEndpoints(host1.vlan1, host2.vlan1), PingEndpoints(host1.vlan2, host2.vlan2)]
- generate_perf_endpoints(config: EnrtConfiguration) list[Collection[EndpointPair[IPEndpoint]]]
The perf endpoints for this recipe are the VLAN tunnel endpoints with VLAN id from parameter vlan_ids[0] (by default: 10):
host1.vlan0 and host2.vlan0
- property offload_nics
The offload_nics property value for this scenario is a list of the physical devices carrying data of the configured VLAN tunnels:
host1.eth0, host1.eth1 and host2.eth0
For detailed explanation of this property see
OffloadSubConfigMixin
class andOffloadSubConfigMixin.offload_nics
.
- property mtu_hw_config_dev_list
The mtu_hw_config_dev_list property value for this scenario is a list of all configured VLAN tunnel devices and the underlying bonding or physical devices:
host1.bond0, host1.vlan0, host1.vlan1, host1.vlan2host2.eth0, host2.vlan0, host2.vlan1, host2.vlan2For detailed explanation of this property see
MTUHWConfigMixin
class andMTUHWConfigMixin.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 of the physical devices carrying data of the configured VLAN tunnels:
host1.eth0, host1.eth1 and host2.eth0
For detailed explanation of this property see
DevInterruptHWConfigMixin
class andDevInterruptHWConfigMixin.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 of the physical devices carrying data of the configured VLAN tunnels:
host1.eth0, host1.eth1 and host2.eth0
For detailed explanation of this property see
ParallelStreamQDiscHWConfigMixin
class andParallelStreamQDiscHWConfigMixin.parallel_stream_qdisc_hw_config_dev_list
.
- property pause_frames_dev_list
The pause_frames_dev_list property value for this scenario is a list of the physical devices carrying data of the configured VLAN tunnels:
host1.eth0, host1.eth1 and host2.eth0
For detailed explanation of this property see
PauseFramesHWConfigMixin
andPauseFramesHWConfigMixin.pause_frames_dev_list
.