Merge branch 'rc-1.25' into 1.26
This commit is contained in:
@@ -263,7 +263,7 @@ func flattenCompute(d *schema.ResourceData, compFacts string) error {
|
|||||||
d.Set("rg_name", model.RgName)
|
d.Set("rg_name", model.RgName)
|
||||||
d.Set("account_id", model.AccountID)
|
d.Set("account_id", model.AccountID)
|
||||||
d.Set("account_name", model.AccountName)
|
d.Set("account_name", model.AccountName)
|
||||||
d.Set("arch", model.Arch)
|
d.Set("driver", model.Driver)
|
||||||
d.Set("cpu", model.Cpu)
|
d.Set("cpu", model.Cpu)
|
||||||
d.Set("ram", model.Ram)
|
d.Set("ram", model.Ram)
|
||||||
// d.Set("boot_disk_size", model.BootDiskSize) - bootdiskSize key in API compute/get is always zero, so we set boot_disk_size in another way
|
// d.Set("boot_disk_size", model.BootDiskSize) - bootdiskSize key in API compute/get is always zero, so we set boot_disk_size in another way
|
||||||
@@ -367,7 +367,7 @@ func dataSourceCompute() *schema.Resource {
|
|||||||
Description: "Name of the account this compute instance belongs to.",
|
Description: "Name of the account this compute instance belongs to.",
|
||||||
},
|
},
|
||||||
|
|
||||||
"arch": {
|
"driver": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "Hardware architecture of this compute instance.",
|
Description: "Hardware architecture of this compute instance.",
|
||||||
|
|||||||
@@ -356,6 +356,7 @@ type ComputeGetResp struct {
|
|||||||
Cpu int `json:"cpus"`
|
Cpu int `json:"cpus"`
|
||||||
Desc string `json:"desc"`
|
Desc string `json:"desc"`
|
||||||
Disks []DiskRecord `json:"disks"`
|
Disks []DiskRecord `json:"disks"`
|
||||||
|
Driver string `json:"driver"`
|
||||||
GridID int `json:"gid"`
|
GridID int `json:"gid"`
|
||||||
ID uint `json:"id"`
|
ID uint `json:"id"`
|
||||||
ImageID int `json:"imageId"`
|
ImageID int `json:"imageId"`
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ import (
|
|||||||
func parseOsUsers(logins []OsUserRecord) []interface{} {
|
func parseOsUsers(logins []OsUserRecord) []interface{} {
|
||||||
var result = make([]interface{}, len(logins))
|
var result = make([]interface{}, len(logins))
|
||||||
|
|
||||||
elem := make(map[string]interface{})
|
|
||||||
|
|
||||||
for index, value := range logins {
|
for index, value := range logins {
|
||||||
|
elem := make(map[string]interface{})
|
||||||
|
|
||||||
elem["guid"] = value.Guid
|
elem["guid"] = value.Guid
|
||||||
elem["login"] = value.Login
|
elem["login"] = value.Login
|
||||||
elem["password"] = value.Password
|
elem["password"] = value.Password
|
||||||
|
|||||||
Reference in New Issue
Block a user