4.9.0
This commit is contained in:
@@ -147,3 +147,39 @@ func flattenSepConsumptionPools(bp *sep.RecordConsumption) []map[string]interfac
|
||||
}
|
||||
return sh
|
||||
}
|
||||
|
||||
func flattenAvailableSEPList(d *schema.ResourceData, sepList *sep.ListAvailableSEP) {
|
||||
d.Set("items", flattenSEPDataList(sepList.Data))
|
||||
d.Set("entry_count", sepList.EntryCount)
|
||||
}
|
||||
|
||||
func flattenSEPDataList(sepDataList []sep.SEPData) []map[string]interface{} {
|
||||
sh := make([]map[string]interface{}, 0)
|
||||
|
||||
for _, sepData := range sepDataList {
|
||||
temp := map[string]interface{}{
|
||||
"sep_id": sepData.SEPID,
|
||||
"sep_name": sepData.SEPName,
|
||||
"sep_type": sepData.SEPType,
|
||||
"pools": flattenPoolList(sepData.Pools),
|
||||
}
|
||||
sh = append(sh, temp)
|
||||
}
|
||||
|
||||
return sh
|
||||
}
|
||||
|
||||
func flattenPoolList(pools []sep.Pool) []map[string]interface{} {
|
||||
sh := make([]map[string]interface{}, 0)
|
||||
|
||||
for _, pool := range pools {
|
||||
temp := map[string]interface{}{
|
||||
"name": pool.Name,
|
||||
"types": pool.Types,
|
||||
"system": pool.System,
|
||||
}
|
||||
sh = append(sh, temp)
|
||||
}
|
||||
|
||||
return sh
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user