4.4. sciexp2.exprun.kernel

Source: sciexp2/exprun/kernel.py

Functions

check_cmdline Check the linux kernel was booted with the given commandline.
check_module_param Check that a linux kernel module was loaded with the given parameter value.
check_version Check that a specific linux kernel version is installed.
install_version Install and reboot into a given linux kernel version if it is not the current.

4.4.1. check_cmdline

check_cmdline(shell, arg)

Check the linux kernel was booted with the given commandline.

Parameters:
shell

Target shell.

arg : str

Command line argument to check.

4.4.2. check_module_param

check_module_param(shell, module, param, value, fail=True)

Check that a linux kernel module was loaded with the given parameter value.

Parameters:
shell

Target shell.

module : str

Module name.

param : str

Module name.

value

Module value (will be coverted to str).

fail : bool, optional

Raise an exception if the value is not equal. Default is True.

Returns:
bool

Whether the given kernel module was loaded with the given parameter value.

4.4.3. check_version

check_version(shell, version, fail=True)

Check that a specific linux kernel version is installed.

Parameters:
shell

Target shell.

version : str

Target kernel version.

fail : bool, optional

Whether to raise an exception when a different version is installed. Default is True.

Returns:
bool

Whether the target kernel version is installed.

4.4.4. install_version

install_version(shell, version, package_base)

Install and reboot into a given linux kernel version if it is not the current.

Parameters:
shell

Target shell.

version : str

Target kernel version.

package_base : str

Base directory in target shell where kernel packages can be installed from.