https://github.com/bcdevices/pypltagent-eth
Python pltagent, allowing a PLT to control an SBC/PC over Ethernet
https://github.com/bcdevices/pypltagent-eth
Last synced: 5 months ago
JSON representation
Python pltagent, allowing a PLT to control an SBC/PC over Ethernet
- Host: GitHub
- URL: https://github.com/bcdevices/pypltagent-eth
- Owner: bcdevices
- License: mit
- Created: 2025-01-08T16:01:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-31T15:22:40.000Z (over 1 year ago)
- Last Synced: 2025-08-02T02:55:16.558Z (11 months ago)
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pypltagent-eth
Python pltagent, allowing PLT to control an SBC/PC over Ethernet
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
© 2025 Blue Clover Devices - ALL RIGHTS RESERVED
[](https://github.com/bcdevices/pypltagent-eth/actions/workflows/ci.yml)
- IPv6 Link-Local , port 8080
## Installation (.deb)
On Debian-based Linux platforms, pypltagent can be installed using ``apt install``:
```console
operator@progpc:~$ sudo apt install -y ./pypltagent-0.1.4.noarch.deb
:
Preparing to unpack .../pypltagent-0.1.4.noarch.deb ...
Unpacking pypltagent (1.0) ...
Setting up pypltagent (1.0) ...
Created symlink /etc/systemd/system/multi-user.target.wants/pypltagent.service → /usr/lib/systemd/system/pypltagent.service.
pypltagent service installed and started.
OK
:
operator@progpc:~$
```
## Usage (PLT test plan)
```yaml
title: "Remote command execution"
suite:
- ident: AGENT
title: "New SBC Session"
steps:
- command: agentCfg SBC
id: "a0:36:bc:57:9c:a8" # Ethernet MAC address of pypltagent host
with:
- "firmware.hex"
- command: agentExec SBC "hostname"
```
See also:
[PLT Reference Documentation](https://docs.pltcloud.com/):
- [Test Plan Reference](https://docs.pltcloud.com/TestPlanReference/) >
[Test Commands](https://docs.pltcloud.com/TestPlanReference/command/) :
- [agentCfg - Configure Agent](https://docs.pltcloud.com/TestPlanReference/command/agentCfg/)
- [agentExec - Execute command on Agent](https://docs.pltcloud.com/TestPlanReference/command/agentExec/)
## Command Line Usage
```
usage: pypltagent-eth.py [-h] [--host HOST] [--port PORT]
[--upload-folder UPLOAD_FOLDER]
pypltagent-eth
optional arguments:
-h, --help show this help message and exit
--host HOST The host to listen on (default: '::')
--port PORT The port to listen on (default: 8080)
--upload-folder UPLOAD_FOLDER
The folder to save uploaded files (default: 'uploads')
```
## POST
Command:
```json
{
"command": "prog.sh"
}
```
Response:
```json
{
"command": "prog.sh",
"retval": 13,
"stdout": ["line1", "line2"],
"stderr": [],
"status": "completed",
"passFail": "PASS"
}
```
## PUT
- ``uploads`` folder
## Local build
```console
$ docker run --rm -v $(pwd):/app -w /app python:3 bash -c "pip install flake8 && flake8 ."
```
```console
$ docker run --rm -v "$(pwd):/app" python:3 bash -c "pip install autopep8 && autopep8 --in-place --recursive /app"
```