This commit is contained in:
2024-08-26 18:22:06 +03:00
parent 6876b25f0e
commit 8ad6811e88
597 changed files with 52808 additions and 2129 deletions

View File

@@ -185,7 +185,20 @@ func flattenNicInfo(infos node.ListNicInfo) []map[string]interface{} {
"num_vfs": item.NumVFS,
"os_name": item.OSName,
"pci_slot": item.PCISlot,
"vf_list": flattenNodeItem(item.VFList),
"vf_list": flattenVFList(item.VFList),
}
res = append(res, temp)
}
return res
}
func flattenVFList(vfList []interface{}) []map[string]interface{} {
res := make([]map[string]interface{}, 0, len(vfList))
for _, v := range vfList {
vConv := v.(map[string]interface{})
temp := map[string]interface{}{
"fn_id": vConv["fnId"],
"pci_slot": vConv["pciSlot"],
}
res = append(res, temp)
}