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)
|
||||
}
|
||||
|
||||
@@ -164,8 +164,17 @@ func dataSourceNodeSchemaMake() map[string]*schema.Schema {
|
||||
"vf_list": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Elem: &schema.Resource{
|
||||
Schema: map[string]*schema.Schema{
|
||||
"fn_id": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -477,8 +486,17 @@ func dataSourceNodeListSchemaMake() map[string]*schema.Schema {
|
||||
"vf_list": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Elem: &schema.Resource{
|
||||
Schema: map[string]*schema.Schema{
|
||||
"fn_id": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user