Project

General

Profile

Actions

action #179996

open

Converting job templates yaml to use in SCENARIO_DEFINITIONS_YAML

Added by zagagyka about 1 month ago. Updated 19 days ago.

Status:
Feedback
Priority:
Low
Assignee:
Category:
Support
Target version:
Start date:
2025-04-03
Due date:
% Done:

0%

Estimated time:

Description

Is it possible to convert a YAML job template to use it in SCENARIO_DEFINITIONS_YAML?

For example, there is a job template yaml:

$ openqa-cli api job_templates_scheduling/54 | jq -r
defaults:
  x86_64:
    machine: 64bit
    priority: 50
products:
  dstr-v1-iso-x86_64:
    distri: dstr
    version: 'v1'
    flavor: iso
  dstr-v1-net-x86_64:
    distri: dstr
    version: 'v1'
    flavor: net
scenarios:
  x86_64:
    dstr-v1-iso-x86_64:
      - ts1
    dstr-v1-net-x86_64:
      - ts2

Is there a way to convert this into a YAML file like this:

$ cat test.yaml
---
products:
  dstr-v1-iso:
    distri: "dstr"
    flavor: "iso"
    arch: "x86_64"
    version: 'v1'
  dstr-v1-iso:
    distri: "dstr"
    flavor: "net"
    arch: "x86_64"
    version: 'v1'
machines:
  64bit:
    backend: "qemu"
job_templates:
  ts1:
    machine: 64bit
    product: "dstr-v1-iso"
    settings: {}
  ts2:
    machine: 64bit
    product: "dstr-v1-net"
    settings: {}

that it can be used when running tests?:
openqa-cli api -X POST isos --param-file SCENARIO_DEFINITIONS_YAML=test.yaml DISTRI=dstr VERSION=v1 FLAVOR=iso ARCH=x86_64 BUILD=_TEST ISO=distr-x86_64.iso
(This example is small and it can manually convert yaml, but with a large number of tests it may take a long time)

And also, is it possible to specify several machines or product in one test, for example:

  ts1:
    machine: [64bit, 64bit_uefi]
    product: "dstr-v1-iso"
    settings: {}

(this yaml is not being validated by OpenQA)

Acceptance Criteria

  • AC1:

Suggestions


Related issues 1 (0 open1 closed)

Related to openQA Project (public) - action #155218: [spike][timeboxed:30h] Use scenario definitions instead of job group templates for os-autoinst-distri-opensuse size:MResolvedtinita

Actions
Actions

Also available in: Atom PDF