taf.testlib.ui_onpss_shell

Submodules

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
force_reload()[source]

Reload the switch driver using the manual reload script.

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.

modprobe()[source]

Modprobe the switch driver kernel module.

process_exists()[source]

Check if the switch driver process itself is running.

Returns:True is switch driver process is running
Return type:bool
stop_and_unload()[source]

Stop the switch driver using the script.

Normally we would just stop the services, this is for hose manual cases.

taf.testlib.ui_onpss_shell.switch_driver.SwitchDriverEntry

alias of taf.testlib.ui_onpss_shell.switch_driver.SwitchDriver

taf.testlib.ui_onpss_shell.ui_onpss_shell