labgrid.driver package

Submodules

labgrid.driver.bareboxdriver module

class labgrid.driver.bareboxdriver.BareboxDriver(target, name, prompt='', autoboot='stop autoboot', interrupt='n', startstring='[\n]barebox 20\d+', bootstring='Linux version \d', password='', login_timeout=60) → None[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.
BareboxDriver binds on top of a ConsoleProtocol.
Parameters:
  • prompt (str) – The default Barebox Prompt
  • startstring (str) – string that indicates that Barebox is starting
  • bootstring (str) – string that indicates that the Kernel is booting
  • password (str) – optional, password to use for access to the shell
  • login_timeout (int) – optional, timeout for access to the shell
bindings = {'console': <class 'labgrid.protocol.consoleprotocol.ConsoleProtocol'>}
__attrs_post_init__()[source]
on_activate()[source]

Activate the BareboxDriver

This function tries to login if not already active

on_deactivate()[source]

Deactivate the BareboxDriver

Simply sets the internal status to 0

run(cmd: str, *, timeout: int = 30)[source]
reset()[source]

Reset the board via a CPU reset

get_status()[source]

Retrieve status of the BareboxDriver 0 means inactive, 1 means active.

Returns:status of the driver
Return type:int
await_boot()[source]

Wait for the initial Linux version string to verify we succesfully jumped into the kernel.

boot(name: str)[source]

Boot the default or a specific boot entry

Parameters:name (str) – name of the entry to boot
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='prompt', default='', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='autoboot', default='stop autoboot', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='interrupt', default='\n', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='startstring', default='[\\n]barebox 20\\d+', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='bootstring', default='Linux version \\d', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='password', default='', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='login_timeout', default=60, validator=<instance_of validator for type <class 'int'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, prompt='', autoboot='stop autoboot', interrupt='\n', startstring='[\\n]barebox 20\\d+', bootstring='Linux version \\d', password='', login_timeout=60) → None
__module__ = 'labgrid.driver.bareboxdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.commandmixin module

class labgrid.driver.commandmixin.CommandMixin[source]

Bases: object

CommandMixin implementing common functions for drivers which support the CommandProtocol

__attrs_post_init__()[source]
wait_for(cmd, pattern, timeout=30.0, sleepduration=1)[source]
run_check(cmd: str, *, timeout=30, codec='utf-8', decodeerrors='strict')[source]

External run_check function, only available if the driver is active. Runs the supplied command and returns the stdout, raises an ExecutionError otherwise.

Parameters:cmd (str) – command to run on the shell
Returns:stdout of the executed command
Return type:List[str]
__dict__ = mappingproxy({'__dict__': <attribute '__dict__' of 'CommandMixin' objects>, 'run_check': <function CommandMixin.run_check>, '__doc__': '\n CommandMixin implementing common functions for drivers which support the CommandProtocol\n ', '__weakref__': <attribute '__weakref__' of 'CommandMixin' objects>, '__module__': 'labgrid.driver.commandmixin', '_run_check': <function CommandMixin._run_check>, 'wait_for': <function CommandMixin.wait_for>, '__attrs_post_init__': <function CommandMixin.__attrs_post_init__>})
__module__ = 'labgrid.driver.commandmixin'
__weakref__

list of weak references to the object (if defined)

labgrid.driver.common module

class labgrid.driver.common.Driver(target, name) → None[source]

Bases: labgrid.binding.BindingMixin

Represents a driver which is used externally or by other drivers. It implements functionality based on directly accessing the Resource or by building on top of other Drivers.

Life cycle: - create - bind (n times) - activate - usage - deactivate

__attrs_post_init__()[source]
get_priority(protocol)[source]

Retrieve the priority for a given protocol

Arguments: protocol - protocol to search for in the MRO

Returns:value of the priority if it is found, 0 otherwise.
Return type:Int
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.common'
__repr__()

Automatically created by attrs.

labgrid.driver.common.check_file(filename, *, command_prefix=[])[source]

labgrid.driver.consoleexpectmixin module

class labgrid.driver.consoleexpectmixin.ConsoleExpectMixin[source]

Bases: object

Console driver mixin to implement the read, write, expect and sendline methods. It uses the internal _read and _write methods.

The class using the ConsoleExpectMixin must provide a logger and a txdelay attribute.

__attrs_post_init__()[source]
read(size=1, timeout=0.0)[source]
write(data)[source]
sendline(line)[source]
sendcontrol(char)[source]
expect(pattern, timeout=-1)[source]
resolve_conflicts(client)[source]
__dict__ = mappingproxy({'expect': <function ConsoleExpectMixin.expect>, '__doc__': '\n Console driver mixin to implement the read, write, expect and sendline methods. It uses\n the internal _read and _write methods.\n\n The class using the ConsoleExpectMixin must provide a logger and a txdelay attribute.\n ', '__dict__': <attribute '__dict__' of 'ConsoleExpectMixin' objects>, 'write': <function ConsoleExpectMixin.write>, 'sendcontrol': <function ConsoleExpectMixin.sendcontrol>, '__attrs_post_init__': <function ConsoleExpectMixin.__attrs_post_init__>, '__weakref__': <attribute '__weakref__' of 'ConsoleExpectMixin' objects>, '__module__': 'labgrid.driver.consoleexpectmixin', 'sendline': <function ConsoleExpectMixin.sendline>, 'read': <function ConsoleExpectMixin.read>, 'resolve_conflicts': <function ConsoleExpectMixin.resolve_conflicts>})
__module__ = 'labgrid.driver.consoleexpectmixin'
__weakref__

list of weak references to the object (if defined)

labgrid.driver.exception module

exception labgrid.driver.exception.ExecutionError(msg, stdout=None, stderr=None) → None[source]

Bases: Exception

__attrs_attrs__ = (Attribute(name='msg', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='stdout', default=None, validator=<optional validator for <instance_of validator for type <class 'list'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='stderr', default=None, validator=<optional validator for <instance_of validator for type <class 'list'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(msg, stdout=None, stderr=None) → None
__module__ = 'labgrid.driver.exception'
__repr__()

Automatically created by attrs.

__weakref__

list of weak references to the object (if defined)

exception labgrid.driver.exception.CleanUpError(msg) → None[source]

Bases: Exception

__attrs_attrs__ = (Attribute(name='msg', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False),)
__init__(msg) → None
__module__ = 'labgrid.driver.exception'
__repr__()

Automatically created by attrs.

__weakref__

list of weak references to the object (if defined)

labgrid.driver.externalconsoledriver module

class labgrid.driver.externalconsoledriver.ExternalConsoleDriver(target, name, cmd, txdelay=0.0) → None[source]

Bases: labgrid.driver.consoleexpectmixin.ConsoleExpectMixin, labgrid.driver.common.Driver, labgrid.protocol.consoleprotocol.ConsoleProtocol

Driver implementing the ConsoleProtocol interface using a subprocess

__attrs_post_init__()[source]
open()[source]

Starts the subprocess, does nothing if it is already closed

close()[source]

Stops the subprocess, does nothing if it is already closed

on_deactivate()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='cmd', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='txdelay', default=0.0, validator=<instance_of validator for type <class 'float'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, cmd, txdelay=0.0) → None
__module__ = 'labgrid.driver.externalconsoledriver'
__repr__()

Automatically created by attrs.

labgrid.driver.fake module

class labgrid.driver.fake.FakeCommandDriver(target, name) → None[source]

Bases: labgrid.driver.commandmixin.CommandMixin, labgrid.driver.common.Driver, labgrid.protocol.commandprotocol.CommandProtocol

__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.fake'
__repr__()

Automatically created by attrs.

get_status()[source]
run(*args, timeout=None)[source]
run_check(*args)[source]
class labgrid.driver.fake.FakeConsoleDriver(target, name, txdelay=0.0) → None[source]

Bases: labgrid.driver.consoleexpectmixin.ConsoleExpectMixin, labgrid.driver.common.Driver, labgrid.protocol.consoleprotocol.ConsoleProtocol

__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='txdelay', default=0.0, validator=<instance_of validator for type <class 'float'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__attrs_post_init__()[source]
__init__(target, name, txdelay=0.0) → None
__module__ = 'labgrid.driver.fake'
__repr__()

Automatically created by attrs.

close()[source]
open()[source]
class labgrid.driver.fake.FakeFileTransferDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.protocol.filetransferprotocol.FileTransferProtocol

__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.fake'
__repr__()

Automatically created by attrs.

get(*args)[source]
put(*args)[source]
class labgrid.driver.fake.FakePowerDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.protocol.powerprotocol.PowerProtocol

__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.fake'
__repr__()

Automatically created by attrs.

cycle(*args)[source]
off(*args)[source]
on(*args)[source]

labgrid.driver.fastbootdriver module

class labgrid.driver.fastbootdriver.AndroidFastbootDriver(target, name, image=None) → None[source]

Bases: labgrid.driver.common.Driver

bindings = {'fastboot': {<class 'labgrid.resource.remote.NetworkAndroidFastboot'>, <class 'labgrid.resource.udev.AndroidFastboot'>}}
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
__call__(*args)[source]
boot(filename)[source]
flash(partition, filename)[source]
run(cmd)[source]
continue_boot()[source]
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='image', default=None, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, image=None) → None
__module__ = 'labgrid.driver.fastbootdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.infodriver module

class labgrid.driver.infodriver.InfoDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.protocol.infoprotocol.InfoProtocol

InfoDriver implementing the InfoProtocol on top of CommandProtocol drivers

bindings = {'command': <class 'labgrid.protocol.commandprotocol.CommandProtocol'>}
__attrs_post_init__()[source]
get_ip(interface='eth0')[source]

Returns the IP of the supplied interface

get_service_status(service)[source]

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

get_hostname()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.infodriver'
__repr__()

Automatically created by attrs.

labgrid.driver.modbusdriver module

class labgrid.driver.modbusdriver.ModbusCoilDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.protocol.digitaloutputprotocol.DigitalOutputProtocol

bindings = {'coil': <class 'labgrid.resource.modbus.ModbusTCPCoil'>}
__attrs_post_init__()[source]
set(status)[source]
get()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.modbusdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.networkusbstoragedriver module

class labgrid.driver.networkusbstoragedriver.NetworkUSBStorageDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver

bindings = {'storage': {<class 'labgrid.resource.remote.NetworkUSBMassStorage'>, <class 'labgrid.resource.udev.USBSDMuxDevice'>, <class 'labgrid.resource.udev.USBMassStorage'>, <class 'labgrid.resource.remote.NetworkUSBSDMuxDevice'>}}
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
write_image(filename)[source]
get_size()[source]
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.networkusbstoragedriver'
__repr__()

Automatically created by attrs.

labgrid.driver.onewiredriver module

class labgrid.driver.onewiredriver.OneWirePIODriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.protocol.digitaloutputprotocol.DigitalOutputProtocol

bindings = {'port': <class 'labgrid.resource.onewireport.OneWirePIO'>}
__attrs_post_init__()[source]
set(status)[source]
get()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.onewiredriver'
__repr__()

Automatically created by attrs.

labgrid.driver.openocddriver module

class labgrid.driver.openocddriver.OpenOCDDriver(target, name, config, search=[], image=None) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.protocol.bootstrapprotocol.BootstrapProtocol

bindings = {'interface': {<class 'labgrid.resource.udev.AlteraUSBBlaster'>, <class 'labgrid.resource.remote.NetworkAlteraUSBBlaster'>}}
__attrs_post_init__()[source]
resolve_path_str_or_list(path)[source]
load(filename=None)[source]
execute(commands: list)[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='config', default=NOTHING, validator=<instance_of validator for type (<class 'str'>, <class 'list'>)>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='search', default=[], validator=<optional validator for <instance_of validator for type (<class 'str'>, <class 'list'>)> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='image', default=None, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, config, search=[], image=None) → None
__module__ = 'labgrid.driver.openocddriver'
__repr__()

Automatically created by attrs.

labgrid.driver.powerdriver module

class labgrid.driver.powerdriver.PowerResetMixin → None[source]

Bases: labgrid.protocol.resetprotocol.ResetProtocol

ResetMixin implements the ResetProtocol for drivers which support the PowerProtocol

priorities = {<class 'labgrid.protocol.resetprotocol.ResetProtocol'>: -10}
__attrs_post_init__()[source]
reset()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = ()
__init__() → None
__module__ = 'labgrid.driver.powerdriver'
__repr__()

Automatically created by attrs.

class labgrid.driver.powerdriver.ManualPowerDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.driver.powerdriver.PowerResetMixin, labgrid.protocol.powerprotocol.PowerProtocol

ManualPowerDriver - Driver to tell the user to control a target’s power

on()[source]
off()[source]
cycle()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.powerdriver'
__repr__()

Automatically created by attrs.

class labgrid.driver.powerdriver.ExternalPowerDriver(target, name, cmd_on, cmd_off, cmd_cycle=None, delay=2.0) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.driver.powerdriver.PowerResetMixin, labgrid.protocol.powerprotocol.PowerProtocol

ExternalPowerDriver - Driver using an external command to control a target’s power

on()[source]
off()[source]
cycle()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='cmd_on', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='cmd_off', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='cmd_cycle', default=None, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='delay', default=2.0, validator=<instance_of validator for type <class 'float'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, cmd_on, cmd_off, cmd_cycle=None, delay=2.0) → None
__module__ = 'labgrid.driver.powerdriver'
__repr__()

Automatically created by attrs.

class labgrid.driver.powerdriver.NetworkPowerDriver(target, name, delay=2.0) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.driver.powerdriver.PowerResetMixin, labgrid.protocol.powerprotocol.PowerProtocol

NetworkPowerDriver - Driver using a networked power switch to control a target’s power

bindings = {'port': <class 'labgrid.resource.power.NetworkPowerPort'>}
__attrs_post_init__()[source]
on()[source]
off()[source]
cycle()[source]
get()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='delay', default=2.0, validator=<instance_of validator for type <class 'float'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, delay=2.0) → None
__module__ = 'labgrid.driver.powerdriver'
__repr__()

Automatically created by attrs.

class labgrid.driver.powerdriver.DigitalOutputPowerDriver(target, name, delay=1.0) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.driver.powerdriver.PowerResetMixin, labgrid.protocol.powerprotocol.PowerProtocol

DigitalOutputPowerDriver uses a DigitalOutput to control the power of a DUT.

bindings = {'output': <class 'labgrid.protocol.digitaloutputprotocol.DigitalOutputProtocol'>}
__attrs_post_init__()[source]
on()[source]
off()[source]
cycle()[source]
get()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='delay', default=1.0, validator=<instance_of validator for type <class 'float'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, delay=1.0) → None
__module__ = 'labgrid.driver.powerdriver'
__repr__()

Automatically created by attrs.

class labgrid.driver.powerdriver.YKUSHPowerDriver(target, name, delay=2.0) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.driver.powerdriver.PowerResetMixin, labgrid.protocol.powerprotocol.PowerProtocol

YKUSHPowerDriver - Driver using a YEPKIT YKUSH switchable USB hub to control a target’s power - https://www.yepkit.com/products/ykush

bindings = {'port': <class 'labgrid.resource.ykushpowerport.YKUSHPowerPort'>}
__attrs_post_init__()[source]
on()[source]
off()[source]
cycle()[source]
get()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='delay', default=2.0, validator=<instance_of validator for type <class 'float'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, delay=2.0) → None
__module__ = 'labgrid.driver.powerdriver'
__repr__()

Automatically created by attrs.

class labgrid.driver.powerdriver.USBPowerDriver(target, name, delay=2.0) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.driver.powerdriver.PowerResetMixin, labgrid.protocol.powerprotocol.PowerProtocol

USBPowerDriver - Driver using a power switchable USB hub and the uhubctl tool (https://github.com/mvp/uhubctl) to control a target’s power

bindings = {'hub': {<class 'labgrid.resource.udev.USBPowerPort'>, <class 'labgrid.resource.remote.NetworkUSBPowerPort'>}}
__attrs_post_init__()[source]
on()[source]
off()[source]
cycle()[source]
get()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='delay', default=2.0, validator=<instance_of validator for type <class 'float'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, delay=2.0) → None
__module__ = 'labgrid.driver.powerdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.qemudriver module

The QEMUDriver implements a driver to use a QEMU target

class labgrid.driver.qemudriver.QEMUDriver(target, name, qemu_bin, machine, cpu, memory, extra_args, boot_args=None, kernel=None, disk=None, rootfs=None, dtb=None, flash=None) → None[source]

Bases: labgrid.driver.consoleexpectmixin.ConsoleExpectMixin, labgrid.driver.common.Driver, labgrid.protocol.powerprotocol.PowerProtocol, labgrid.protocol.consoleprotocol.ConsoleProtocol

The QEMUDriver implements an interface to start targets as qemu instances.

The kernel, flash, rootfs and dtb arguments refer to images and paths declared in the environment configuration.

Parameters:
  • qemu_bin (str) – reference to the tools key for the QEMU binary
  • machine (str) – QEMU machine type
  • cpu (str) – QEMU cpu type
  • memory (str) – QEMU memory size (ends with M or G)
  • extra_args (str) – extra QEMU arguments, they are passed directly to the QEMU binary
  • boot_args (str) – optional, additional kernel boot argument
  • kernel (str) – optional, reference to the images key for the kernel
  • disk (str) – optional, reference to the images key for the disk image
  • flash (str) – optional, reference to the images key for the flash image
  • rootfs (str) – optional, reference to the paths key for use as the virtio-9p filesystem
  • dtb (str) – optional, reference to the image key for the device tree
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
on()[source]

Start the QEMU subprocess, accept the unix socket connection and afterwards start the emulator using a QMP Command

off()[source]

Stop the emulator using a monitor command and await the exitcode

cycle()[source]

Cycle the emulator by restarting it

monitor_command(command)[source]

Execute a monitor_command via the QMP

__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='qemu_bin', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='machine', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='cpu', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='memory', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='extra_args', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='boot_args', default=None, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='kernel', default=None, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='disk', default=None, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='rootfs', default=None, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='dtb', default=None, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='flash', default=None, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, qemu_bin, machine, cpu, memory, extra_args, boot_args=None, kernel=None, disk=None, rootfs=None, dtb=None, flash=None) → None
__module__ = 'labgrid.driver.qemudriver'
__repr__()

Automatically created by attrs.

labgrid.driver.quartushpsdriver module

class labgrid.driver.quartushpsdriver.QuartusHPSDriver(target, name, image=None) → None[source]

Bases: labgrid.driver.common.Driver

bindings = {'interface': {<class 'labgrid.resource.udev.AlteraUSBBlaster'>, <class 'labgrid.resource.remote.NetworkAlteraUSBBlaster'>}}
__attrs_post_init__()[source]
flash(filename=None, address=0)[source]
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='image', default=None, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, image=None) → None
__module__ = 'labgrid.driver.quartushpsdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.resetdriver module

class labgrid.driver.resetdriver.DigitalOutputResetDriver(target, name, delay=1.0) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.protocol.resetprotocol.ResetProtocol

DigitalOutputResetDriver - Driver using a DigitalOutput to reset the target

bindings = {'output': <class 'labgrid.protocol.digitaloutputprotocol.DigitalOutputProtocol'>}
__attrs_post_init__()[source]
reset()[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='delay', default=1.0, validator=<instance_of validator for type <class 'float'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, delay=1.0) → None
__module__ = 'labgrid.driver.resetdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.serialdigitaloutput module

class labgrid.driver.serialdigitaloutput.SerialPortDigitalOutputDriver(target, name, signal) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.protocol.digitaloutputprotocol.DigitalOutputProtocol

Controls the state of a GPIO using the control lines of a serial port.

This driver uses the flow-control pins of a serial port (for example an USB-UART-dongle) to control some external power switch. You may connect some kind of relay board to the flow control pins.

The serial port should NOT be used for serial communication at the same time. This will probably reset the flow-control signals.

Usable signals are DTR and RTS.

bindings = {'serial': <class 'labgrid.driver.serialdriver.SerialDriver'>}
__attrs_post_init__()[source]
get()[source]
set(value)[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='signal', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, signal) → None
__module__ = 'labgrid.driver.serialdigitaloutput'
__repr__()

Automatically created by attrs.

labgrid.driver.serialdriver module

class labgrid.driver.serialdriver.SerialDriver(target, name, txdelay=0.0) → None[source]

Bases: labgrid.driver.consoleexpectmixin.ConsoleExpectMixin, labgrid.driver.common.Driver, labgrid.protocol.consoleprotocol.ConsoleProtocol

Driver implementing the ConsoleProtocol interface over a SerialPort connection

bindings = {'port': {<class 'labgrid.resource.serialport.NetworkSerialPort'>, <class 'labgrid.resource.base.SerialPort'>}}
message = 'The installed pyserial version does not contain important RFC2217 fixes.\nYou can install the labgrid fork via:\npip uninstall pyserial\npip install https://github.com/labgrid-project/pyserial/archive/v3.4.0.1.zip#egg=pyserial\n'
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
open()[source]

Opens the serialport, does nothing if it is already closed

__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='txdelay', default=0.0, validator=<instance_of validator for type <class 'float'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, txdelay=0.0) → None
__module__ = 'labgrid.driver.serialdriver'
__repr__()

Automatically created by attrs.

close()[source]

Closes the serialport, does nothing if it is already closed

labgrid.driver.shelldriver module

The ShellDriver provides the CommandProtocol, ConsoleProtocol and InfoProtocol on top of a SerialPort.

class labgrid.driver.shelldriver.ShellDriver(target, name, prompt, login_prompt, username, password='', keyfile='', login_timeout=60, console_ready='', await_login_timeout=2) → None[source]

Bases: labgrid.driver.commandmixin.CommandMixin, labgrid.driver.common.Driver, labgrid.protocol.commandprotocol.CommandProtocol, labgrid.protocol.filetransferprotocol.FileTransferProtocol

ShellDriver - Driver to execute commands on the shell ShellDriver binds on top of a ConsoleProtocol.

Parameters:
  • prompt (regex) – the shell prompt to detect
  • login_prompt (regex) – the login prompt to detect
  • username (str) – username to login with
  • password (str) – password to login with
  • keyfile (str) – keyfile to bind mount over users authorized keys
  • login_timeout (int) – optional, timeout for login prompt detection
bindings = {'console': <class 'labgrid.protocol.consoleprotocol.ConsoleProtocol'>}
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
run(cmd, timeout=30.0, codec='utf-8', decodeerrors='strict')[source]
get_status()[source]

Returns the status of the shell-driver. 0 means not connected/found, 1 means shell

put_ssh_key(keyfile_path)[source]
put_bytes(buf: bytes, remotefile: str)[source]

Upload a file to the target. Will silently overwrite the remote file if it already exists.

Parameters:
  • buf (bytes) – file contents
  • remotefile (str) – destination filename on the target
Raises:
  • IOError – if the provided localfile could not be found
  • ExecutionError – if something else went wrong
put(localfile: str, remotefile: str)[source]

Upload a file to the target. Will silently overwrite the remote file if it already exists.

Parameters:
  • localfile (str) – source filename on the local machine
  • remotefile (str) – destination filename on the target
Raises:
  • IOError – if the provided localfile could not be found
  • ExecutionError – if something else went wrong
get_bytes(remotefile: str)[source]

Download a file from the target.

Parameters:

remotefile (str) – source filename on the target

Returns:

(bytes) file contents

Raises:
  • IOError – if localfile could be written
  • ExecutionError – if something went wrong
get(remotefile: str, localfile: str)[source]

Download a file from the target. Will silently overwrite the local file if it already exists.

Parameters:
  • remotefile (str) – source filename on the target
  • localfile (str) – destination filename on the local machine (can be relative)
Raises:
  • IOError – if localfile could be written
  • ExecutionError – if something went wrong
run_script(data: bytes, timeout: int = 60)[source]

Upload a script to the target and run it.

Parameters:
  • data (bytes) – script data
  • timeout (int) – timeout for the script to finish execution
Returns:

str, stderr: str, return_value: int)

Return type:

Tuple of (stdout

Raises:
  • IOError – if the provided localfile could not be found
  • ExecutionError – if something else went wrong
run_script_file(scriptfile: str, *args, timeout: int = 60)[source]

Upload a script file to the target and run it.

Parameters:
  • scriptfile (str) – source file on the local file system to upload to the target
  • *args – (list of str): any arguments for the script as positional arguments
  • timeout (int) – timeout for the script to finish execution
Returns:

str, stderr: str, return_value: int)

Return type:

Tuple of (stdout

Raises:
  • ExecutionError – if something went wrong
  • IOError – if the provided localfile could not be found
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='prompt', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='login_prompt', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='username', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='password', default='', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='keyfile', default='', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='login_timeout', default=60, validator=<instance_of validator for type <class 'int'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='console_ready', default='', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='await_login_timeout', default=2, validator=<instance_of validator for type <class 'int'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, prompt, login_prompt, username, password='', keyfile='', login_timeout=60, console_ready='', await_login_timeout=2) → None
__module__ = 'labgrid.driver.shelldriver'
__repr__()

Automatically created by attrs.

labgrid.driver.sigrokdriver module

class labgrid.driver.sigrokdriver.SigrokDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver

The SigrokDriver uses sigrok-cli to record samples and expose them as python dictionaries.

Parameters:bindings (dict) – driver to use with sigrok
bindings = {'sigrok': {<class 'labgrid.resource.remote.NetworkSigrokUSBDevice'>, <class 'labgrid.resource.sigrok.SigrokDevice'>, <class 'labgrid.resource.udev.SigrokUSBDevice'>}}
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
capture(filename, samplerate='200k')[source]
stop()[source]
analyze(args, filename=None)[source]
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.sigrokdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.smallubootdriver module

class labgrid.driver.smallubootdriver.SmallUBootDriver(target, name, prompt='', password='', interrupt='n', init_commands=NOTHING, password_prompt='enter Password:', boot_expression='U-Boot 20\d+', bootstring='Linux version \d', boot_secret='a', login_timeout=60.0) → None[source]

Bases: labgrid.driver.ubootdriver.UBootDriver

SmallUBootDriver is meant as a driver for UBoot with only little functionality compared to standard a standard UBoot. Especially is copes with the following limitations:

  • The UBoot does not have a real password-prompt but can be activated by entering a “secret” after a message was displayed.
  • The command line is does not have a build-in echo command. Thus this driver uses ‘Unknown Command’ messages as marker before and after the output of a command.
  • Since there is no echo we can not return the exit code of the command. Commands will always return 0 unless the command was not found.

This driver needs the following features activated in UBoot to work:

  • The UBoot must not have real password prompt. Instead it must be keyword activated. For example it should be activated by a dialog like the following: UBoot: “Autobooting in 1s…” Labgrid: “secret” UBoot: <switching to console>
  • The UBoot must be able to parse multiple commands in a single line separated by “;”.
  • The UBoot must support the “bootm” command to boot from a memory location.

This driver was created especially for the following devices:

  • TP-Link WR841 v11
boot(name)[source]

Boot the device from the given memory location using ‘bootm’.

Parameters:name (str) – address to boot
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='prompt', default='', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='password', default='', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='interrupt', default='\n', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='init_commands', default=Factory(factory=<class 'tuple'>, takes_self=False), validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=<class 'tuple'>, kw_only=False), Attribute(name='password_prompt', default='enter Password:', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='boot_expression', default='U-Boot 20\\d+', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='bootstring', default='Linux version \\d', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='boot_secret', default='a', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='login_timeout', default=60.0, validator=<instance_of validator for type <class 'float'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, prompt='', password='', interrupt='\n', init_commands=NOTHING, password_prompt='enter Password:', boot_expression='U-Boot 20\\d+', bootstring='Linux version \\d', boot_secret='a', login_timeout=60.0) → None
__module__ = 'labgrid.driver.smallubootdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.sshdriver module

The SSHDriver uses SSH as a transport to implement CommandProtocol and FileTransferProtocol

class labgrid.driver.sshdriver.SSHDriver(target, name, keyfile='', stderr_merge=False) → None[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

bindings = {'networkservice': <class 'labgrid.resource.networkservice.NetworkService'>}
priorities = {<class 'labgrid.protocol.filetransferprotocol.FileTransferProtocol'>: 10, <class 'labgrid.protocol.commandprotocol.CommandProtocol'>: 10}
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
run(cmd, codec='utf-8', decodeerrors='strict', timeout=None)[source]
get_status()[source]

The SSHDriver is always connected, return 1

put(filename, remotepath='')[source]
get(filename, destination='.')[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='keyfile', default='', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='stderr_merge', default=False, validator=<instance_of validator for type <class 'bool'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, keyfile='', stderr_merge=False) → None
__module__ = 'labgrid.driver.sshdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.ubootdriver module

The U-Boot Module contains the UBootDriver

class labgrid.driver.ubootdriver.UBootDriver(target, name, prompt='', password='', interrupt='n', init_commands=NOTHING, password_prompt='enter Password:', boot_expression='U-Boot 20\d+', bootstring='Linux version \d', login_timeout=30) → None[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. UBootDriver binds on top of a ConsoleProtocol.

Parameters:
  • prompt (str) – The default UBoot Prompt
  • password (str) – optional password to unlock UBoot
  • init_commands (Tuple[str]) – a tuple of commands to run after unlock
  • interrupt (str) – interrupt character to use to go to prompt
  • password_prompt (str) – string to detect the password prompt
  • boot_expression (str) – string to search for on UBoot start
  • bootstring (str) – string that indicates that the Kernel is booting
  • login_timeout (int) – optional, timeout for login prompt detection
bindings = {'console': <class 'labgrid.protocol.consoleprotocol.ConsoleProtocol'>}
__attrs_post_init__()[source]
on_activate()[source]

Activate the UBootDriver

This function checks for a prompt and awaits it if not already active

on_deactivate()[source]

Deactivate the UBootDriver

Simply sets the internal status to 0

run(cmd, timeout=None)[source]

Runs the specified command on the shell and returns the output.

Parameters:cmd (str) – command to run on the shell
Returns:if successful, None otherwise
Return type:Tuple[List[str],List[str], int]
get_status()[source]

Retrieve status of the UBootDriver. 0 means inactive, 1 means active.

Returns:status of the driver
Return type:int
reset()[source]

Reset the board via a CPU reset

await_boot()[source]

Wait for the initial Linux version string to verify we succesfully jumped into the kernel.

boot(name)[source]

Boot the default or a specific boot entry

Parameters:name (str) – name of the entry to boot
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='prompt', default='', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='password', default='', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='interrupt', default='\n', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='init_commands', default=Factory(factory=<class 'tuple'>, takes_self=False), validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=<class 'tuple'>, kw_only=False), Attribute(name='password_prompt', default='enter Password:', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='boot_expression', default='U-Boot 20\\d+', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='bootstring', default='Linux version \\d', validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='login_timeout', default=30, validator=<instance_of validator for type <class 'int'>>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, prompt='', password='', interrupt='\n', init_commands=NOTHING, password_prompt='enter Password:', boot_expression='U-Boot 20\\d+', bootstring='Linux version \\d', login_timeout=30) → None
__module__ = 'labgrid.driver.ubootdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.usbloader module

class labgrid.driver.usbloader.MXSUSBDriver(target, name, image=None) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.protocol.bootstrapprotocol.BootstrapProtocol

bindings = {'loader': {<class 'labgrid.resource.remote.NetworkMXSUSBLoader'>, <class 'labgrid.resource.udev.MXSUSBLoader'>}}
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
load(filename=None)[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='image', default=None, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, image=None) → None
__module__ = 'labgrid.driver.usbloader'
__repr__()

Automatically created by attrs.

class labgrid.driver.usbloader.IMXUSBDriver(target, name, image=None) → None[source]

Bases: labgrid.driver.common.Driver, labgrid.protocol.bootstrapprotocol.BootstrapProtocol

bindings = {'loader': {<class 'labgrid.resource.remote.NetworkMXSUSBLoader'>, <class 'labgrid.resource.udev.IMXUSBLoader'>, <class 'labgrid.resource.remote.NetworkIMXUSBLoader'>, <class 'labgrid.resource.udev.MXSUSBLoader'>}}
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
load(filename=None)[source]
__abstractmethods__ = frozenset()
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='image', default=None, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name, image=None) → None
__module__ = 'labgrid.driver.usbloader'
__repr__()

Automatically created by attrs.

labgrid.driver.usbsdmuxdriver module

class labgrid.driver.usbsdmuxdriver.USBSDMuxDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver

The USBSDMuxDriver uses the usbsdmux tool (https://github.com/pengutronix/usbsdmux) to control the USB-SD-Mux hardware

Parameters:bindings (dict) – driver to use with usbsdmux
bindings = {'mux': {<class 'labgrid.resource.udev.USBSDMuxDevice'>, <class 'labgrid.resource.remote.NetworkUSBSDMuxDevice'>}}
__attrs_post_init__()[source]
set_mode(mode)[source]
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.usbsdmuxdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.usbstorage module

class labgrid.driver.usbstorage.USBStorageDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver

bindings = {'storage': {<class 'labgrid.resource.udev.USBSDMuxDevice'>, <class 'labgrid.resource.udev.USBMassStorage'>}}
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
write_image(filename)[source]
get_size()[source]
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.usbstorage'
__repr__()

Automatically created by attrs.

labgrid.driver.usbtmcdriver module

class labgrid.driver.usbtmcdriver.USBTMCDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver

bindings = {'tmc': {<class 'labgrid.resource.remote.NetworkUSBTMC'>, <class 'labgrid.resource.udev.USBTMC'>}}
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
command(cmd)[source]
query(cmd, binary=False, raw=False)[source]
identify()[source]
get_channel_info(channel)[source]
get_channel_values(channel)[source]
get_screenshot()[source]
get_bool(cmd)[source]
get_int(cmd)[source]
get_decimal(cmd)[source]
get_str(cmd)[source]
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.usbtmcdriver'
__repr__()

Automatically created by attrs.

labgrid.driver.usbvideodriver module

class labgrid.driver.usbvideodriver.USBVideoDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver

bindings = {'video': {<class 'labgrid.resource.remote.NetworkUSBVideo'>, <class 'labgrid.resource.udev.USBVideo'>}}
get_caps()[source]
select_caps(hint=None)[source]
stream(caps_hint=None)[source]
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.usbvideodriver'
__repr__()

Automatically created by attrs.

labgrid.driver.xenadriver module

class labgrid.driver.xenadriver.XenaDriver(target, name) → None[source]

Bases: labgrid.driver.common.Driver

Xena Driver

bindings = {'xena_manager': <class 'labgrid.resource.xenamanager.XenaManager'>}
__attrs_post_init__()[source]
on_activate()[source]
on_deactivate()[source]
get_session()[source]
__attrs_attrs__ = (Attribute(name='target', default=NOTHING, validator=None, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='name', default=NOTHING, validator=<optional validator for <instance_of validator for type <class 'str'>> or None>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False), Attribute(name='state', default=<BindingState.idle: 0>, validator=None, repr=True, cmp=True, hash=None, init=False, metadata=mappingproxy({}), type=None, converter=None, kw_only=False))
__init__(target, name) → None
__module__ = 'labgrid.driver.xenadriver'
__repr__()

Automatically created by attrs.