Fix ordering of QEMU config values

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2022-10-21 16:08:52 +02:00 committed by Daniel Weiße
parent 18ae86c38e
commit 252a7226a9
2 changed files with 22 additions and 22 deletions

View File

@ -240,17 +240,17 @@ type QEMUConfig struct {
// Container image to use for launching a containerized libvirt daemon. Only relevant if `libvirtSocket = ""`. // Container image to use for launching a containerized libvirt daemon. Only relevant if `libvirtSocket = ""`.
LibvirtContainerImage string `yaml:"libvirtContainerImage"` LibvirtContainerImage string `yaml:"libvirtContainerImage"`
// description: | // description: |
// Measurement used to enable measured boot.
Measurements Measurements `yaml:"measurements"`
// description: |
// List of values that should be enforced to be equal to the ones from the measurement list. Any non-equal values not in this list will only result in a warning.
EnforcedMeasurements []uint32 `yaml:"enforcedMeasurements"`
// description: |
// NVRAM template to be used for secure boot. Can be sentinel value "production", "testing" or a path to a custom NVRAM template // NVRAM template to be used for secure boot. Can be sentinel value "production", "testing" or a path to a custom NVRAM template
NVRAM string `yaml:"nvram" validate:"required"` NVRAM string `yaml:"nvram" validate:"required"`
// description: | // description: |
// Path to the OVMF firmware. Leave empty for auto selection. // Path to the OVMF firmware. Leave empty for auto selection.
Firmware string `yaml:"firmware"` Firmware string `yaml:"firmware"`
// description: |
// Measurement used to enable measured boot.
Measurements Measurements `yaml:"measurements"`
// description: |
// List of values that should be enforced to be equal to the ones from the measurement list. Any non-equal values not in this list will only result in a warning.
EnforcedMeasurements []uint32 `yaml:"enforcedMeasurements"`
} }
// Default returns a struct with the default config. // Default returns a struct with the default config.

View File

@ -391,26 +391,26 @@ func init() {
QEMUConfigDoc.Fields[6].Note = "" QEMUConfigDoc.Fields[6].Note = ""
QEMUConfigDoc.Fields[6].Description = "Container image to use for launching a containerized libvirt daemon. Only relevant if `libvirtSocket = \"\"`." QEMUConfigDoc.Fields[6].Description = "Container image to use for launching a containerized libvirt daemon. Only relevant if `libvirtSocket = \"\"`."
QEMUConfigDoc.Fields[6].Comments[encoder.LineComment] = "Container image to use for launching a containerized libvirt daemon. Only relevant if `libvirtSocket = \"\"`." QEMUConfigDoc.Fields[6].Comments[encoder.LineComment] = "Container image to use for launching a containerized libvirt daemon. Only relevant if `libvirtSocket = \"\"`."
QEMUConfigDoc.Fields[7].Name = "measurements" QEMUConfigDoc.Fields[7].Name = "nvram"
QEMUConfigDoc.Fields[7].Type = "Measurements" QEMUConfigDoc.Fields[7].Type = "string"
QEMUConfigDoc.Fields[7].Note = "" QEMUConfigDoc.Fields[7].Note = ""
QEMUConfigDoc.Fields[7].Description = "Measurement used to enable measured boot." QEMUConfigDoc.Fields[7].Description = "NVRAM template to be used for secure boot. Can be sentinel value \"production\", \"testing\" or a path to a custom NVRAM template"
QEMUConfigDoc.Fields[7].Comments[encoder.LineComment] = "Measurement used to enable measured boot." QEMUConfigDoc.Fields[7].Comments[encoder.LineComment] = "NVRAM template to be used for secure boot. Can be sentinel value \"production\", \"testing\" or a path to a custom NVRAM template"
QEMUConfigDoc.Fields[8].Name = "enforcedMeasurements" QEMUConfigDoc.Fields[8].Name = "firmware"
QEMUConfigDoc.Fields[8].Type = "[]uint32" QEMUConfigDoc.Fields[8].Type = "string"
QEMUConfigDoc.Fields[8].Note = "" QEMUConfigDoc.Fields[8].Note = ""
QEMUConfigDoc.Fields[8].Description = "List of values that should be enforced to be equal to the ones from the measurement list. Any non-equal values not in this list will only result in a warning." QEMUConfigDoc.Fields[8].Description = "Path to the OVMF firmware. Leave empty for auto selection."
QEMUConfigDoc.Fields[8].Comments[encoder.LineComment] = "List of values that should be enforced to be equal to the ones from the measurement list. Any non-equal values not in this list will only result in a warning." QEMUConfigDoc.Fields[8].Comments[encoder.LineComment] = "Path to the OVMF firmware. Leave empty for auto selection."
QEMUConfigDoc.Fields[9].Name = "nvram" QEMUConfigDoc.Fields[9].Name = "measurements"
QEMUConfigDoc.Fields[9].Type = "string" QEMUConfigDoc.Fields[9].Type = "Measurements"
QEMUConfigDoc.Fields[9].Note = "" QEMUConfigDoc.Fields[9].Note = ""
QEMUConfigDoc.Fields[9].Description = "NVRAM template to be used for secure boot. Can be sentinel value \"production\", \"testing\" or a path to a custom NVRAM template" QEMUConfigDoc.Fields[9].Description = "Measurement used to enable measured boot."
QEMUConfigDoc.Fields[9].Comments[encoder.LineComment] = "NVRAM template to be used for secure boot. Can be sentinel value \"production\", \"testing\" or a path to a custom NVRAM template" QEMUConfigDoc.Fields[9].Comments[encoder.LineComment] = "Measurement used to enable measured boot."
QEMUConfigDoc.Fields[10].Name = "firmware" QEMUConfigDoc.Fields[10].Name = "enforcedMeasurements"
QEMUConfigDoc.Fields[10].Type = "string" QEMUConfigDoc.Fields[10].Type = "[]uint32"
QEMUConfigDoc.Fields[10].Note = "" QEMUConfigDoc.Fields[10].Note = ""
QEMUConfigDoc.Fields[10].Description = "Path to the OVMF firmware. Leave empty for auto selection." QEMUConfigDoc.Fields[10].Description = "List of values that should be enforced to be equal to the ones from the measurement list. Any non-equal values not in this list will only result in a warning."
QEMUConfigDoc.Fields[10].Comments[encoder.LineComment] = "Path to the OVMF firmware. Leave empty for auto selection." QEMUConfigDoc.Fields[10].Comments[encoder.LineComment] = "List of values that should be enforced to be equal to the ones from the measurement list. Any non-equal values not in this list will only result in a warning."
} }
func (_ Config) Doc() *encoder.Doc { func (_ Config) Doc() *encoder.Doc {