diff --git a/src/oca/go/src/goca/dynamic/dyntemplate.go b/src/oca/go/src/goca/dynamic/dyntemplate.go index b9c587ce5d8..3405b912e70 100644 --- a/src/oca/go/src/goca/dynamic/dyntemplate.go +++ b/src/oca/go/src/goca/dynamic/dyntemplate.go @@ -403,6 +403,8 @@ func MakePair(key string, v interface{}) (*Pair, error) { val = fmt.Sprintf("%f", v) case int, uint: val = fmt.Sprintf("%d", v) + case bool: + val = strconv.FormatBool(v) case string: val = v } diff --git a/src/oca/go/src/goca/schemas/vm/keys/template.go b/src/oca/go/src/goca/schemas/vm/keys/template.go index f3341fa945f..64f71964a6e 100644 --- a/src/oca/go/src/goca/schemas/vm/keys/template.go +++ b/src/oca/go/src/goca/schemas/vm/keys/template.go @@ -51,16 +51,20 @@ type OS string const ( OSVec string = "OS" - Arch OS = "ARCH" - Machine OS = "MACHINE" - Kernel OS = "KERNEL" - KernelDS OS = "KERNEL_DS" - Initrd OS = "INITRD" - InitrdDS OS = "INITRD_DS" - Root OS = "ROOT" - KernelCmd OS = "KERNEL_CMD" - Bootloader OS = "BOOTLOADER" - Boot OS = "BOOT" + Arch OS = "ARCH" + Machine OS = "MACHINE" + Kernel OS = "KERNEL" + KernelDS OS = "KERNEL_DS" + Initrd OS = "INITRD" + InitrdDS OS = "INITRD_DS" + Root OS = "ROOT" + KernelCmd OS = "KERNEL_CMD" + Bootloader OS = "BOOTLOADER" + Boot OS = "BOOT" + SDDiskBus OS = "SD_DISK_BUS" + UUID OS = "UUID" + Firmware OS = "FIRMWARE" + FirmwareSecure OS = "FIRMWARE_SECURE" ) // CPUModel define keys for the VM CPU model diff --git a/src/oca/go/src/goca/schemas/vm/template.go b/src/oca/go/src/goca/schemas/vm/template.go index 8acd664edfc..50d38972ec2 100644 --- a/src/oca/go/src/goca/schemas/vm/template.go +++ b/src/oca/go/src/goca/schemas/vm/template.go @@ -187,7 +187,7 @@ func (t *Template) GetShowback(key keys.Showback) (string, error) { // OS template part -func (t *Template) AddOS(key keys.OS, value string) error { +func (t *Template) AddOS(key keys.OS, value interface{}) error { return t.Template.AddPairToVec(keys.OSVec, string(key), value) }