This commit is contained in:
2023-07-26 13:32:39 +03:00
parent f731cf246f
commit 272e385318
167 changed files with 5194 additions and 890 deletions

View File

@@ -7,7 +7,7 @@ import (
func flattenAccount(d *schema.ResourceData, acc account.RecordAccount) error {
d.Set("dc_location", acc.DCLocation)
d.Set("resources", flattenAccResources(acc.Resources))
// d.Set("resources", flattenAccResources(acc.Resources))
d.Set("ckey", acc.CKey)
d.Set("acl", flattenAccAcl(acc.ACL))
d.Set("company", acc.Company)
@@ -95,15 +95,15 @@ func flattenRgResourceLimits(rl account.ResourceLimits) []map[string]interface{}
}
func flattenAccResources(r account.Resources) []map[string]interface{} {
res := make([]map[string]interface{}, 0)
temp := map[string]interface{}{
"current": flattenAccResource(r.Current),
"reserved": flattenAccResource(r.Reserved),
}
res = append(res, temp)
return res
}
// func flattenAccResources(r account.Resources) []map[string]interface{} {
// res := make([]map[string]interface{}, 0)
// temp := map[string]interface{}{
// "current": flattenAccResource(r.Current),
// "reserved": flattenAccResource(r.Reserved),
// }
// res = append(res, temp)
// return res
// }
func flattenAccountSeps(seps map[string]map[string]account.DiskUsage) []map[string]interface{} {
res := make([]map[string]interface{}, 0)