Skip to content

Commit 395aa33

Browse files
thrixpsss
authored andcommitted
Make arch field unsupported in the spec
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]>
1 parent 38eacf7 commit 395aa33

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

spec/hardware/arch.fmf

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ description: |
77
# String, any of well-known short architecture names.
88
arch: "aarch64"|"i386"|"ppc64"|"ppc64le"|"s390x"|"x86_64"|...
99

10+
.. warning::
11+
12+
This field is not supported under ``hardware``. It is planned
13+
to be supported in the future. Use the ``arch`` field of specific
14+
provision plugins to select the architecture. If this field
15+
is used in Testing Farm's hardware requirements the request
16+
will abort.
17+
1018
example:
1119
- |
1220
# Require a good old x86_64 box
1321
arch: x86_64
14-
15-
link:
16-
- implemented-by: /tmt/steps/provision/artemis.py
17-
- implemented-by: /tmt/steps/provision/mrack.py
18-
- implemented-by: /tmt/steps/provision/testcloud.py

tests/unit/test_schemas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def test_plans_schema(tree, plan):
119119
"""
120120
---
121121
122-
arch: x86_64
122+
#arch: x86_64
123123
boot:
124124
method: bios
125125
compatible:
@@ -160,7 +160,7 @@ def test_plans_schema(tree, plan):
160160
---
161161
162162
and:
163-
- arch: x86_64
163+
#- arch: x86_64
164164
- cpu:
165165
model-name: foo
166166
- memory: 8 GiB

tmt/schemas/provision/hardware.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ $schema: http://json-schema.org/draft-07/schema
1111

1212
definitions:
1313
# HW requirements: `arch`
14-
arch:
15-
type: string
14+
# NOTE: not yet supported in hardware
15+
# arch:
16+
# type: string
1617

1718
# HW requirements: `boot` block
1819
boot:
@@ -298,8 +299,8 @@ definitions:
298299
type: object
299300

300301
properties:
301-
arch:
302-
"$ref": "#/definitions/arch"
302+
# arch:
303+
# "$ref": "#/definitions/arch"
303304

304305
boot:
305306
"$ref": "#/definitions/boot"

0 commit comments

Comments
 (0)