taf.testlib.ui_onpss_shell.fm6k¶
taf.testlib.ui_onpss_shell.fm10k¶
taf.testlib.ui_onpss_shell.switch_driver¶
switch_driver.py
Switch Driver abstraction
-
class
taf.testlib.ui_onpss_shell.switch_driver.SwitchDriver(ui_instance, switch_instance)[source]¶ Bases:
object-
MODPROBE_COMMAND= 'modprobe'¶
-
SWITCH_DRIVERS= {'fm10kd': SwitchDriver(name='fm10kd', kernel_module='fm10ks', script='fm10kdr'), 'switchd': SwitchDriver(name='switchd', kernel_module='switch', script='switchdr')}¶
-
__init__(ui_instance, switch_instance)[source]¶ Parameters: - ui_instance (UiOnpssShell) – ui_onpss_shell instance
- switch_instance (SwitchGeneral) – specific switch instance
-
static
_gen_which_command(prog)[source]¶ Parameters: prog (str) – command to search for in the patch Returns: path of program Return type: str
-
autodetect()[source]¶ Search for switch drivers and set the name, kernel_module and script accordingly.
Raises: UIException – when switch driver not found
-
is_active()[source]¶ Check is switch driver service is running.
Returns: True if switch driver service is running Return type: bool
-
kill()[source]¶ Kill the switch driver process.
Normally we would just stop the service, this is for those manual cases.
-
-
taf.testlib.ui_onpss_shell.switch_driver.SwitchDriverEntry¶ alias of
taf.testlib.ui_onpss_shell.switch_driver.SwitchDriver