wlauto.modules package¶
Submodules¶
wlauto.modules.active_cooling module¶
-
class
wlauto.modules.active_cooling.
MbedFanActiveCooling
(owner, **kwargs)[source]¶ Bases:
wlauto.core.extension.Module
-
aliases
= AC([])¶
-
artifacts
= AC([])¶
-
capabilities
= ['active_cooling']¶
-
core_modules
= []¶
-
description
= 'Controls a cooling fan via an mbed connected to a serial port.'¶
-
finalize
(*args, **kwargs)¶
-
initialize
(*args, **kwargs)¶
-
kind
= 'module'¶
-
name
= 'mbed-fan'¶
-
parameters
= AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'port', 'constraint': None, 'default': '/dev/ttyACM0', 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'buad', 'constraint': None, 'default': 115200, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'fan_pin', 'constraint': None, 'default': 0, 'allowed_values': None, 'global_alias': None, 'override': False})"])¶
-
timeout
= 30¶
-
validate
(*args, **kwargs)¶
-
-
class
wlauto.modules.active_cooling.
OdroidXU3ctiveCooling
(owner, **kwargs)[source]¶ Bases:
wlauto.core.extension.Module
-
aliases
= AC([])¶
-
artifacts
= AC([])¶
-
capabilities
= ['active_cooling']¶
-
core_modules
= []¶
-
description
= '\n Enabled active cooling by controling the fan an Odroid XU3\n\n .. note:: depending on the kernel used, it may not be possible to turn the fan\n off completely; in such situations, the fan will be set to its minimum\n speed.\n\n '¶
-
finalize
(*args, **kwargs)¶
-
initialize
(*args, **kwargs)¶
-
kind
= 'module'¶
-
name
= 'odroidxu3-fan'¶
-
parameters
= AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})"])¶
-
validate
(*args, **kwargs)¶
-
wlauto.modules.cgroups module¶
-
class
wlauto.modules.cgroups.
Cgroups
(owner, **kwargs)[source]¶ Bases:
wlauto.core.extension.Module
-
aliases
= AC([])¶
-
artifacts
= AC([])¶
-
capabilities
= ['cgroups']¶
-
controllers
= [<wlauto.modules.cgroups.CpusetController object>]¶
-
core_modules
= []¶
-
description
= '\n Adds cgroups query and manupution APIs to a Device interface.\n\n Currently, only cpusets controller is supported.\n\n '¶
-
finalize
(*args, **kwargs)¶
-
initialize
(*args, **kwargs)¶
-
kind
= 'module'¶
-
name
= 'cgroups'¶
-
parameters
= AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'cgroup_root', 'constraint': None, 'default': '/sys/fs/cgroup', 'allowed_values': None, 'global_alias': None, 'override': False})"])¶
-
validate
(*args, **kwargs)¶
-
wlauto.modules.cpufreq module¶
-
class
wlauto.modules.cpufreq.
CpufreqModule
(owner, **kwargs)[source]¶ Bases:
wlauto.core.extension.Module
-
aliases
= AC([])¶
-
artifacts
= AC([])¶
-
capabilities
= ['cpufreq']¶
-
core_modules
= []¶
-
description
= '\n cpufreq-related functionality module for the device. Query and set frequencies, governors, etc.\n\n APIs in this module break down into three categories: those that operate on cpus, those that\n operate on cores, and those that operate on clusters.\n\n "cpu" APIs expect a cpufreq CPU id, which could be either an integer or or a string of the\n form "cpu0".\n\n "cluster" APIs expect a cluster ID. This is an integer as defined by the\n ``device.core_clusters`` list.\n\n "core" APIs expect a core name, as defined by ``device.core_names`` list.\n\n '¶
-
finalize
(*args, **kwargs)¶
-
get_cluster_active_cpu
(cluster)[source]¶ Returns the first active cpu for the cluster. If the entire cluster has been hotplugged, this will raise a
ValueError
.
-
get_core_clusters
(core, strict=True)[source]¶ Returns the list of clusters that contain the specified core. if
strict
isTrue
, raises ValueError if no clusters has been found (returns empty list ifstrict
isFalse
).
-
get_cpu_frequency
(cpu)[source]¶ Returns the current frequency currently set for the specified CPU.
Warning, this method does not check if the cpu is online or not. It will try to read the current frequency and the following exception will be raised
:raises: DeviceError if for some reason the frequency could not be read.
-
get_cpu_max_frequency
(cpu)[source]¶ Returns the max frequency currently set for the specified CPU.
Warning, this method does not check if the cpu is online or not. It will try to read the maximum frequency and the following exception will be raised
:raises: DeviceError if for some reason the frequency could not be read.
-
get_cpu_min_frequency
(cpu)[source]¶ Returns the min frequency currently set for the specified CPU.
Warning, this method does not check if the cpu is online or not. It will try to read the minimum frequency and the following exception will be raised
:raises: DeviceError if for some reason the frequency could not be read.
-
initialize
(*args, **kwargs)¶
-
kind
= 'module'¶
-
list_available_cpu_frequencies
(cpu)[source]¶ Returns a list of frequencies supported by the cpu or an empty list if not could be found.
-
list_available_cpu_governor_tunables
(cpu)[source]¶ Returns a list of tunables available for the governor on the specified CPU.
-
name
= 'devcpufreq'¶
-
parameters
= AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})"])¶
-
set_cpu_frequency
(cpu, frequency, exact=True)[source]¶ Set’s the minimum value for CPU frequency. Actual frequency will depend on the Governor used and may vary during execution. The value should be either an int or a string representing an integer.
If
exact
flag is set (the default), the Value must also be supported by the device. The available frequencies can be obtained by calling get_available_frequencies() or examining/sys/devices/system/cpu/cpuX/cpufreq/scaling_available_frequencies
on the device (if it exists).
Raises: ConfigError if the frequency is not supported by the CPU. Raises: DeviceError if, for some reason, frequency could not be set.
-
set_cpu_governor
(cpu, governor, **kwargs)[source]¶ Set the governor for the specified CPU. See https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt
Parameters: - cpu – The CPU for which the governor is to be set. This must be the full name as it appears in sysfs, e.g. “cpu0”.
- governor – The name of the governor to be used. This must be supported by the specific device.
Additional keyword arguments can be used to specify governor tunables for governors that support them.
Note: On big.LITTLE all cores in a cluster must be using the same governor. Setting the governor on any core in a cluster will also set it on all other cores in that cluster. Raises: ConfigError if governor is not supported by the CPU. Raises: DeviceError if, for some reason, the governor could not be set.
-
set_cpu_governor_tunables
(cpu, governor, **kwargs)[source]¶ Set tunables for the specified governor. Tunables should be specified as keyword arguments. Which tunables and values are valid depends on the governor.
Parameters: - cpu – The cpu for which the governor will be set. This must be the
full cpu name as it appears in sysfs, e.g.
cpu0
. - governor – The name of the governor. Must be all lower case.
The rest should be keyword parameters mapping tunable name onto the value to be set for it.
Raises: ConfigError if governor specified is not a valid governor name, or if a tunable specified is not valid for the governor. Raises: DeviceError if could not set tunable. - cpu – The cpu for which the governor will be set. This must be the
full cpu name as it appears in sysfs, e.g.
-
set_cpu_max_frequency
(cpu, frequency)[source]¶ Set’s the minimum value for CPU frequency. Actual frequency will depend on the Governor used and may vary during execution. The value should be either an int or a string representing an integer. The Value must also be supported by the device. The available frequencies can be obtained by calling get_available_frequencies() or examining
/sys/devices/system/cpu/cpuX/cpufreq/scaling_available_frequencies
on the device.
Raises: ConfigError if the frequency is not supported by the CPU. Raises: DeviceError if, for some reason, frequency could not be set.
-
set_cpu_min_frequency
(cpu, frequency)[source]¶ Set’s the minimum value for CPU frequency. Actual frequency will depend on the Governor used and may vary during execution. The value should be either an int or a string representing an integer. The Value must also be supported by the device. The available frequencies can be obtained by calling get_available_frequencies() or examining
/sys/devices/system/cpu/cpuX/cpufreq/scaling_available_frequencies
on the device.
Raises: ConfigError if the frequency is not supported by the CPU. Raises: DeviceError if, for some reason, frequency could not be set.
-
validate
(*args, **kwargs)¶
-
wlauto.modules.cpuidle module¶
-
class
wlauto.modules.cpuidle.
Cpuidle
(owner, **kwargs)[source]¶ Bases:
wlauto.core.extension.Module
-
aliases
= AC([])¶
-
artifacts
= AC([])¶
-
capabilities
= ['cpuidle']¶
-
core_modules
= []¶
-
description
= '\n Adds cpuidle state query and manupution APIs to a Device interface.\n\n '¶
-
finalize
(*args, **kwargs)¶
-
initialize
(*args, **kwargs)¶
-
kind
= 'module'¶
-
name
= 'cpuidle'¶
-
parameters
= AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})"])¶
-
root_path
= '/sys/devices/system/cpu/cpuidle'¶
-
validate
(*args, **kwargs)¶
-
wlauto.modules.flashing module¶
-
class
wlauto.modules.flashing.
FastbootFlasher
(owner, **kwargs)[source]¶ Bases:
wlauto.modules.flashing.Flasher
-
aliases
= AC([])¶
-
artifacts
= AC([])¶
-
core_modules
= []¶
-
delay
= 0.5¶
-
description
= '\n Enables automated flashing of images using the fastboot utility.\n\n To use this flasher, a set of image files to be flused are required.\n In addition a mapping between partitions and image file is required. There are two ways\n to specify those requirements:\n\n - Image mapping: In this mode, a mapping between partitions and images is given in the agenda.\n - Image Bundle: In This mode a tarball is specified, which must contain all image files as well\n as well as a partition file, named ``partitions.txt`` which contains the mapping between\n partitions and images.\n\n The format of ``partitions.txt`` defines one mapping per line as such: ::\n\n kernel zImage-dtb\n ramdisk ramdisk_image\n\n '¶
-
finalize
(*args, **kwargs)¶
-
initialize
(*args, **kwargs)¶
-
kind
= 'module'¶
-
name
= 'fastboot'¶
-
parameters
= AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})"])¶
-
partitions_file_name
= 'partitions.txt'¶
-
serial_timeout
= 30¶
-
validate
(*args, **kwargs)¶
-
-
class
wlauto.modules.flashing.
Flasher
(owner, **kwargs)[source]¶ Bases:
wlauto.core.extension.Module
Implements a mechanism for flashing a device. The images to be flashed can be specified either as a tarball “image bundle” (in which case instructions for flashing are provided as flasher-specific metadata also in the bundle), or as individual image files, in which case instructions for flashing as specified as part of flashing config.
Note
It is important that when resolving configuration, concrete flasher implementations prioritise settings specified in the config over those in the bundle (if they happen to clash).
-
aliases
= AC([])¶
-
artifacts
= AC([])¶
-
capabilities
= ['flash']¶
-
core_modules
= []¶
-
finalize
(*args, **kwargs)¶
-
flash
(image_bundle=None, images=None)[source]¶ Flashes the specified device using the specified config. As a post condition, the device must be ready to run workloads upon returning from this method (e.g. it must be fully-booted into the OS).
-
initialize
(*args, **kwargs)¶
-
parameters
= AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})"])¶
-
validate
(*args, **kwargs)¶
-
-
class
wlauto.modules.flashing.
VersatileExpressFlasher
(owner, **kwargs)[source]¶ Bases:
wlauto.modules.flashing.Flasher
-
aliases
= AC([])¶
-
artifacts
= AC([])¶
-
core_modules
= []¶
-
description
= "\n Enables flashing of kernels and firmware to ARM Versatile Express devices.\n\n This modules enables flashing of image bundles or individual images to ARM\n Versatile Express-based devices (e.g. JUNO) via host-mounted MicroSD on the\n board.\n\n The bundle, if specified, must reflect the directory structure of the MicroSD\n and will be extracted directly into the location it is mounted on the host. The\n images, if specified, must be a dict mapping the absolute path of the image on\n the host to the destination path within the board's MicroSD; the destination path\n may be either absolute, or relative to the MicroSD mount location.\n\n "¶
-
finalize
(*args, **kwargs)¶
-
initialize
(*args, **kwargs)¶
-
kind
= 'module'¶
-
name
= 'vexpress'¶
-
parameters
= AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})"])¶
-
validate
(*args, **kwargs)¶
-
wlauto.modules.reset module¶
-
class
wlauto.modules.reset.
NetioSwitchReset
(owner, **kwargs)[source]¶ Bases:
wlauto.core.extension.Module
-
aliases
= AC([])¶
-
artifacts
= AC([])¶
-
capabilities
= ['reset_power']¶
-
core_modules
= []¶
-
description
= '\n Enables hard reset of devices connected to a Netio ethernet power switch\n '¶
-
finalize
(*args, **kwargs)¶
-
initialize
(*args, **kwargs)¶
-
kind
= 'module'¶
-
name
= 'netio_switch'¶
-
parameters
= AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'host', 'constraint': None, 'default': 'ippowerbar', 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'port', 'constraint': None, 'default': 1234, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'username', 'constraint': None, 'default': 'admin', 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'password', 'constraint': None, 'default': 'admin', 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'psu', 'constraint': None, 'default': 1, 'allowed_values': None, 'global_alias': None, 'override': False})"])¶
-
validate
(*args, **kwargs)¶
-