This commit is contained in:
2024-05-31 14:05:21 +03:00
parent 84b7a80e1b
commit db1760cb72
815 changed files with 58194 additions and 11049 deletions

View File

@@ -100,6 +100,7 @@ func flattenInterfaces(interfaces []vins.ItemVNFInterface) []map[string]interfac
"net_id": vnfInterface.NetID,
"net_mask": vnfInterface.NetMask,
"net_type": vnfInterface.NetType,
"node_id": vnfInterface.NodeID,
"pci_slot": vnfInterface.PCISlot,
"qos": flattenQOS(vnfInterface.QOS),
"target": vnfInterface.Target,
@@ -485,6 +486,34 @@ func flattenVinsIpList(ips *vins.ListIPs) []map[string]interface{} {
}
func flattenVinsList(vl *vins.ListVINS) []map[string]interface{} {
res := make([]map[string]interface{}, 0, len(vl.Data))
for _, v := range vl.Data {
temp := map[string]interface{}{
"account_id": v.AccountID,
"account_name": v.AccountName,
"created_by": v.CreatedBy,
"created_time": v.CreatedTime,
"deleted_by": v.DeletedBy,
"deleted_time": v.DeletedTime,
"external_ip": v.ExternalIP,
"extnet_id": v.ExtnetId,
"free_ips": v.FreeIPs,
"vins_id": v.ID,
"vins_name": v.Name,
"network": v.Network,
"rg_id": v.RGID,
"rg_name": v.RGName,
"status": v.Status,
"updated_by": v.UpdatedBy,
"updated_time": v.UpdatedTime,
"vxlan_id": v.VXLANID,
}
res = append(res, temp)
}
return res
}
func flattenVinsListDeleted(vl *vins.ListVINS) []map[string]interface{} {
res := make([]map[string]interface{}, 0, len(vl.Data))
for _, v := range vl.Data {
temp := map[string]interface{}{