Currently testbed-cdrouter.py only supports importing packages from
opaque .gz binary exports via the package_import subcommand. This
requires staging, committing, and name-patching through the CDRouter
import API, and provides no way to define packages as readable,
version-controlled YAML.
So lets add a resolve_manifest() method that loads YAML package
manifests with full include resolution and a package_apply
subcommand that upserts packages on the CDRouter instance via the
packages API.
The manifest resolver has strict validation:
- Key allowlist (name, description, includes, tests, options,
dedup_tests); unknown keys are rejected
- Forbidden keys (config, device, config_id, device_id)
- Root manifest name must match its filename
- Group manifests (under groups/) must not define name,
description, or options
- Type checks on all fields
Include resolution uses depth-first traversal with cycle
detection, path traversal rejection, and root-wins option merge.
Test deduplication is configurable via the root-only dedup_tests
boolean (defaults to false, preserving duplicates). Non-root
manifests (both includes and groups) must not define dedup_tests.
The package_apply subcommand performs deterministic upserts:
it always writes the complete manifest-driven state (testlist,
description, options) and only creates a new package on genuine
not-found errors from the CDRouter API.
Runtime config/device binding remains in the existing package_run
flow, keeping package manifests environment-agnostic.
References: PCF-2532
Assisted-by: codex:gpt-5.4:xhigh
Assisted-by: claude:opus-4-6:1m-context
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
|
||
|---|---|---|
| .. | ||
| build.d | ||
| dut-init | ||
| prplMesh | ||
| cdrouter-package-convert.py | ||
| cdrouter-pretty-failures.awk | ||
| helpers.sh | ||
| prpl-jira.py | ||
| README.md | ||
| requirements.txt | ||
| testbed-cdrouter.py | ||
| testbed-device.py | ||
Content
This directory contains files used mainly during testing on the GitLab CI.
requirements.txt
This requirements.txt file is used for specifying what Python packages are required to run the scripts in this directory. Usually used with pip install -f requirements.txt command.
prpl-jira.py
This helper Python script creates new or updates existing Jira ticket when something goes wrong during GitLab CI testing process. Currently only supports reporting of build test failures.
Needs Python version 3.6+ due to use of f-strings feature.
testbed-device.py
This helper Python scripts allows managing of device under test (DUT) via labgrid framework.