aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/DUTSetup.py
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-07-03 05:01:46 +0000
committerPeter Mikus <pmikus@cisco.com>2018-07-03 05:56:57 +0000
commiteff8394cc41612be330b19ba4e6c87a8068ad032 (patch)
tree5c875dd0fe72de72fc13893f0758b498087cd12d /resources/libraries/python/DUTSetup.py
parent21af99fef1c4dd45651704678b2ee545f55dfb88 (diff)
CSIT-1046 Make uio driver configurable from topofiles
Currently we are configuring uio_driver from global variable. This may not be suitable for various topologies where we need different driver per TB. This patch is suppose to put uio_driver into topology files. Change-Id: I56af0697e8b2359ccb126151217976408720c1ba Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/python/DUTSetup.py')
-rw-r--r--resources/libraries/python/DUTSetup.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py
index 4ead76281f..7c8ca1b828 100644
--- a/resources/libraries/python/DUTSetup.py
+++ b/resources/libraries/python/DUTSetup.py
@@ -484,6 +484,19 @@ class DUTSetup(object):
DUTSetup.kernel_module_verify(node, module, force_load)
@staticmethod
+ def verify_uio_driver_on_all_duts(nodes):
+ """Verify if uio driver kernel module is loaded on all DUTs. If module
+ is not present it will try to load it.
+
+ :param node: DUT nodes.
+ :type node: dict
+ """
+ for node in nodes.values():
+ if node['type'] == NodeType.DUT:
+ uio_driver = Topology.get_uio_driver(node)
+ DUTSetup.kernel_module_verify(node, uio_driver, force_load=True)
+
+ @staticmethod
def kernel_module_load(node, module):
"""Load kernel module on node.