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.linux module¶
-
labgridhelper.linux.
get_systemd_version
(command)[source]¶ Returns systemd version retrieved by parsing output of systemd –version
Parameters: command (CommandProtocol) – An instance of a Driver implementing the CommandProtocol Returns: systemd version number Return type: int
-
labgridhelper.linux.
get_systemd_status
(command)[source]¶ Returns parsed output of systemd Manager’s ListUnits DBus command
Parameters: command (CommandProtocol) – An instance of a Driver implementing the CommandProtocol Returns: dictionary of service names to their properties Return type: dict
-
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]¶ Returns the global valid IPv4 address of the supplied interface
Parameters: - command (CommandProtocol) – An instance of a Driver implementing the CommandProtocol
- interface (string) – name of the interface
Returns: IPv4 address of the interface, None otherwise
Return type: str
-
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