4.8.0
This commit is contained in:
@@ -54,6 +54,7 @@ func flattenExtnetReservations(ers extnet.ListReservations) []map[string]interfa
|
||||
res := make([]map[string]interface{}, 0, len(ers))
|
||||
for _, er := range ers {
|
||||
temp := map[string]interface{}{
|
||||
"account_id": er.AccountID,
|
||||
"client_type": er.ClientType,
|
||||
"domainname": er.DomainName,
|
||||
"hostname": er.Hostname,
|
||||
@@ -135,3 +136,29 @@ func flattenExtnetList(el *extnet.ListExtNets) []map[string]interface{} {
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func flattenExtnetReservedIp(el []extnet.RecordReservedIP) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0, len(el))
|
||||
for _, e := range el {
|
||||
reservations := make([]map[string]interface{}, 0, len(e.Reservations))
|
||||
for _, r := range e.Reservations {
|
||||
temp := map[string]interface{}{
|
||||
"account_id": r.AccountID,
|
||||
"client_type": r.ClientType,
|
||||
"domain_name": r.DomainName,
|
||||
"hostname": r.Hostname,
|
||||
"ip": r.IP,
|
||||
"mac": r.Mac,
|
||||
"type": r.Type,
|
||||
"vm_id": r.VMID,
|
||||
}
|
||||
reservations = append(reservations, temp)
|
||||
}
|
||||
item := map[string]interface{}{
|
||||
"extnet_id": e.ExtnetID,
|
||||
"reservations": reservations,
|
||||
}
|
||||
res = append(res, item)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user