Skip to content

Commit 9c4e23b

Browse files
committed
use inline for vmconfig types
1 parent f3d87bc commit 9c4e23b

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

api/qemu_type.go

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,9 @@ type VirtualMachineCreateOptions struct {
367367
NameServer string `json:"nameserver,omitempty"`
368368
// network device
369369
Net
370-
Numa int8 `json:"numa,omitempty"`
370+
// node name
371+
Node string `json:"-"`
372+
Numa int8 `json:"numa,omitempty"`
371373
NumaS
372374
// specifies whether a VM will be started during system bootup
373375
OnBoot int8 `json:"onboot,omitempty"`
@@ -469,14 +471,14 @@ type VirtualMachineConfig struct {
469471
EfiDisk0 int8 `json:"efidisk0,omitempty"`
470472
Freeze int8 `json:"freeze,omitempty"`
471473
HookScript string `json:"hookscript,omitempty"`
472-
HostPci `json:"-"`
474+
HostPci `json:",inline"`
473475
HotPlug string `json:"hotplug,omitempty"`
474476
HugePages string `json:"hugepages,omitempty"`
475477
// Use volume as IDE hard disk or CD-ROM (n is 0 to 3).
476478
// Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume.
477479
// Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
478-
Ide `json:"-"`
479-
IPConfig `json:"-"`
480+
Ide `json:",inline"`
481+
IPConfig `json:",inline"`
480482
IvshMem string `json:"ivshmem,omitempty"`
481483
KeepHugePages int8 `json:"keephugepages,omitempty"`
482484
Keyboard string `json:"keyboard,omitempty"`
@@ -495,28 +497,28 @@ type VirtualMachineConfig struct {
495497
// cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.
496498
NameServer string `json:"nameserver,omitempty"`
497499
// network device
498-
Net `json:"-"`
500+
Net `json:",inline"`
499501
Numa int8 `json:"numa,omitempty"`
500-
NumaS `json:"-"`
502+
NumaS `json:",inline"`
501503
// specifies whether a VM will be started during system bootup
502504
OnBoot int8 `json:"onboot,omitempty"`
503505
// quest OS
504506
OSType OSType `json:"ostype,omitempty"`
505-
Parallel `json:"-"`
507+
Parallel `json:",inline"`
506508
Protection int8 `json:"protection,omitempty"`
507509
// Allow reboot. if set to '0' the VM exit on reboot
508510
Reboot int `json:"reboot,omitempty"`
509511
RNG0 string `json:"rng0,omitempty"`
510-
Sata `json:"-"`
512+
Sata `json:",inline"`
511513
// use volume as scsi hard disk or cd-rom
512514
// use special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume
513515
// use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.
514-
Scsi `json:"-"`
516+
Scsi `json:",inline"`
515517
// SCSI controller model
516518
ScsiHw ScsiHw `json:"scsihw,omitempty"`
517519
// cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.
518520
SearchDomain string `json:"searchdomain,omitempty"`
519-
Serial `json:"-"`
521+
Serial `json:",inline"`
520522
Shares int `json:"shares,omitempty"`
521523
SMBios1 string `json:"smbios1,omitempty"`
522524
SMP int `json:"smp,omitempty"`
@@ -534,10 +536,10 @@ type VirtualMachineConfig struct {
534536
// enable/disable template
535537
Template int8 `json:"template,omitempty"`
536538
TPMState0 string `json:"tpmstate,omitempty"`
537-
UnUsed `json:"-"`
539+
UnUsed `json:",inline"`
538540
VCPUs int `json:"vcpus,omitempty"`
539541
VGA string `json:"vga,omitempty"`
540-
VirtIO `json:"-"`
542+
VirtIO `json:",inline"`
541543
VMGenID string `json:"vmgenid,omitempty"`
542544
VMStateStorage string `json:"vmstatestorage,omitempty"`
543545
WatchDog string `json:"watchdog,omitempty"`

0 commit comments

Comments
 (0)