Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Recipes/ENRT/BaseEnrtRecipe.py | 3 ++-
lnst/Recipes/ENRT/BondRecipe.py | 3 ++-
lnst/Recipes/ENRT/DoubleBondRecipe.py | 3 ++-
lnst/Recipes/ENRT/DoubleTeamRecipe.py | 7 +++++--
lnst/Recipes/ENRT/NoVirtOvsVxlanRecipe.py | 3 ++-
lnst/Recipes/ENRT/SimpleNetworkRecipe.py | 3 ++-
lnst/Recipes/ENRT/TeamRecipe.py | 7 +++++--
lnst/Recipes/ENRT/TeamVsBondRecipe.py | 7 +++++--
lnst/Recipes/ENRT/VirtOvsVxlanRecipe.py | 11 ++++++++++-
.../VirtualBridgeVlanInGuestMirroredRecipe.py | 3 ++-
.../ENRT/VirtualBridgeVlanInGuestRecipe.py | 3 ++-
.../VirtualBridgeVlanInHostMirroredRecipe.py | 3 ++-
.../ENRT/VirtualBridgeVlanInHostRecipe.py | 3 ++-
.../ENRT/VirtualBridgeVlansOverBondRecipe.py | 18 ++++++++++++++++--
...irtualOvsBridgeVlanInGuestMirroredRecipe.py | 3 ++-
.../ENRT/VirtualOvsBridgeVlanInGuestRecipe.py | 3 ++-
...VirtualOvsBridgeVlanInHostMirroredRecipe.py | 3 ++-
.../ENRT/VirtualOvsBridgeVlanInHostRecipe.py | 3 ++-
.../VirtualOvsBridgeVlansOverBondRecipe.py | 18 ++++++++++++++++--
lnst/Recipes/ENRT/VlansOverBondRecipe.py | 4 +++-
lnst/Recipes/ENRT/VlansOverTeamRecipe.py | 5 ++++-
lnst/Recipes/ENRT/VlansRecipe.py | 4 +++-
lnst/Recipes/ENRT/VxlanMulticastRecipe.py | 5 ++++-
lnst/Recipes/ENRT/VxlanRemoteRecipe.py | 3 ++-
24 files changed, 99 insertions(+), 29 deletions(-)
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
index d5d52bb9..b69ed1f4 100644
--- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py
+++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
@@ -107,7 +107,7 @@ class BaseEnrtRecipe(BaseSubConfigMixin, PingTestAndEvaluate,
PerfRecipe):
self.perf_report_and_evaluate(result)
def generate_ping_configurations(self, config):
- for endpoint1, endpoint2 in self.generate_ping_endpoints(config):
+ for endpoints in self.generate_ping_endpoints(config):
for ipv in self.params.ip_versions:
ip_filter = {}
if ipv == "ipv4":
@@ -116,6 +116,7 @@ class BaseEnrtRecipe(BaseSubConfigMixin, PingTestAndEvaluate,
PerfRecipe):
ip_filter.update(family = AF_INET6)
ip_filter.update(is_link_local = False)
+ endpoint1, endpoint2 = endpoints.endpoints
endpoint1_ips = endpoint1.ips_filter(**ip_filter)
endpoint2_ips = endpoint2.ips_filter(**ip_filter)
diff --git a/lnst/Recipes/ENRT/BondRecipe.py b/lnst/Recipes/ENRT/BondRecipe.py
index 2757829b..466684cf 100644
--- a/lnst/Recipes/ENRT/BondRecipe.py
+++ b/lnst/Recipes/ENRT/BondRecipe.py
@@ -6,6 +6,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import BondDevice
class BondRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
@@ -83,7 +84,7 @@ class BondRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.host1.bond0, self.matched.host2.eth0)]
+ return [PingEndpoints(self.matched.host1.bond0, self.matched.host2.eth0)]
def generate_perf_endpoints(self, config):
return [(self.matched.host1.bond0, self.matched.host2.eth0)]
diff --git a/lnst/Recipes/ENRT/DoubleBondRecipe.py
b/lnst/Recipes/ENRT/DoubleBondRecipe.py
index c3759283..25f10ac1 100644
--- a/lnst/Recipes/ENRT/DoubleBondRecipe.py
+++ b/lnst/Recipes/ENRT/DoubleBondRecipe.py
@@ -6,6 +6,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import BondDevice
class DoubleBondRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
@@ -90,7 +91,7 @@ class DoubleBondRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.host1.bond0, self.matched.host2.bond0)]
+ return [PingEndpoints(self.matched.host1.bond0, self.matched.host2.bond0)]
def generate_perf_endpoints(self, config):
return [(self.matched.host1.bond0, self.matched.host2.bond0)]
diff --git a/lnst/Recipes/ENRT/DoubleTeamRecipe.py
b/lnst/Recipes/ENRT/DoubleTeamRecipe.py
index 193b2c41..82762af3 100644
--- a/lnst/Recipes/ENRT/DoubleTeamRecipe.py
+++ b/lnst/Recipes/ENRT/DoubleTeamRecipe.py
@@ -6,6 +6,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import TeamDevice
class DoubleTeamRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
@@ -87,8 +88,10 @@ class DoubleTeamRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.host1.team0, self.matched.host2.team0),
- (self.matched.host2.team0, self.matched.host1.team0)]
+ return [
+ PingEndpoints(self.matched.host1.team0, self.matched.host2.team0),
+ PingEndpoints(self.matched.host2.team0, self.matched.host1.team0)
+ ]
def generate_perf_endpoints(self, config):
return [(self.matched.host1.team0, self.matched.host2.team0),
diff --git a/lnst/Recipes/ENRT/NoVirtOvsVxlanRecipe.py
b/lnst/Recipes/ENRT/NoVirtOvsVxlanRecipe.py
index ecddb70a..44cd4b6f 100644
--- a/lnst/Recipes/ENRT/NoVirtOvsVxlanRecipe.py
+++ b/lnst/Recipes/ENRT/NoVirtOvsVxlanRecipe.py
@@ -3,6 +3,7 @@ from lnst.Controller import HostReq, DeviceReq, RecipeParam
from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import OvsBridgeDevice
class NoVirtOvsVxlanRecipe(CommonHWSubConfigMixin, BaseEnrtRecipe):
@@ -89,7 +90,7 @@ class NoVirtOvsVxlanRecipe(CommonHWSubConfigMixin, BaseEnrtRecipe):
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.host1.int0, self.matched.host2.int0)]
+ return [PingEndpoints(self.matched.host1.int0, self.matched.host2.int0)]
def generate_perf_endpoints(self, config):
return [(self.matched.host1.int0, self.matched.host2.int0)]
diff --git a/lnst/Recipes/ENRT/SimpleNetworkRecipe.py
b/lnst/Recipes/ENRT/SimpleNetworkRecipe.py
index 911a9960..06893f67 100644
--- a/lnst/Recipes/ENRT/SimpleNetworkRecipe.py
+++ b/lnst/Recipes/ENRT/SimpleNetworkRecipe.py
@@ -8,6 +8,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin,
)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
class SimpleNetworkRecipe(
CommonHWSubConfigMixin, OffloadSubConfigMixin, BaseEnrtRecipe
@@ -56,7 +57,7 @@ class SimpleNetworkRecipe(
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.host1.eth0, self.matched.host2.eth0)]
+ return [PingEndpoints(self.matched.host1.eth0, self.matched.host2.eth0)]
def generate_perf_endpoints(self, config):
return [(self.matched.host1.eth0, self.matched.host2.eth0)]
diff --git a/lnst/Recipes/ENRT/TeamRecipe.py b/lnst/Recipes/ENRT/TeamRecipe.py
index 2b2594a6..3a30b019 100644
--- a/lnst/Recipes/ENRT/TeamRecipe.py
+++ b/lnst/Recipes/ENRT/TeamRecipe.py
@@ -6,6 +6,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import TeamDevice
class TeamRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
@@ -82,8 +83,10 @@ class TeamRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.host1.team0, self.matched.host2.eth0),
- (self.matched.host2.eth0, self.matched.host1.team0)]
+ return [
+ PingEndpoints(self.matched.host1.team0, self.matched.host2.eth0),
+ PingEndpoints(self.matched.host2.eth0, self.matched.host1.team0)
+ ]
def generate_perf_endpoints(self, config):
return [(self.matched.host1.team0, self.matched.host2.eth0),
diff --git a/lnst/Recipes/ENRT/TeamVsBondRecipe.py
b/lnst/Recipes/ENRT/TeamVsBondRecipe.py
index 8dfa0ed1..4b66199f 100644
--- a/lnst/Recipes/ENRT/TeamVsBondRecipe.py
+++ b/lnst/Recipes/ENRT/TeamVsBondRecipe.py
@@ -6,6 +6,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import TeamDevice
from lnst.Devices import BondDevice
@@ -104,8 +105,10 @@ class TeamVsBondRecipe(CommonHWSubConfigMixin,
OffloadSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.host1.team0, self.matched.host2.bond0),
- (self.matched.host2.bond0, self.matched.host1.team0)]
+ return [
+ PingEndpoints(self.matched.host1.team0, self.matched.host2.bond0),
+ PingEndpoints(self.matched.host2.bond0, self.matched.host1.team0)
+ ]
def generate_perf_endpoints(self, config):
return [(self.matched.host1.team0, self.matched.host2.bond0),
diff --git a/lnst/Recipes/ENRT/VirtOvsVxlanRecipe.py
b/lnst/Recipes/ENRT/VirtOvsVxlanRecipe.py
index c1fc1478..f038af21 100644
--- a/lnst/Recipes/ENRT/VirtOvsVxlanRecipe.py
+++ b/lnst/Recipes/ENRT/VirtOvsVxlanRecipe.py
@@ -4,6 +4,7 @@ from lnst.Controller import HostReq, DeviceReq, RecipeParam
from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import OvsBridgeDevice
class VirtOvsVxlanRecipe(CommonHWSubConfigMixin, BaseEnrtRecipe):
@@ -124,7 +125,15 @@ class VirtOvsVxlanRecipe(CommonHWSubConfigMixin, BaseEnrtRecipe):
guest1, guest2, guest3, guest4 = (self.matched.guest1,
self.matched.guest2, self.matched.guest3, self.matched.guest4)
devs = [guest1.eth0, guest2.eth0, guest3.eth0, guest4.eth0]
- return combinations(devs, 2)
+ dev_combinations = combinations(devs, 2)
+
+ return [
+ PingEndpoints(comb[0], comb[1],
+ reachable=((comb[0].host, comb[1].host) in [
+ (guest1, guest3), (guest2, guest4)
+ ])
+ ) for comb in dev_combinations
+ ]
def generate_perf_endpoints(self, config):
return [(self.matched.guest1.eth0, self.matched.guest3.eth0)]
diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py
b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py
index 2a134f87..13eacd03 100644
--- a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py
@@ -7,6 +7,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VlanDevice
from lnst.Devices import BridgeDevice
@@ -121,7 +122,7 @@ class VirtualBridgeVlanInGuestMirroredRecipe(CommonHWSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.guest1.vlan0, self.matched.guest2.vlan0)]
+ return [PingEndpoints(self.matched.guest1.vlan0, self.matched.guest2.vlan0)]
def generate_perf_endpoints(self, config):
return [(self.matched.guest1.vlan0, self.matched.guest2.vlan0)]
diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestRecipe.py
b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestRecipe.py
index ad872799..d557dd57 100644
--- a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestRecipe.py
@@ -7,6 +7,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VlanDevice
from lnst.Devices.VlanDevice import VlanDevice as Vlan
from lnst.Devices import BridgeDevice
@@ -106,7 +107,7 @@ class VirtualBridgeVlanInGuestRecipe(CommonHWSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.guest1.vlan0, self.matched.host2.vlan0)]
+ return [PingEndpoints(self.matched.guest1.vlan0, self.matched.host2.vlan0)]
def generate_perf_endpoints(self, config):
return [(self.matched.guest1.vlan0, self.matched.host2.vlan0)]
diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlanInHostMirroredRecipe.py
b/lnst/Recipes/ENRT/VirtualBridgeVlanInHostMirroredRecipe.py
index 6f068b52..52d88dec 100644
--- a/lnst/Recipes/ENRT/VirtualBridgeVlanInHostMirroredRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualBridgeVlanInHostMirroredRecipe.py
@@ -7,6 +7,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VlanDevice
from lnst.Devices import BridgeDevice
@@ -120,7 +121,7 @@ class VirtualBridgeVlanInHostMirroredRecipe(CommonHWSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.guest1.eth0, self.matched.guest2.eth0)]
+ return [PingEndpoints(self.matched.guest1.eth0, self.matched.guest2.eth0)]
def generate_perf_endpoints(self, config):
return [(self.matched.guest1.eth0, self.matched.guest2.eth0)]
diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlanInHostRecipe.py
b/lnst/Recipes/ENRT/VirtualBridgeVlanInHostRecipe.py
index b87aeaf5..728cf06e 100644
--- a/lnst/Recipes/ENRT/VirtualBridgeVlanInHostRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualBridgeVlanInHostRecipe.py
@@ -6,6 +6,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VlanDevice
from lnst.Devices import BridgeDevice
@@ -104,7 +105,7 @@ class VirtualBridgeVlanInHostRecipe(CommonHWSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.guest1.eth0, self.matched.host2.vlan0)]
+ return [PingEndpoints(self.matched.guest1.eth0, self.matched.host2.vlan0)]
def generate_perf_endpoints(self, config):
return [(self.matched.guest1.eth0, self.matched.host2.vlan0)]
diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlansOverBondRecipe.py
b/lnst/Recipes/ENRT/VirtualBridgeVlansOverBondRecipe.py
index 8edf4234..0115bbfc 100644
--- a/lnst/Recipes/ENRT/VirtualBridgeVlansOverBondRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualBridgeVlansOverBondRecipe.py
@@ -1,4 +1,5 @@
import logging
+from itertools import product
from lnst.Common.Parameters import Param, IntParam, StrParam
from lnst.Common.IpAddress import ipaddress
from lnst.Controller import HostReq, DeviceReq, RecipeParam
@@ -7,6 +8,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VlanDevice
from lnst.Devices import BondDevice
from lnst.Devices import BridgeDevice
@@ -167,8 +169,20 @@ class VirtualBridgeVlansOverBondRecipe(CommonHWSubConfigMixin,
def generate_ping_endpoints(self, config):
guest1, guest2, guest3, guest4 = (self.matched.guest1,
self.matched.guest2, self.matched.guest3, self.matched.guest4)
- return [(guest1.eth0, guest3.eth0), (guest4.eth0, guest2.eth0),
- (guest1.eth0, guest4.eth0), (guest3.eth0, guest2.eth0)]
+ dev_combinations = product(
+ [guest1.eth0, guest2.eth0],
+ [guest3.eth0, guest4.eth0]
+ )
+ return [
+ PingEndpoints(
+ comb[0], comb[1],
+ reachable=((comb[0].host, comb[1].host) in [
+ (guest1, guest3),
+ (guest2, guest4)
+ ])
+ )
+ for comb in dev_combinations
+ ]
def generate_perf_endpoints(self, config):
return [(self.matched.guest1.eth0, self.matched.guest3.eth0)]
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py
b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py
index 00d95b8f..2bdc0aaf 100644
--- a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestMirroredRecipe.py
@@ -7,6 +7,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VlanDevice
from lnst.Devices import OvsBridgeDevice
@@ -115,7 +116,7 @@ class
VirtualOvsBridgeVlanInGuestMirroredRecipe(CommonHWSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.guest1.vlan0, self.matched.guest2.vlan0)]
+ return [PingEndpoints(self.matched.guest1.vlan0, self.matched.guest2.vlan0)]
def generate_perf_endpoints(self, config):
return [(self.matched.guest1.vlan0, self.matched.guest2.vlan0)]
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py
b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py
index 5da0903e..5ca44f87 100644
--- a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInGuestRecipe.py
@@ -6,6 +6,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VlanDevice
from lnst.Devices import OvsBridgeDevice
@@ -99,7 +100,7 @@ class VirtualOvsBridgeVlanInGuestRecipe(CommonHWSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.host2.vlan0, self.matched.guest1.vlan0)]
+ return [PingEndpoints(self.matched.host2.vlan0, self.matched.guest1.vlan0)]
def generate_perf_endpoints(self, config):
return [(self.matched.host2.vlan0, self.matched.guest1.vlan0)]
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py
b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py
index 328b9db8..00720968 100644
--- a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostMirroredRecipe.py
@@ -7,6 +7,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import OvsBridgeDevice
class VirtualOvsBridgeVlanInHostMirroredRecipe(CommonHWSubConfigMixin,
@@ -97,7 +98,7 @@ class VirtualOvsBridgeVlanInHostMirroredRecipe(CommonHWSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.guest1.eth0, self.matched.guest2.eth0)]
+ return [PingEndpoints(self.matched.guest1.eth0, self.matched.guest2.eth0)]
def generate_perf_endpoints(self, config):
return [(self.matched.guest1.eth0, self.matched.guest2.eth0)]
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py
b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py
index ea83b156..ee97fa74 100644
--- a/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlanInHostRecipe.py
@@ -7,6 +7,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VlanDevice
from lnst.Devices import OvsBridgeDevice
@@ -90,7 +91,7 @@ class VirtualOvsBridgeVlanInHostRecipe(CommonHWSubConfigMixin,
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.guest1.eth0, self.matched.host2.vlan0)]
+ return [PingEndpoints(self.matched.guest1.eth0, self.matched.host2.vlan0)]
def generate_perf_endpoints(self, config):
return [(self.matched.guest1.eth0, self.matched.host2.vlan0)]
diff --git a/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py
b/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py
index 7cc9641f..ea50b293 100644
--- a/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualOvsBridgeVlansOverBondRecipe.py
@@ -1,4 +1,5 @@
import logging
+from itertools import product
from lnst.Common.Parameters import Param, IntParam, StrParam
from lnst.Common.IpAddress import ipaddress
from lnst.Controller import HostReq, DeviceReq, RecipeParam
@@ -7,6 +8,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import OvsBridgeDevice
class VirtualOvsBridgeVlansOverBondRecipe(CommonHWSubConfigMixin,
@@ -136,8 +138,20 @@ class VirtualOvsBridgeVlansOverBondRecipe(CommonHWSubConfigMixin,
def generate_ping_endpoints(self, config):
guest1, guest2, guest3, guest4 = (self.matched.guest1,
self.matched.guest2, self.matched.guest3, self.matched.guest4)
- return [(guest1.eth0, guest3.eth0), (guest4.eth0, guest2.eth0),
- (guest1.eth0, guest4.eth0), (guest3.eth0, guest2.eth0)]
+ dev_combinations = product(
+ [guest1.eth0, guest2.eth0],
+ [guest3.eth0, guest4.eth0]
+ )
+ return [
+ PingEndpoints(
+ comb[0], comb[1],
+ reachable=((comb[0].host, comb[1].host) in [
+ (guest1, guest3),
+ (guest2, guest4)
+ ])
+ )
+ for comb in dev_combinations
+ ]
def generate_perf_endpoints(self, config):
return [(self.matched.guest1.eth0, self.matched.guest3.eth0)]
diff --git a/lnst/Recipes/ENRT/VlansOverBondRecipe.py
b/lnst/Recipes/ENRT/VlansOverBondRecipe.py
index 12ce812d..0eeaeb46 100644
--- a/lnst/Recipes/ENRT/VlansOverBondRecipe.py
+++ b/lnst/Recipes/ENRT/VlansOverBondRecipe.py
@@ -9,6 +9,7 @@ from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
from lnst.Devices import VlanDevice
from lnst.Devices.VlanDevice import VlanDevice as Vlan
from lnst.Devices import BondDevice
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
class VlansOverBondRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
BaseEnrtRecipe):
@@ -129,7 +130,8 @@ class VlansOverBondRecipe(CommonHWSubConfigMixin,
OffloadSubConfigMixin,
result = []
for src in [host1.vlan0, host1.vlan1, host1.vlan2]:
for dst in [host2.vlan0, host2.vlan1, host2.vlan2]:
- result += [(src, dst)]
+ result += [PingEndpoints(src, dst,
+ reachable=(src.vlan_id == dst.vlan_id))]
return result
def generate_perf_endpoints(self, config):
diff --git a/lnst/Recipes/ENRT/VlansOverTeamRecipe.py
b/lnst/Recipes/ENRT/VlansOverTeamRecipe.py
index 679ab35f..a2a598b0 100644
--- a/lnst/Recipes/ENRT/VlansOverTeamRecipe.py
+++ b/lnst/Recipes/ENRT/VlansOverTeamRecipe.py
@@ -6,6 +6,8 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.Recipes.ENRT.PingMixins import VlanPingEvaluatorMixin
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VlanDevice
from lnst.Devices.VlanDevice import VlanDevice as Vlan
from lnst.Devices import TeamDevice
@@ -126,7 +128,8 @@ class VlansOverTeamRecipe(CommonHWSubConfigMixin,
OffloadSubConfigMixin,
result = []
for src in [host1.vlan0, host1.vlan1, host1.vlan2]:
for dst in [host2.vlan0, host2.vlan1, host2.vlan2]:
- result += [(src, dst)]
+ result += [PingEndpoints(src, dst,
+ reachable=(src.vlan_id == dst.vlan_id))]
return result
def generate_perf_endpoints(self, config):
diff --git a/lnst/Recipes/ENRT/VlansRecipe.py b/lnst/Recipes/ENRT/VlansRecipe.py
index 38f1f454..cebb15f5 100644
--- a/lnst/Recipes/ENRT/VlansRecipe.py
+++ b/lnst/Recipes/ENRT/VlansRecipe.py
@@ -6,6 +6,7 @@ from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin)
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VlanDevice
class VlansRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
@@ -101,7 +102,8 @@ class VlansRecipe(CommonHWSubConfigMixin, OffloadSubConfigMixin,
result = []
for src in [host1.vlan0, host1.vlan1, host1.vlan2]:
for dst in [host2.vlan0, host2.vlan1, host2.vlan2]:
- result += [(src, dst)]
+ result += [PingEndpoints(src, dst,
+ reachable=(src.vlan_id == dst.vlan_id))]
return result
def generate_perf_endpoints(self, config):
diff --git a/lnst/Recipes/ENRT/VxlanMulticastRecipe.py
b/lnst/Recipes/ENRT/VxlanMulticastRecipe.py
index bef96550..235e64e9 100644
--- a/lnst/Recipes/ENRT/VxlanMulticastRecipe.py
+++ b/lnst/Recipes/ENRT/VxlanMulticastRecipe.py
@@ -4,6 +4,7 @@ from lnst.Controller import HostReq, DeviceReq, RecipeParam
from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import BridgeDevice, VxlanDevice
class VxlanMulticastRecipe(CommonHWSubConfigMixin, BaseEnrtRecipe):
@@ -100,7 +101,9 @@ class VxlanMulticastRecipe(CommonHWSubConfigMixin, BaseEnrtRecipe):
host1, host2, guest1 = (self.matched.host1, self.matched.host2,
self.matched.guest1)
devs = [host1.vxlan0, host2.vxlan0, guest1.vxlan0]
- return permutations(devs,2)
+ dev_permutations = permutations(devs,2)
+ return [ PingEndpoints(dev_permutation[0], dev_permutation[1]) for
+ dev_permutation in dev_permutations ]
def generate_perf_endpoints(self, config):
host1, host2, guest1 = (self.matched.host1, self.matched.host2,
diff --git a/lnst/Recipes/ENRT/VxlanRemoteRecipe.py
b/lnst/Recipes/ENRT/VxlanRemoteRecipe.py
index 6335e3ac..4978b6dc 100644
--- a/lnst/Recipes/ENRT/VxlanRemoteRecipe.py
+++ b/lnst/Recipes/ENRT/VxlanRemoteRecipe.py
@@ -3,6 +3,7 @@ from lnst.Controller import HostReq, DeviceReq, RecipeParam
from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe
from lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin import (
CommonHWSubConfigMixin)
+from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.Devices import VxlanDevice
class VxlanRemoteRecipe(CommonHWSubConfigMixin, BaseEnrtRecipe):
@@ -84,7 +85,7 @@ class VxlanRemoteRecipe(CommonHWSubConfigMixin, BaseEnrtRecipe):
super().test_wide_deconfiguration(config)
def generate_ping_endpoints(self, config):
- return [(self.matched.host1.vxlan0, self.matched.host2.vxlan0)]
+ return [PingEndpoints(self.matched.host1.vxlan0, self.matched.host2.vxlan0)]
def generate_perf_endpoints(self, config):
return [(self.matched.host1.vxlan0, self.matched.host2.vxlan0)]
--
2.21.1