aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/InterfaceUtil.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python/InterfaceUtil.py')
-rw-r--r--resources/libraries/python/InterfaceUtil.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 5617c472f4..6e001243db 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -1680,6 +1680,7 @@ class InterfaceUtil(object):
:type osi_layer: str
:returns: Virtual Function topology interface keys.
:rtype: list
+ :raises RuntimeError: If a reason preventing initialization is found.
"""
ssh = SSH()
ssh.connect(node)
@@ -1689,6 +1690,10 @@ 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":
+ raise RuntimeError(
+ "AVF needs i40e 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'\:'))