From 3e07806fe671f0c87908e2e4803fb64736d4c1d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pl=C3=ADchal?= Date: Thu, 27 Oct 2022 10:18:14 +0200 Subject: [PATCH 1/2] Add `tpm` as a new hardware specification key Let's start with a simple implementation allowing to specify the desired version, use extra dictionary level to allow future extensions if needed. Fix #1191. --- spec/hardware/tpm.fmf | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 spec/hardware/tpm.fmf diff --git a/spec/hardware/tpm.fmf b/spec/hardware/tpm.fmf new file mode 100644 index 0000000000..29184088e3 --- /dev/null +++ b/spec/hardware/tpm.fmf @@ -0,0 +1,9 @@ +summary: + Require the `Trusted Platform Module` features +description: + Use the ``version`` key to select the desired ``tpm`` version, + its value must be a ``string``. +example: + - | + tpm: + version: "2.0" From 6f65cc16908195a36da21e9ffeebe8361e29235d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pl=C3=ADchal?= Date: Mon, 31 Oct 2022 12:10:02 +0100 Subject: [PATCH 2/2] Add json schema for the new `tpm` key --- tmt/schemas/provision/hardware.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tmt/schemas/provision/hardware.yaml b/tmt/schemas/provision/hardware.yaml index 645698aba3..5c83042029 100644 --- a/tmt/schemas/provision/hardware.yaml +++ b/tmt/schemas/provision/hardware.yaml @@ -132,6 +132,17 @@ definitions: items: "$ref": "#/definitions/network" + # HW requirements: `tpm` block + tpm: + type: object + + properties: + version: + type: string + + additionalProperties: false + minProperties: 1 + # HW requirements: `virtualization` block virtualization: type: object @@ -179,6 +190,9 @@ definitions: network: "$ref": "#/definitions/networks" + tpm: + "$ref": "#/definitions/tpm" + virtualization: "$ref": "#/definitions/virtualization" @@ -200,6 +214,7 @@ definitions: - "$ref": "#/definitions/cpu" - "$ref": "#/definitions/disks" - "$ref": "#/definitions/networks" + - "$ref": "#/definitions/tpm" - "$ref": "#/definitions/virtualization" - "$ref": "#/definitions/block" - "$ref": "#/definitions/and" @@ -219,6 +234,7 @@ definitions: - "$ref": "#/definitions/cpu" - "$ref": "#/definitions/disks" - "$ref": "#/definitions/networks" + - "$ref": "#/definitions/tpm" - "$ref": "#/definitions/virtualization" - "$ref": "#/definitions/block" - "$ref": "#/definitions/and" @@ -233,6 +249,7 @@ definitions: - "$ref": "#/definitions/cpu" - "$ref": "#/definitions/disks" - "$ref": "#/definitions/networks" + - "$ref": "#/definitions/tpm" - "$ref": "#/definitions/virtualization" - "$ref": "#/definitions/block" - "$ref": "#/definitions/and"