4.10.0
This commit is contained in:
@@ -36,6 +36,8 @@ func flattenAccount(d *schema.ResourceData, acc account.RecordAccount) error {
|
||||
d.Set("machines", flattenAccMachines(acc.Machines))
|
||||
d.Set("cpu_allocation_parameter", acc.CPUAllocationParameter)
|
||||
d.Set("cpu_allocation_ratio", acc.CPUAllocationRatio)
|
||||
d.Set("default_zone_id", acc.DefaultZoneID)
|
||||
d.Set("zone_ids", flattenZones(acc.ZoneIDs))
|
||||
|
||||
if username, ok := d.GetOk("username"); ok {
|
||||
d.Set("username", username)
|
||||
@@ -80,6 +82,7 @@ func flattenAccAcl(acls []account.RecordACL) []map[string]interface{} {
|
||||
"right": acls.Rights,
|
||||
"status": acls.Status,
|
||||
"type": acls.Type,
|
||||
"emails": acls.Emails,
|
||||
"user_group_id": acls.UgroupID,
|
||||
}
|
||||
res = append(res, temp)
|
||||
@@ -165,3 +168,15 @@ func flattenAccResourceConsumption(lrc *account.ListResourceConsumption) []map[s
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func flattenZones(zones []account.ZoneID) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0)
|
||||
for _, zone := range zones {
|
||||
temp := map[string]interface{}{
|
||||
"id": zone.ID,
|
||||
"name": zone.Name,
|
||||
}
|
||||
res = append(res, temp)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user