Skip to content

Commit 7e5d36d

Browse files
committed
fix: pci driver rebind config validation
We need a field named `name` to distinguish between named documents, as decoder expects a `name` yaml key. Fixes: #10025 Fixes by using standard `name` field instead of `pciID`. Signed-off-by: Noel Georgi <git@frezbo.dev>
1 parent 4b97bbc commit 7e5d36d

8 files changed

Lines changed: 11 additions & 52 deletions

File tree

pkg/machinery/config/schemas/config.schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@
187187
"markdownDescription": "kind is the kind of the resource.",
188188
"x-intellij-html-description": "\u003cp\u003ekind is the kind of the resource.\u003c/p\u003e\n"
189189
},
190-
"pciID": {
190+
"name": {
191191
"type": "string",
192-
"title": "pciID",
192+
"title": "name",
193193
"description": "PCI device id\n",
194194
"markdownDescription": "PCI device id",
195195
"x-intellij-html-description": "\u003cp\u003ePCI device id\u003c/p\u003e\n"
@@ -207,7 +207,7 @@
207207
"required": [
208208
"apiVersion",
209209
"kind",
210-
"pciID",
210+
"name",
211211
"targetDriver"
212212
]
213213
},

pkg/machinery/config/types/hardware/hardware_doc.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/machinery/config/types/hardware/pci_driver_rebind_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type PCIDriverRebindConfigV1Alpha1 struct {
5151
// description: |
5252
// PCI device id
5353
// schemaRequired: true
54-
MetaName string `yaml:"pciID"`
54+
MetaName string `yaml:"name"`
5555
// description: |
5656
// Target driver to rebind the PCI device to.
5757
// schemaRequired: true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v1alpha1
22
kind: PCIDriverRebindConfig
3-
pciID: "0000:04:00.00"
3+
name: "0000:04:00.00"
44
targetDriver: vfio-pci

website/content/v1.10/reference/configuration/hardware/pcidriverrebindconfig.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ title: PCIDriverRebindConfig
1616
{{< highlight yaml >}}
1717
apiVersion: v1alpha1
1818
kind: PCIDriverRebindConfig
19-
pciID: 0000:04:00.00 # PCI device id
19+
name: 0000:04:00.00 # PCI device id
2020
targetDriver: vfio-pci # Target driver to rebind the PCI device to.
2121
{{< /highlight >}}
2222

2323

2424
| Field | Type | Description | Value(s) |
2525
|-------|------|-------------|----------|
26-
|`pciID` |string |PCI device id | |
26+
|`name` |string |PCI device id | |
2727
|`targetDriver` |string |Target driver to rebind the PCI device to. | |
2828

2929

website/content/v1.10/schemas/config.schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@
187187
"markdownDescription": "kind is the kind of the resource.",
188188
"x-intellij-html-description": "\u003cp\u003ekind is the kind of the resource.\u003c/p\u003e\n"
189189
},
190-
"pciID": {
190+
"name": {
191191
"type": "string",
192-
"title": "pciID",
192+
"title": "name",
193193
"description": "PCI device id\n",
194194
"markdownDescription": "PCI device id",
195195
"x-intellij-html-description": "\u003cp\u003ePCI device id\u003c/p\u003e\n"
@@ -207,7 +207,7 @@
207207
"required": [
208208
"apiVersion",
209209
"kind",
210-
"pciID",
210+
"name",
211211
"targetDriver"
212212
]
213213
},

website/content/v1.9/reference/configuration/hardware/_index.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

website/content/v1.9/reference/configuration/hardware/pcidriverrebindconfig.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)