Skip to content

Commit

Permalink
Make arch field unsupported in the spec
Browse files Browse the repository at this point in the history
The `arch` field is currently special, and unsupported if it is
set in the hardware field. Fix this discrepancy and make sure a
warning is show so users are aware to not use it here.

Signed-off-by: Miroslav Vadkerti <[email protected]>
  • Loading branch information
thrix authored and psss committed Dec 7, 2023
1 parent 38eacf7 commit 395aa33
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
13 changes: 8 additions & 5 deletions spec/hardware/arch.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ description: |
# String, any of well-known short architecture names.
arch: "aarch64"|"i386"|"ppc64"|"ppc64le"|"s390x"|"x86_64"|...

.. warning::

This field is not supported under ``hardware``. It is planned
to be supported in the future. Use the ``arch`` field of specific
provision plugins to select the architecture. If this field
is used in Testing Farm's hardware requirements the request
will abort.

example:
- |
# Require a good old x86_64 box
arch: x86_64

link:
- implemented-by: /tmt/steps/provision/artemis.py
- implemented-by: /tmt/steps/provision/mrack.py
- implemented-by: /tmt/steps/provision/testcloud.py
4 changes: 2 additions & 2 deletions tests/unit/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_plans_schema(tree, plan):
"""
---
arch: x86_64
#arch: x86_64
boot:
method: bios
compatible:
Expand Down Expand Up @@ -160,7 +160,7 @@ def test_plans_schema(tree, plan):
---
and:
- arch: x86_64
#- arch: x86_64
- cpu:
model-name: foo
- memory: 8 GiB
Expand Down
9 changes: 5 additions & 4 deletions tmt/schemas/provision/hardware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ $schema: http://json-schema.org/draft-07/schema

definitions:
# HW requirements: `arch`
arch:
type: string
# NOTE: not yet supported in hardware
# arch:
# type: string

# HW requirements: `boot` block
boot:
Expand Down Expand Up @@ -298,8 +299,8 @@ definitions:
type: object

properties:
arch:
"$ref": "#/definitions/arch"
# arch:
# "$ref": "#/definitions/arch"

boot:
"$ref": "#/definitions/boot"
Expand Down

0 comments on commit 395aa33

Please sign in to comment.