4.7.0
This commit is contained in:
@@ -72,6 +72,7 @@ func flattenVins(d *schema.ResourceData, vinsRecord *vins.RecordVINS) {
|
||||
d.Set("vnfs", flattenVinsRecordVNFs(vinsRecord.VNFs))
|
||||
d.Set("vxlan_id", vinsRecord.VXLANID)
|
||||
d.Set("nat_rule", flattenRuleBlock(vinsRecord.VNFs.NAT.Config.Rules))
|
||||
d.Set("computes", flattenComputes(vinsRecord.Computes))
|
||||
}
|
||||
|
||||
func flattenVinsData(d *schema.ResourceData, vinsRecord *vins.RecordVINS) {
|
||||
@@ -109,6 +110,23 @@ func flattenVinsData(d *schema.ResourceData, vinsRecord *vins.RecordVINS) {
|
||||
d.Set("user_managed", vinsRecord.UserManaged)
|
||||
d.Set("vnfs", flattenVinsRecordVNFs(vinsRecord.VNFs))
|
||||
d.Set("vxlan_id", vinsRecord.VXLANID)
|
||||
d.Set("computes", flattenComputes(vinsRecord.Computes))
|
||||
|
||||
}
|
||||
|
||||
func flattenLibvirtSettings(libvirtSettings vins.LibvirtSettings) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0)
|
||||
temp := map[string]interface{}{
|
||||
"guid": libvirtSettings.GUID,
|
||||
"txmode": libvirtSettings.TXMode,
|
||||
"ioeventfd": libvirtSettings.IOEventFD,
|
||||
"event_idx": libvirtSettings.EventIDx,
|
||||
"queues": libvirtSettings.Queues,
|
||||
"rx_queue_size": libvirtSettings.RXQueueSize,
|
||||
"tx_queue_size": libvirtSettings.TXQueueSize,
|
||||
}
|
||||
res = append(res, temp)
|
||||
return res
|
||||
}
|
||||
|
||||
func flattenVinsVNFDev(vd vins.VNFDev) []map[string]interface{} {
|
||||
@@ -138,6 +156,18 @@ func flattenVinsVNFDev(vd vins.VNFDev) []map[string]interface{} {
|
||||
return res
|
||||
}
|
||||
|
||||
func flattenComputes(computes []vins.Computes) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0, len(computes))
|
||||
for _, compute := range computes {
|
||||
tmp := map[string]interface{}{
|
||||
"id": compute.ID,
|
||||
"name": compute.Name,
|
||||
}
|
||||
res = append(res, tmp)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func flattenVinsRecordVNFs(rv vins.RecordVNFs) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0)
|
||||
temp := map[string]interface{}{
|
||||
@@ -393,25 +423,28 @@ func flattenVinsListInterfaces(i vins.ListInterfaces) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0, len(i))
|
||||
for _, v := range i {
|
||||
temp := map[string]interface{}{
|
||||
"conn_id": v.ConnID,
|
||||
"conn_type": v.ConnType,
|
||||
"def_gw": v.DefGW,
|
||||
"enabled": v.Enabled,
|
||||
"flipgroup_id": v.FLIPGroupID,
|
||||
"guid": v.GUID,
|
||||
"ip_address": v.IPAddress,
|
||||
"listen_ssh": v.ListenSSH,
|
||||
"mac": v.MAC,
|
||||
"name": v.Name,
|
||||
"net_id": v.NetID,
|
||||
"net_mask": v.NetMask,
|
||||
"net_type": v.NetType,
|
||||
"node_id": v.NodeID,
|
||||
"pci_slot": v.PCISlot,
|
||||
"qos": flattenVinsQOS(v.QOS),
|
||||
"target": v.Target,
|
||||
"type": v.Type,
|
||||
"vnfs": v.VNFs,
|
||||
"conn_id": v.ConnID,
|
||||
"conn_type": v.ConnType,
|
||||
"def_gw": v.DefGW,
|
||||
"enabled": v.Enabled,
|
||||
"flipgroup_id": v.FLIPGroupID,
|
||||
"guid": v.GUID,
|
||||
"ip_address": v.IPAddress,
|
||||
"listen_ssh": v.ListenSSH,
|
||||
"mac": v.MAC,
|
||||
"mtu": v.MTU,
|
||||
"name": v.Name,
|
||||
"net_id": v.NetID,
|
||||
"net_mask": v.NetMask,
|
||||
"net_type": v.NetType,
|
||||
"node_id": v.NodeID,
|
||||
"pci_slot": v.PCISlot,
|
||||
"bus_number": v.BusNumber,
|
||||
"qos": flattenVinsQOS(v.QOS),
|
||||
"target": v.Target,
|
||||
"type": v.Type,
|
||||
"vnfs": v.VNFs,
|
||||
"libvirt_settings": flattenLibvirtSettings(v.LibvirtSettings),
|
||||
}
|
||||
res = append(res, temp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user