labgrid.strategy package

Submodules

labgrid.strategy.bareboxstrategy module

exception labgrid.strategy.bareboxstrategy.StrategyError(msg)[source]

Bases: Exception

msg = Attribute(name='msg', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=True, init=True, convert=None, metadata=mappingproxy({}))
class labgrid.strategy.bareboxstrategy.Status[source]

Bases: enum.Enum

An enumeration.

unknown = 0
barebox = 1
shell = 2
class labgrid.strategy.bareboxstrategy.BareboxStrategy(target, status=<Status.unknown: 0>)[source]

Bases: labgrid.strategy.common.Strategy

BareboxStrategy - Strategy to switch to barebox or shell

bindings = {'power': <class 'labgrid.protocol.powerprotocol.PowerProtocol'>, 'shell': <class 'labgrid.driver.shelldriver.ShellDriver'>, 'barebox': <class 'labgrid.driver.bareboxdriver.BareboxDriver'>}
status = Attribute(name='status', default=<Status.unknown: 0>, validator=None, repr=True, cmp=True, hash=True, init=True, convert=None, metadata=mappingproxy({}))
transition(status, *, step)[source]

labgrid.strategy.common module

class labgrid.strategy.common.Strategy(target)[source]

Bases: labgrid.driver.common.Driver

Represents a strategy which places a target into a requested state by calling specific drivers. A strategy usually needs to know some details of a given target.

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

TODO: This might also be just a driver?

on_client_bound(client)[source]
on_activate()[source]
on_deactivate()[source]
resolve_conflicts(client)[source]

labgrid.strategy.ubootstrategy module

exception labgrid.strategy.ubootstrategy.StrategyError(msg)[source]

Bases: Exception

msg = Attribute(name='msg', default=NOTHING, validator=<instance_of validator for type <class 'str'>>, repr=True, cmp=True, hash=True, init=True, convert=None, metadata=mappingproxy({}))
class labgrid.strategy.ubootstrategy.Status[source]

Bases: enum.Enum

An enumeration.

unknown = 0
uboot = 1
shell = 2
class labgrid.strategy.ubootstrategy.UBootStrategy(target, status=<Status.unknown: 0>)[source]

Bases: labgrid.strategy.common.Strategy

UbootStrategy - Strategy to switch to uboot or shell

bindings = {'uboot': <class 'labgrid.driver.ubootdriver.UBootDriver'>, 'power': <class 'labgrid.protocol.powerprotocol.PowerProtocol'>, 'shell': <class 'labgrid.driver.shelldriver.ShellDriver'>}
status = Attribute(name='status', default=<Status.unknown: 0>, validator=None, repr=True, cmp=True, hash=True, init=True, convert=None, metadata=mappingproxy({}))
transition(status)[source]