Skip to content

Questions on Dealing with Multiple Places #1488

@Rubusch

Description

@Rubusch

Hi, this is probably rather a "discussion" than an "issue"...

Currently I'll have around 8 places. A place consists of a DUT and a RPi with the labgrid-exporter(s) as systemd service, [labgrid v24.1]. Originally I liked to put my 8 RemotePlaces into one target "lab" in the exporter config. Then I used 8 different client environments. Doing it as in the configs down below, I could merge the client environments into one. But now I end up with 8 targets, providing the same name as RemotePlace. I know similar things were described in the documentation, but I could not figure out, neither found examples (this might be the small issue: please provide some .yaml examples with multiple RemotePlaces).

Questions:

  1. What is the difference between a "target" and a "resources/RemotePlace" from a setup point of view?
  2. Isn't there a way to declare a single target "lab" and in the client environment do a list of several "RemotePlace" names? Can you provide a snippet for this case?
  3. Most configs are the same, but some will have the usbsdmux attached, so as below UNIT01. So, how to merge redundant parts of the labgrid-client config, and setting up individually additional features?
  4. I need several NetworkService e.g. on UNIT03 I need a NetworkService on 1.2.3.49 (RPi) and another one 1.2.3.50 (DUT) - how to configure this case for the labgrid-exporter and for the labgrid-client?
  5. Also open for further issue in my configs.. I'd like to implement power control rather as driver, but this will be another issue. Somehow this approach fits me currently.

Labgrid-client Environment (reduced..)

targets:
  UNIT01:
    resources:
      RemotePlace:
        name: 'UNIT01'
    drivers:
      ExternalPowerDriver:
        cmd_on: 'ssh pi@${LG_PLACE} sudo /usr/bin/gpio26.sh start'
        cmd_off: 'ssh pi@${LG_PLACE} sudo /usr/bin/gpio26.sh stop'
        cmd_cycle: 'ssh pi@${LG_PLACE} "sudo /usr/bin/gpio26.sh stop && sleep 1 && sudo /usr/bin/gpio26.sh start"'
      SerialDriver: {}
      SSHDriver:
        keyfile: '~/.ssh/id_ed25519__foo'
      USBSDMuxDriver: {}
  UNIT03:
    resources:
      RemotePlace:
        name: 'UNIT03'
    drivers:
      ExternalPowerDriver:
        cmd_on: 'ssh pi@${LG_PLACE} sudo /usr/bin/gpio26.sh start'
        cmd_off: 'ssh pi@${LG_PLACE} sudo /usr/bin/gpio26.sh stop'
        cmd_cycle: 'ssh pi@${LG_PLACE} "sudo /usr/bin/gpio26.sh stop && sleep 1 && sudo /usr/bin/gpio26.sh start"'
      SerialDriver: {}
      SSHDriver:
        keyfile: '~/.ssh/id_ed25519__foo'
tools:
  usbsdmux: '${BASE}/../../venv/bin/usbsdmux'
options:
  crossbar_url: 'ws://foo:20408/ws'

Labgrid-exporter UNIT01

UNIT01:
  location: UNIT01
  USBSerialPort:
    match:
      ID_PATH: platform-3f980000.usb-usb-0:1.1.3:1.1
    speed: 115200
  NetworkInterface:
    ifname: eth0
  NetworkService:
    address: '1.2.3.17'
    username: 'pi'
  USBSDMuxDevice:
    match:
      ID_SERIAL_SHORT: '000000001197'

Labgrid-exporter UNIT03

UNIT03:
  location: UNIT03
  USBSerialPort:
    match:
      ID_PATH: platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2:1.1
    speed: 115200
  NetworkInterface:
    ifname: eth0
  NetworkService:
    address: '1.2.3.49'
    username: 'pi'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions