aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-07-29 14:29:01 +0200
committerVratko Polak <vrpolak@cisco.com>2019-07-29 14:29:01 +0200
commitd78e6a68461190f4bb4cb369ebb192d893f813e1 (patch)
tree360425b97e969994c8ef066d4c4f7a9b65fa655f /resources
parentd89a5934df787cf881b747829d8abf54043b3e7e (diff)
Fix logic error in AVF compatibility check
Change-Id: I7f1b47725648c8c26e21f42c305395ad620beea6 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/InterfaceUtil.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 4531ff3f01..898d7fe9ae 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -1526,10 +1526,11 @@ class InterfaceUtil(object):
pf_mac_addr = Topology.get_interface_mac(node, ifc_key).split(":")
uio_driver = Topology.get_uio_driver(node)
kernel_driver = Topology.get_interface_driver(node, ifc_key)
- if kernel_driver != "i40e" or kernel_driver != "i40evf":
+ if kernel_driver not in ("i40e", "i40evf"):
raise RuntimeError(
- "AVF needs i40e driver, not {driver} at node {host} ifc {ifc}"\
- .format(driver=kernel_driver, host=node["host"], ifc=ifc_key))
+ "AVF needs i40e-compatible driver, not {driver} at node {host}"
+ " ifc {ifc}".format(
+ driver=kernel_driver, host=node["host"], ifc=ifc_key))
current_driver = DUTSetup.get_pci_dev_driver(
node, pf_pci_addr.replace(':', r'\:'))