Resources API

Resources are configuration descriptors for hardware and network components.

VesyncOutlet

class adi_lg_plugins.resources.vesync.VesyncOutlet(target, name, outlet_names, username, password, delay=5.0)[source]

Bases: Resource

The VeSyncOutlet describes a smart outlet controlled with VeSync

Parameters:
  • outlet_names (str) – list of outlet names to control separated by commas

  • username (str) – VeSync account username (email)

  • password (str) – VeSync account password

  • delay (float, default=5.0) – delay between power off and power on during reset operation

__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: Resource

The CyberPowerOutlet describes a smart outlet controlled with CyberPower

Parameters:
  • address (str) – IP address of the CyberPower PDU

  • outlet (int) – Outlet number on the PDU to control

  • delay (float, default=5.0) – delay between power off and power on during reset operation

__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: Resource

The 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: Resource

The MassStorageDevice describes a USB mass storage device

Parameters:
  • path (str) – Path to the mass storage device. Can be device path, sysfs path or USB path.

  • file_updates – dict: mapping of source file paths to destination paths on the mass storage device

  • use_with_sdmux (bool) – Manage state with USBSDMuxDriver if True in strategy. Default: False

__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: Resource

The 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

TFTPServerResource

class adi_lg_plugins.resources.tftpserver.TFTPServerResource(target, name, address='auto', port=3069, root='/var/lib/tftpboot')[source]

Bases: Resource

Resource to configure or discover the TFTP server address.

get_ip()[source]

Returns the configured IP or discovers it if set to ‘auto’.

__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: Resource

Xilinx 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:

int

microblaze_target

JTAG target ID for Microblaze processor (default: 3). This is typically the processor core target for xsdb commands.

Type:

int

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: Resource

Xilinx 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