4.12.0
This commit is contained in:
@@ -18,7 +18,7 @@ func flattenCompute(d *schema.ResourceData, computeRec *compute.RecordCompute, p
|
||||
customFields, _ := json.Marshal(computeRec.CustomFields)
|
||||
devices, _ := json.Marshal(computeRec.Devices)
|
||||
userData, _ := json.Marshal(computeRec.Userdata)
|
||||
bootDisk := findBootDisk(computeRec.Disks)
|
||||
bootDisk := findBootDisk(computeRec.Disks, computeRec.Chipset)
|
||||
|
||||
if len(computeRec.Interfaces) > 0 {
|
||||
log.Debugf("flattenCompute: calling parseComputeInterfacesToNetworks for %d interfaces", len(computeRec.Interfaces))
|
||||
@@ -113,6 +113,7 @@ func flattenCompute(d *schema.ResourceData, computeRec *compute.RecordCompute, p
|
||||
d.Set("cpu_pin", computeRec.CPUPin)
|
||||
d.Set("numa_affinity", computeRec.NumaAffinity)
|
||||
d.Set("hp_backed", computeRec.HPBacked)
|
||||
d.Set("weight", computeRec.Weight)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -269,10 +270,12 @@ func flattenComputeDisks(disksList compute.ListDisks, disksBlocks, extraDisks []
|
||||
"node_ids": nodeIds,
|
||||
"size": disk.SizeMax,
|
||||
"sep_id": disk.SEPID,
|
||||
"disk_type": disk.Type,
|
||||
"pci_slot": disk.PCISlot,
|
||||
"bus_number": disk.BusNumber,
|
||||
"pool": disk.Pool,
|
||||
"desc": disk.Description,
|
||||
"image_id": disk.ImageID,
|
||||
"independent": disk.Independent,
|
||||
"disk_id": disk.ID,
|
||||
"shareable": disk.Shareable,
|
||||
"size_used": disk.SizeUsed,
|
||||
@@ -289,6 +292,8 @@ func flattenComputeDisks(disksList compute.ListDisks, disksBlocks, extraDisks []
|
||||
"update_time": disk.UpdatedTime,
|
||||
"cache": disk.Cache,
|
||||
"blk_discard": disk.BLKDiscard,
|
||||
"block_size": disk.BlockSize,
|
||||
"provision": disk.Provision,
|
||||
"iotune": flattenIOTune(disk.IOTune),
|
||||
}
|
||||
res = append(res, temp)
|
||||
@@ -408,6 +413,7 @@ func flattenComputeList(computes *compute.ListComputes) []map[string]interface{}
|
||||
"hot_resize": computeItem.HotResize,
|
||||
"network_interface_naming": computeItem.NetworkInterfaceNaming,
|
||||
"zone_id": computeItem.ZoneID,
|
||||
"weight": computeItem.Weight,
|
||||
}
|
||||
res = append(res, temp)
|
||||
}
|
||||
@@ -495,6 +501,7 @@ func flattenDeletedComputeList(computes *compute.ListDeletedComputes) []map[stri
|
||||
"hot_resize": computeItem.HotResize,
|
||||
"network_interface_naming": computeItem.NetworkInterfaceNaming,
|
||||
"zone_id": computeItem.ZoneID,
|
||||
"weight": computeItem.Weight,
|
||||
}
|
||||
res = append(res, temp)
|
||||
}
|
||||
@@ -842,8 +849,9 @@ func flattenDataCompute(d *schema.ResourceData, compFacts *compute.RecordCompute
|
||||
d.Set("zone_id", compFacts.ZoneID)
|
||||
d.Set("loader_meta_iso", flattenLoaderMetaIso(compFacts.LoaderMetaIso))
|
||||
d.Set("os_version", compFacts.OSVersion)
|
||||
d.Set("weight", compFacts.Weight)
|
||||
//extra fields setting
|
||||
bootDisk := findBootDisk(compFacts.Disks)
|
||||
bootDisk := findBootDisk(compFacts.Disks, compFacts.Chipset)
|
||||
if bootDisk != nil {
|
||||
d.Set("boot_disk_size", bootDisk.SizeMax)
|
||||
d.Set("boot_disk_id", bootDisk.ID) // we may need boot disk ID in resize operations
|
||||
@@ -900,6 +908,7 @@ func flattenDisk(diskList compute.ListDisks) []map[string]interface{} {
|
||||
"meta": flattens.FlattenMeta(disk.Meta),
|
||||
"account_id": disk.AccountID,
|
||||
"blk_discard": disk.BLKDiscard,
|
||||
"block_size": disk.BlockSize,
|
||||
"boot_partition": disk.BootPartition,
|
||||
"bus_number": disk.BusNumber,
|
||||
"created_time": disk.CreatedTime,
|
||||
@@ -915,6 +924,7 @@ func flattenDisk(diskList compute.ListDisks) []map[string]interface{} {
|
||||
"disk_id": disk.ID,
|
||||
"image_id": disk.ImageID,
|
||||
"images": disk.Images,
|
||||
"independent": disk.Independent,
|
||||
"iotune": flattenIOTune(disk.IOTune),
|
||||
"iqn": disk.IQN,
|
||||
"login": disk.Login,
|
||||
@@ -945,6 +955,7 @@ func flattenDisk(diskList compute.ListDisks) []map[string]interface{} {
|
||||
"tech_status": disk.TechStatus,
|
||||
"type": disk.Type,
|
||||
"to_clean": disk.ToClean,
|
||||
"provision": disk.Provision,
|
||||
"updated_time": disk.UpdatedTime,
|
||||
}
|
||||
res = append(res, temp)
|
||||
|
||||
Reference in New Issue
Block a user