Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0720d7f6be | ||
|
|
a475cf3f75 | ||
| 476a09ed53 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,13 +1,8 @@
|
||||
## Version 4.9.7
|
||||
## Version 4.9.9
|
||||
|
||||
### Исправлено
|
||||
|
||||
#### disks
|
||||
#### kvmvmm
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BATF-1203 | Ошибка построения и применения плана при использовании состояния, созданного в предыдущих версиях провайдера в resources `decort_disk` в cloudapi/disks и в `decort_cb_disk` cloudbroker/disks |
|
||||
|
||||
#### image
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BATF-1203 | Ошибка построения и применения плана при использовании состояния, созданного в предыдущих версиях провайдера в resources `decort_image_from_blank_compute`, `decort_image_from_platform_disk`, `decort_virtual_image` в cloudapi/image и в `decort_cb_cdrom_image`, `decort_cb_image`, `decort_cb_image_from_blank_compute`, `decort_cb_image_from_platform_disk`, `decort_cb_virtual_image` в cloudbroker/image |
|
||||
| BATF-1241 | Ошибки применения новой конфигурации после импортирования в resource `decort_kvmvm` в cloudapi/kvmvm и в resource `decort_cb_kvmvm` в cloudbroker/kvmvm |
|
||||
2
Makefile
2
Makefile
@@ -7,7 +7,7 @@ ZIPDIR = ./zip
|
||||
BINARY=${NAME}
|
||||
WORKPATH= ./examples/terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAMESPACE}/${VERSION}/${OS_ARCH}
|
||||
MAINPATH = ./cmd/decort/
|
||||
VERSION=4.9.7
|
||||
VERSION=4.9.9
|
||||
OS_ARCH=$(shell go env GOHOSTOS)_$(shell go env GOHOSTARCH)
|
||||
|
||||
FILES = ${BINARY}_${VERSION}_darwin_amd64\
|
||||
|
||||
@@ -18,7 +18,6 @@ description: |-
|
||||
### Required
|
||||
|
||||
- `authenticator` (String) Authentication mode to use when connecting to DECORT cloud API. Should be one of 'decs3o', 'legacy', 'jwt' or 'bvs'.
|
||||
- `controller_url` (String) URL of DECORT Cloud controller to use. API calls will be directed to this URL.
|
||||
|
||||
### Optional
|
||||
|
||||
@@ -27,6 +26,7 @@ description: |-
|
||||
- `app_secret` (String) Application secret to access DECORT cloud API in 'decs3o' and 'bvs' authentication mode.
|
||||
- `bvs_password` (String) User password for DECORT cloud API operations in 'bvs' authentication mode.
|
||||
- `bvs_user` (String) User name for DECORT cloud API operations in 'bvs' authentication mode.
|
||||
- `controller_url` (String) URL of DECORT Cloud controller to use. API calls will be directed to this URL.
|
||||
- `domain` (String) User password for DECORT cloud API operations in 'bvs' authentication mode.
|
||||
- `jwt` (String) JWT to access DECORT cloud API in 'jwt' authentication mode.
|
||||
- `oauth2_url` (String) OAuth2 application URL in 'decs3o' and 'bvs' authentication mode.
|
||||
|
||||
@@ -276,10 +276,6 @@ func flattenBootDisk(bootDisk *compute.ItemComputeDisk) []map[string]interface{}
|
||||
func flattenComputeDisksDemo(disksList compute.ListComputeDisks, disksBlocks, extraDisks []interface{}, bootDiskId uint64) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0, len(disksList))
|
||||
|
||||
if len(disksBlocks) == 0 {
|
||||
return res
|
||||
}
|
||||
|
||||
sort.Slice(disksList, func(i, j int) bool {
|
||||
return disksList[i].ID < disksList[j].ID
|
||||
})
|
||||
@@ -291,7 +287,11 @@ func flattenComputeDisksDemo(disksList compute.ListComputeDisks, disksBlocks, ex
|
||||
continue
|
||||
}
|
||||
|
||||
pernamentlyValue := disksBlocks[indexDataDisks].(map[string]interface{})["permanently"].(bool)
|
||||
permanentlyValue := false
|
||||
|
||||
if indexDataDisks < len(disksBlocks) {
|
||||
permanentlyValue = disksBlocks[indexDataDisks].(map[string]interface{})["permanently"].(bool)
|
||||
}
|
||||
|
||||
temp := map[string]interface{}{
|
||||
"disk_name": disk.Name,
|
||||
@@ -305,7 +305,7 @@ func flattenComputeDisksDemo(disksList compute.ListComputeDisks, disksBlocks, ex
|
||||
"desc": disk.Description,
|
||||
"image_id": disk.ImageID,
|
||||
"size": disk.SizeMax,
|
||||
"permanently": pernamentlyValue,
|
||||
"permanently": permanentlyValue,
|
||||
"present_to": disk.PresentTo,
|
||||
}
|
||||
res = append(res, temp)
|
||||
@@ -447,6 +447,9 @@ func flattenCompute(d *schema.ResourceData, computeRec compute.RecordCompute, pc
|
||||
d.Set("boot_type", computeRec.BootType)
|
||||
d.Set("hot_resize", computeRec.HotResize)
|
||||
d.Set("network_interface_naming", computeRec.NetworkInterfaceNaming)
|
||||
d.Set("cpu_pin", computeRec.CPUPin)
|
||||
d.Set("numa_affinity", computeRec.NumaAffinity)
|
||||
d.Set("hp_backed", computeRec.HPBacked)
|
||||
|
||||
d.Set("enabled", false)
|
||||
if computeRec.Status == status.Enabled {
|
||||
|
||||
@@ -1815,6 +1815,7 @@ func disksSubresourceSchemaMake() map[string]*schema.Schema {
|
||||
"permanently": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
Default: false,
|
||||
Description: "Disk deletion status",
|
||||
},
|
||||
"disk_id": {
|
||||
|
||||
@@ -103,6 +103,12 @@ func flattenCompute(d *schema.ResourceData, computeRec *compute.RecordCompute, p
|
||||
d.Set("boot_type", computeRec.BootType)
|
||||
d.Set("hot_resize", computeRec.HotResize)
|
||||
d.Set("network_interface_naming", computeRec.NetworkInterfaceNaming)
|
||||
d.Set("numa_affinity", computeRec.NumaAffinity)
|
||||
d.Set("cpu_pin", computeRec.CPUPin)
|
||||
d.Set("hp_backed", computeRec.HPBacked)
|
||||
|
||||
d.Set("started", computeRec.TechStatus == "STARTED")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -221,10 +227,6 @@ func flattenQOS(qos compute.QOS) []map[string]interface{} {
|
||||
func flattenComputeDisks(disksList compute.ListDisks, disksBlocks, extraDisks []interface{}, bootDiskId uint64) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0, len(disksList))
|
||||
|
||||
if len(disksBlocks) == 0 {
|
||||
return res
|
||||
}
|
||||
|
||||
sort.Slice(disksList, func(i, j int) bool {
|
||||
return disksList[i].ID < disksList[j].ID
|
||||
})
|
||||
@@ -236,8 +238,14 @@ func flattenComputeDisks(disksList compute.ListDisks, disksBlocks, extraDisks []
|
||||
continue
|
||||
}
|
||||
|
||||
pernamentlyValue := disksBlocks[indexDataDisks].(map[string]interface{})["permanently"].(bool)
|
||||
nodeIds := disksBlocks[indexDataDisks].(map[string]interface{})["node_ids"].(*schema.Set)
|
||||
permanentlyValue := false
|
||||
var nodeIds *schema.Set
|
||||
|
||||
if indexDataDisks < len(disksBlocks) {
|
||||
log.Debug("entering indexDataDisks < len(disksBlocks)", indexDataDisks < len(disksBlocks), indexDataDisks, len(disksBlocks))
|
||||
permanentlyValue = disksBlocks[indexDataDisks].(map[string]interface{})["permanently"].(bool)
|
||||
nodeIds = disksBlocks[indexDataDisks].(map[string]interface{})["node_ids"].(*schema.Set)
|
||||
}
|
||||
|
||||
temp := map[string]interface{}{
|
||||
"disk_name": disk.Name,
|
||||
@@ -252,7 +260,7 @@ func flattenComputeDisks(disksList compute.ListDisks, disksBlocks, extraDisks []
|
||||
"shareable": disk.Shareable,
|
||||
"size_used": disk.SizeUsed,
|
||||
"size_max": disk.SizeMax,
|
||||
"permanently": pernamentlyValue,
|
||||
"permanently": permanentlyValue,
|
||||
"present_to": disk.PresentTo,
|
||||
}
|
||||
res = append(res, temp)
|
||||
|
||||
Reference in New Issue
Block a user