How to use _get_ib_device_names method in lisa

Best Python code snippet using lisa_python

infiniband.py

Source:infiniband.py Github

copy

Full Screen

...94 ).is_not_empty()95 return ib_devices96 def _get_ib_device_info(self) -> List[Dict[str, str]]:97 device_info = []98 devices = self._get_ib_device_names()99 for device_name in devices:100 result = self._node.execute(101 f"ibv_devinfo -d {device_name}",102 expected_exit_code=0,103 expected_exit_code_failure_message="Failed to get device info from "104 f"ibv_devinfo for infiniband device {device_name}",105 )106 d = {107 match.group("id"): match.group("value")108 for match in self._ib_info_pattern.finditer(result.stdout)109 }110 if "hca_id" in d:111 device_info.append(d)112 assert_that(device_info).described_as(113 "Failed to get device info for any InfiniBand devices"114 ).is_not_empty()115 return device_info116 def _get_ib_device_names(self) -> List[str]:117 node = self._node118 result = node.execute(119 "ls /sys/class/infiniband",120 expected_exit_code=0,121 expected_exit_code_failure_message="Failed to get InfiniBand"122 " devices from /sys/class/infiniband",123 )124 assert_that(result.stdout).described_as(125 "No infiniband devices found in /sys/class/infiniband"126 ).is_not_empty()127 return result.stdout.split()128 def _get_mofed_version(self) -> str:129 node = self._node130 default = "5.4-3.0.3.0"...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run lisa automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful