4.6.1
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user