GeneveTunnelRecipe
- class lnst.Recipes.ENRT.GeneveTunnelRecipe.GeneveTunnelRecipe(**kwargs)
Bases:
CommonHWSubConfigMixin
,OffloadSubConfigMixin
,BaseTunnelRecipe
This class implements a recipe that configures a simple Geneve tunnel between two hosts.
.--------. .------| switch |-----. | '--------' | | | .-------|------. .-------|------. | .--'-. | | .--'-. | | |eth0| | | |eth0| | | '----' | | '----' | | | | | | | | | | ----' '--- | | ----' '--- | | gnv tunnel | | gnv tunnel | | ---------- | | ---------- | | | | | | host1 | | host2 | '--------------' '--------------'
The actual test machinery is implemented in the
BaseEnrtRecipe
class.The test wide configuration is implemented in the
BaseTunnelRecipe
class.The recipe provides additional parameter:
- param carrier_ipversion:
This parameter specifies whether IPv4 or IPv6 addresses are used for the underlying (carrier) network. The value is either ipv4 or ipv6
- configure_underlying_network(config: EnrtConfiguration) tuple[RemoteDevice, RemoteDevice]
The underlying network for the tunnel consists of the Ethernet devices on the matched hosts.
- create_tunnel(config: EnrtConfiguration, tunnel_endpoints: tuple[RemoteDevice, RemoteDevice]) tuple[RemoteDevice, RemoteDevice]
The Geneve tunnel devices are configured with IPv4 and IPv6 addresses.
- generate_ping_endpoints(config)
The ping endpoints for this recipe are simply the tunnel endpoints
Returned as:
[PingEndpoints(self.matched.host1.gnv_tunnel, self.matched.host2.gnv_tunnel)]
- get_packet_assert_config(ping_config)
The packet assert test configuration contains filter for ip6 protocol and grep patterns to match the ICMP or ICMP6 echo requests encapsulated by Geneve.