labgridhelper package

Submodules

labgridhelper.barebox module

labgridhelper.barebox.get_commands(command)[source]

Returns the available commands of a running Barebox bootloader

Parameters:command (BareboxDriver) – An instance of the BareboxDriver
Returns:list of the available commands
Return type:list
labgridhelper.barebox.get_globals(command)[source]

Returns the global variables of a running Barebox bootloader

Parameters:command (BareboxDriver) – An instance of the BareboxDriver
Returns:name as key and value as key-value
Return type:dict
labgridhelper.barebox.devinfo(command, device)[source]

Returns the devinfo as dict

Parameters:
  • command (BareboxDriver) – An instance of the BareboxDriver
  • device (string) – device to call devinfo on
Returns:

parameters

Return type:

dict

labgridhelper.linux module

labgridhelper.linux.get_systemd_status(command)[source]
labgridhelper.linux.get_commands(command, directories=None)[source]

Returns the commands of a running linux system

Parameters:
  • command (CommandProtocol) – An instance of a Driver implementing the CommandProtocol
  • directories (list) – An optional list of directories to include
Returns:

list of commands available under linux

Return type:

list

labgridhelper.linux.get_systemd_service_active(command, service)[source]

Returns True if service is active, False in all other cases

Parameters:
  • command (CommandProtocol) – An instance of a Driver implementing the CommandProtocol
  • service (str) – name of the service
Returns:

True if service is active, False otherwise

Return type:

bool

labgridhelper.linux.get_interface_ip(command, interface='eth0')[source]
labgridhelper.linux.get_hostname(command)[source]

Returns the hostname

Parameters:command (CommandProtocol) – An instance of a Driver implementing the CommandProtocol
Returns:hostname of the target, None otherwise
Return type:str
labgridhelper.linux.systemd_unit_properties(command, unit_properties, unit='')[source]

Yields the values of the properties of a unit

Parameters:
  • command (CommandProtocol) – An instance of a Driver implementing the CommandProtocol
  • unit_properties (iterable) – Names of the properties of interest
  • unit (str, optional) – The systemd unit of interest, defaults to empty (systemd manager itself)
Yields:

str – Property value of the unit