Components¶
Resources¶
-
class
labgrid.resource.
RawSerialPort
(target, port=None, speed=115200)[source]¶ Bases:
labgrid.resource.base.SerialPort
,labgrid.resource.common.Resource
-
class
labgrid.resource.
OneWirePIO
(target, host, path)[source]¶ Bases:
labgrid.resource.common.Resource
This resource describes a Onewire PIO Port.
Arguments: host - The hostname of the owserver e.g. localhost:4304 path - Path to the port on the owserver e.g. 29.7D6913000000/PIO.0
-
class
labgrid.resource.
USBSerialPort
(target, match, device=None, port=None, speed=115200)[source]¶ Bases:
labgrid.resource.base.SerialPort
,labgrid.resource.udev.USBResource
Drivers¶
-
class
labgrid.driver.
BareboxDriver
(target, prompt='')[source]¶ Bases:
labgrid.driver.commandmixin.CommandMixin
,labgrid.driver.common.Driver
,labgrid.protocol.commandprotocol.CommandProtocol
,labgrid.protocol.linuxbootprotocol.LinuxBootProtocol
BareboxDriver - Driver to control barebox via the console
-
run
(cmd, *, step)[source]¶ Runs the specified cmd on the shell and returns the output.
Arguments: cmd - cmd to run on the shell
-
run_check
(cmd)[source]¶ Runs the specified cmd on the shell and returns the output if successful, raises ExecutionError otherwise.
Arguments: cmd - cmd to run on the shell
-
-
class
labgrid.driver.
UBootDriver
(target, prompt='', password='', init_commands=NOTHING)[source]¶ Bases:
labgrid.driver.commandmixin.CommandMixin
,labgrid.driver.common.Driver
,labgrid.protocol.commandprotocol.CommandProtocol
,labgrid.protocol.linuxbootprotocol.LinuxBootProtocol
UBootDriver - Driver to control uboot via the console
-
run
(cmd)[source]¶ Runs the specified cmd on the shell and returns the output.
Arguments: cmd - cmd to run on the shell
-
run_check
(cmd)[source]¶ Runs the specified cmd on the shell and returns the output if successful, raises ExecutionError otherwise.
Arguments: cmd - cmd to run on the shell
-
-
class
labgrid.driver.
ShellDriver
(target, prompt, login_prompt, username, password='', keyfile='')[source]¶ Bases:
labgrid.driver.commandmixin.CommandMixin
,labgrid.driver.common.Driver
,labgrid.protocol.commandprotocol.CommandProtocol
ShellDriver - Driver to execute commands on the shell
-
run
(cmd, *, step)[source]¶ Runs the specified cmd on the shell and returns the output.
Arguments: cmd - cmd to run on the shell
-
run_check
(cmd)[source]¶ Runs the specified cmd on the shell and returns the output if successful, raises ExecutionError otherwise.
Arguments: cmd - cmd to run on the shell
-
-
class
labgrid.driver.
SSHDriver
(target, keyfile='')[source]¶ Bases:
labgrid.driver.commandmixin.CommandMixin
,labgrid.driver.common.Driver
,labgrid.protocol.commandprotocol.CommandProtocol
,labgrid.protocol.filetransferprotocol.FileTransferProtocol
SSHDriver - Driver to execute commands via SSH
-
run
(cmd)[source]¶ Execute cmd on the target.
This method runs the specified cmd as a command on its target. It uses the ssh shell command to run the command and parses the exitcode. cmd - command to be run on the target
returns: (stdout, stderr, returncode)
-
-
class
labgrid.driver.
SerialDriver
(target)[source]¶ Bases:
labgrid.driver.consoleexpectmixin.ConsoleExpectMixin
,labgrid.driver.common.Driver
,labgrid.protocol.consoleprotocol.ConsoleProtocol
Driver implementing the ConsoleProtocol interface over a SerialPort connection
-
class
labgrid.driver.
InfoDriver
(target)[source]¶ Bases:
labgrid.driver.common.Driver
,labgrid.protocol.infoprotocol.InfoProtocol
InfoDriver implementing the InfoProtocol on top of CommandProtocol drivers
Strategies¶
-
class
labgrid.strategy.
UBootStrategy
(target, status=<Status.unknown: 0>)[source]¶ Bases:
labgrid.strategy.common.Strategy
UbootStrategy - Strategy to switch to uboot or shell
-
class
labgrid.strategy.
BareboxStrategy
(target, status=<Status.unknown: 0>)[source]¶ Bases:
labgrid.strategy.common.Strategy
BareboxStrategy - Strategy to switch to barebox or shell