Skip to content

Commit

Permalink
UseVfsMixin: rework trust_vf propoerty
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Tluka <jtluka@redhat.com>
  • Loading branch information
jtluka committed Oct 7, 2024
1 parent 7d109d9 commit 19e08b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lnst/Recipes/ENRT/UseVfsMixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_wide_configuration(self):

if self.params.get("vf_trust"):
for dev in self.vf_trust_device_list:
dev.vf_trust(0, self.params.vf_trust)
dev.vf_trust = {0: self.params.vf_trust}

return config

Expand All @@ -60,14 +60,16 @@ def test_wide_deconfiguration(self, config):
host.map_device(vf_dev._id, {"ifname": sriov_devices.phys_dev.name})
sriov_devices.phys_dev.delete_vfs()

self.vf_config = {}

super().test_wide_deconfiguration(config)

def generate_test_wide_description(self, config):
description = super().generate_test_wide_description(config)

if self.params.use_vfs:
description += [
f"Using vf device {vf_dev.name} of pf {sriov_devices.phys_dev.name} for DeviceReq {host.hostid}.{vf_dev._id}" + (f" trusted={self.params.vf_trust}" if self.params.get("vf_trust") and sriov_devices.phys_dev in self.vf_trust_device_list else "")
f"Using vf device {vf_dev.name} of pf {sriov_devices.phys_dev.name} for DeviceReq {host.hostid}.{vf_dev._id}" + (f" trusted={sriov_devices.phys_dev.vf_trust[0]}" if sriov_devices.phys_dev in self.vf_trust_device_list and sriov_devices.phys_dev.vf_trust.get(0) else "")
for host, sriov_devices_list in self.vf_config.items()
for sriov_devices in sriov_devices_list
for vf_dev in sriov_devices.vfs
Expand Down

0 comments on commit 19e08b3

Please sign in to comment.