Resources API¶
Resources are configuration descriptors for hardware and network components.
On this page:
VesyncOutlet¶
- class adi_lg_plugins.resources.vesync.VesyncOutlet(target, name, outlet_names, username, password, delay=5.0)[source]¶
Bases:
ResourceThe VeSyncOutlet describes a smart outlet controlled with VeSync
- Parameters:
- __init__(target, name, outlet_names, username, password, delay=5.0)¶
Method generated by attrs for class VesyncOutlet.
- Return type:
None
CyberPowerOutlet¶
- class adi_lg_plugins.resources.cyberpowerpdu.CyberPowerOutlet(target, name, address, outlet, delay=5.0)[source]¶
Bases:
ResourceThe CyberPowerOutlet describes a smart outlet controlled with CyberPower
- Parameters:
- __init__(target, name, address, outlet, delay=5.0)¶
Method generated by attrs for class CyberPowerOutlet.
- Return type:
None
HomeAssistantOutlet¶
- class adi_lg_plugins.resources.homeassistant.HomeAssistantOutlet(target, name, url, token, entity_id, delay=5.0)[source]¶
Bases:
ResourceThe HomeAssistantOutlet describes a switch/outlet controlled via Home Assistant REST API
- Parameters:
url (str) – Base URL of the Home Assistant instance (e.g. http://192.168.1.100:8123)
token (str) – Long-lived access token for Home Assistant authentication
entity_id (str) – Entity ID of the switch to control (e.g. switch.lab_outlet_1)
delay (float, default=5.0) – delay between power off and power on during reset operation
- __init__(target, name, url, token, entity_id, delay=5.0)¶
Method generated by attrs for class HomeAssistantOutlet.
- Return type:
None
MassStorageDevice¶
- class adi_lg_plugins.resources.massstorage.MassStorageDevice(target, name, path, file_updates={}, use_with_sdmux=False)[source]¶
Bases:
ResourceThe MassStorageDevice describes a USB mass storage device
- Parameters:
- __init__(target, name, path, file_updates={}, use_with_sdmux=False)¶
Method generated by attrs for class MassStorageDevice.
- Return type:
None
KuiperRelease¶
- class adi_lg_plugins.resources.kuiperrelease.KuiperRelease(target, name, release_version, cache_path='~/.labgrid/kuiper_releases/', kernel_path=None, BOOTBIN_path=None, device_tree_path=None)[source]¶
Bases:
ResourceThe KuiperRelease describes a Kuiper release resource
- Parameters:
release_version (str) – Version of the Kuiper release to download and manage.
cache_path (str) – Path to cache the downloaded Kuiper release. Defaults to /home/<user>/.labgrid/kuiper_releases/
kernel_path (str) – Path to the kernel file to use with the Kuiper release.
BOOTBIN_path (str) – Path to the BOOTBIN file to use with the Kuiper release.
device_tree_path (str) – Path to the device tree file to use with the Kuiper release.
- __init__(target, name, release_version, cache_path='~/.labgrid/kuiper_releases/', kernel_path=None, BOOTBIN_path=None, device_tree_path=None)¶
Method generated by attrs for class KuiperRelease.
- Return type:
None
CloudsmithRelease¶
- class adi_lg_plugins.resources.cloudsmithrelease.CloudsmithRelease(target, name, fpga_carrier=None, daughter_card=None, vfilter=None, vnot=None, owner='adi', repo='sdg-boot-partition', filename='BOOT.BIN', version=None, api_token=NOTHING, cache_path='~/.labgrid/cloudsmith_releases/')[source]¶
Bases:
ResourceThe CloudsmithRelease describes a Cloudsmith-hosted boot artifact.
The driver resolves a package from a Cloudsmith package repo (default
adi/sdg-boot-partition) by full-text search on the filename plus the FPGA carrier and daughter card, then downloads the matching file (e.g.BOOT.BIN). By default the latest matching package is used; setversionto pin an exact package version for reproducibility.- Parameters:
fpga_carrier (str) – Optional short FPGA carrier name, e.g.
zcu102.daughter_card (str) – Optional daughter card / chip, e.g.
adrv9009.vfilter (str | list[str]) – Optional filter term(s) to narrow the search. A single string or a list/tuple of strings; each term adds an
AND version:*term*clause to the query.vnot (str | list[str]) – Optional term(s) to exclude from the search. A single string or a list/tuple of strings; each term adds an
AND version:~termclause to the query.owner (str) – Cloudsmith owner/org. Defaults to
adi.repo (str) – Cloudsmith repository. Defaults to
sdg-boot-partition.filename (str) – Artifact filename to resolve. Defaults to
BOOT.BIN.version (str) – Optional exact package version to pin. If None, the latest matching package is resolved.
api_token (str) – Cloudsmith API token. Defaults to the
CLOUDSMITH_API_TOKENenvironment variable.cache_path (str) – Path to cache downloaded artifacts. Defaults to
~/.labgrid/cloudsmith_releases/.boot_file_path (str) – Resolved local path to the downloaded file. Set by the driver after download; not a constructor argument.
- __init__(target, name, fpga_carrier=None, daughter_card=None, vfilter=None, vnot=None, owner='adi', repo='sdg-boot-partition', filename='BOOT.BIN', version=None, api_token=NOTHING, cache_path='~/.labgrid/cloudsmith_releases/')¶
Method generated by attrs for class CloudsmithRelease.
- Return type:
None
TFTPServerResource¶
- class adi_lg_plugins.resources.tftpserver.TFTPServerResource(target, name, address='auto', port=3069, root='/var/lib/tftpboot')[source]¶
Bases:
ResourceResource to configure or discover the TFTP server address.
- __init__(target, name, address='auto', port=3069, root='/var/lib/tftpboot')¶
Method generated by attrs for class TFTPServerResource.
- Return type:
None
XilinxDeviceJTAG¶
- class adi_lg_plugins.resources.xilinxdevice.XilinxDeviceJTAG(target, name='xilinxdevicejtag', root_target=1, microblaze_target=3, bitstream_path=None, kernel_path=None, devicetree_path=None)[source]¶
Bases:
ResourceXilinx FPGA device JTAG configuration.
Defines JTAG target IDs and file paths for Virtex/Artix/Kintex FPGAs with Microblaze soft processors.
- root_target¶
JTAG target ID for root device (default: 1). This is typically the FPGA fabric target identified by xsdb ‘targets’ command.
- Type:
- microblaze_target¶
JTAG target ID for Microblaze processor (default: 3). This is typically the processor core target for xsdb commands.
- Type:
- bitstream_path¶
Path to FPGA bitstream file (.bit). Required when using BootFabric strategy. Must exist on filesystem.
- Type:
str, optional
- kernel_path¶
Path to Microblaze Linux kernel image (.strip). Required when using BootFabric strategy. Must exist on filesystem.
- Type:
str, optional
- devicetree_path¶
Path to device tree binary (.dtb). Only needed if device tree is separate from kernel image.
- Type:
str, optional
- __init__(target, name='xilinxdevicejtag', root_target=1, microblaze_target=3, bitstream_path=None, kernel_path=None, devicetree_path=None)¶
Method generated by attrs for class XilinxDeviceJTAG.
- Return type:
None
XilinxVivadoTool¶
- class adi_lg_plugins.resources.xilinxtool.XilinxVivadoTool(target, name='xilinxvivadotool', vivado_path='/tools/Xilinx/2025.1/Vivado', version=None, xsdb_path=None)[source]¶
Bases:
ResourceXilinx Vivado/Vitis tool installation configuration.
Stores paths used by the XilinxJTAGDriver; does NOT probe the local filesystem, so it round-trips safely through a coordinator (the xsdb binary may live only on the exporter host, not the test runner).
- vivado_path¶
root of the Vivado install (e.g. “/tools/Xilinx/2025.1/Vivado”). On newer Xilinx installs the xsdb binary sits under a sibling “Vitis/bin” directory, so by default xsdb_path is derived as {dirname(vivado_path)}/Vitis/bin/xsdb. Override xsdb_path explicitly if your install is laid out differently.
- version¶
optional Vivado version string (informational).
- xsdb_path¶
absolute path to xsdb on the host that will run it (typically the exporter host). Auto-derived when unset.
- __init__(target, name='xilinxvivadotool', vivado_path='/tools/Xilinx/2025.1/Vivado', version=None, xsdb_path=None)¶
Method generated by attrs for class XilinxVivadoTool.
- Return type:
None