@@ -15,23 +15,24 @@ const (
1515//Types
1616
1717type machineConfigV2Harvester struct {
18- metav1.TypeMeta `json:",inline"`
19- metav1.ObjectMeta `json:"metadata,omitempty"`
20- VMNamespace string `json:"vmNamespace,omitempty" yaml:"vmNamespace,omitempty"`
21- VMAffinity string `json:"vmAffinity,omitempty" yaml:"vmAffinity,omitempty"`
22- CPUCount string `json:"cpuCount,omitempty" yaml:"cpuCount,omitempty"`
23- MemorySize string `json:"memorySize,omitempty" yaml:"memorySize,omitempty"`
24- DiskSize string `json:"diskSize,omitempty" yaml:"diskSize,omitempty"`
25- DiskBus string `json:"diskBus,omitempty" yaml:"diskBus,omitempty"`
26- ImageName string `json:"imageName,omitempty" yaml:"imageName,omitempty"`
27- DiskInfo string `json:"diskInfo,omitempty" yaml:"diskInfo,omitempty"`
28- SSHUser string `json:"sshUser,omitempty" yaml:"sshUser,omitempty"`
29- SSHPassword string `json:"sshPassword,omitempty" yaml:"sshPassword,omitempty"`
30- NetworkName string `json:"networkName,omitempty" yaml:"networkName,omitempty"`
31- NetworkModel string `json:"networkModel,omitempty" yaml:"networkModel,omitempty"`
32- NetworkInfo string `json:"networkInfo,omitempty" yaml:"networkInfo,omitempty"`
33- UserData string `json:"userData,omitempty" yaml:"userData,omitempty"`
34- NetworkData string `json:"networkData,omitempty" yaml:"networkData,omitempty"`
18+ metav1.TypeMeta `json:",inline"`
19+ metav1.ObjectMeta `json:"metadata,omitempty"`
20+ VMNamespace string `json:"vmNamespace,omitempty" yaml:"vmNamespace,omitempty"`
21+ VMAffinity string `json:"vmAffinity,omitempty" yaml:"vmAffinity,omitempty"`
22+ CPUCount string `json:"cpuCount,omitempty" yaml:"cpuCount,omitempty"`
23+ MemorySize string `json:"memorySize,omitempty" yaml:"memorySize,omitempty"`
24+ ReservedMemorySize string `json:"reservedMemorySize,omitempty" yaml:"reservedMemorySize,omitempty"`
25+ DiskSize string `json:"diskSize,omitempty" yaml:"diskSize,omitempty"`
26+ DiskBus string `json:"diskBus,omitempty" yaml:"diskBus,omitempty"`
27+ ImageName string `json:"imageName,omitempty" yaml:"imageName,omitempty"`
28+ DiskInfo string `json:"diskInfo,omitempty" yaml:"diskInfo,omitempty"`
29+ SSHUser string `json:"sshUser,omitempty" yaml:"sshUser,omitempty"`
30+ SSHPassword string `json:"sshPassword,omitempty" yaml:"sshPassword,omitempty"`
31+ NetworkName string `json:"networkName,omitempty" yaml:"networkName,omitempty"`
32+ NetworkModel string `json:"networkModel,omitempty" yaml:"networkModel,omitempty"`
33+ NetworkInfo string `json:"networkInfo,omitempty" yaml:"networkInfo,omitempty"`
34+ UserData string `json:"userData,omitempty" yaml:"userData,omitempty"`
35+ NetworkData string `json:"networkData,omitempty" yaml:"networkData,omitempty"`
3536}
3637
3738type MachineConfigV2Harvester struct {
@@ -64,6 +65,10 @@ func flattenMachineConfigV2Harvester(in *MachineConfigV2Harvester) []interface{}
6465 obj ["memory_size" ] = in .MemorySize
6566 }
6667
68+ if len (in .ReservedMemorySize ) > 0 {
69+ obj ["reserved_memory_size" ] = in .ReservedMemorySize
70+ }
71+
6772 if len (in .DiskSize ) > 0 {
6873 obj ["disk_size" ] = in .DiskSize
6974 }
@@ -145,6 +150,10 @@ func expandMachineConfigV2Harvester(p []interface{}, source *MachineConfigV2) *M
145150 obj .MemorySize = v
146151 }
147152
153+ if v , ok := in ["reserved_memory_size" ].(string ); ok && len (v ) > 0 {
154+ obj .ReservedMemorySize = v
155+ }
156+
148157 if v , ok := in ["disk_size" ].(string ); ok && len (v ) > 0 {
149158 obj .DiskSize = v
150159 }
0 commit comments