This commit is contained in:
asteam
2024-12-04 12:13:55 +03:00
parent 782afe70da
commit de8857b1d5
309 changed files with 32845 additions and 309 deletions

View File

@@ -3012,13 +3012,11 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
ValidateFunc: validation.StringInSlice([]string{"EXTNET", "VINS", "VFNIC", "DPDK"}, false), // observe case while validating
Description: "Type of the network for this connection, either EXTNET or VINS.",
},
"net_id": {
Type: schema.TypeInt,
Required: true,
Description: "ID of the network for this connection.",
},
"ip_address": {
Type: schema.TypeString,
Optional: true,
@@ -3026,24 +3024,82 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
DiffSuppressFunc: networkSubresIPAddreDiffSupperss,
Description: "Optional IP address to assign to this connection. This IP should belong to the selected network and free for use.",
},
"mac": {
Type: schema.TypeString,
Computed: true,
Description: "MAC address associated with this connection. MAC address is assigned automatically.",
},
"weight": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
Description: "weight the network if you need to sort network list, the smallest attach first. zero or null weight attach last",
},
"mtu": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
//Default: 1500,
ValidateFunc: validation.IntBetween(1, 9216),
Description: "Maximum transmission unit, used only for DPDK type, must be 1-9216",
},
},
},
Description: "Optional network connection(s) for this compute. You may specify several network blocks, one for each connection.",
},
"libvirt_settings": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"net_type": {
Type: schema.TypeString,
Required: true,
StateFunc: statefuncs.StateFuncToUpper,
ValidateFunc: validation.StringInSlice([]string{"VINS", "VFNIC", "DPDK"}, false), // observe case while validating
Description: "Type of the network",
},
"net_id": {
Type: schema.TypeInt,
Required: true,
Description: "ID of the network",
},
"txmode": {
Type: schema.TypeString,
Default: "",
Optional: true,
},
"ioeventfd": {
Type: schema.TypeString,
Default: "",
Optional: true,
},
"event_idx": {
Type: schema.TypeString,
Default: "",
Optional: true,
},
"queues": {
Type: schema.TypeInt,
Default: 0,
Optional: true,
},
"rx_queue_size": {
Type: schema.TypeInt,
Default: 0,
Optional: true,
},
"tx_queue_size": {
Type: schema.TypeInt,
Default: 0,
Optional: true,
},
},
},
Description: "Configure libvirt virtio interface parameters. You can only delete values locally. Data on the platform cannot be deleted.",
},
"affinity_label": {
Type: schema.TypeString,
Optional: true,
@@ -3412,43 +3468,6 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
},
Description: "ID of the connected pci devices",
},
"libvirt_settings": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"mac": {
Type: schema.TypeString,
Required: true,
},
"txmode": {
Type: schema.TypeString,
Optional: true,
},
"ioeventfd": {
Type: schema.TypeString,
Optional: true,
},
"event_idx": {
Type: schema.TypeString,
Optional: true,
},
"queues": {
Type: schema.TypeInt,
Optional: true,
},
"rx_queue_size": {
Type: schema.TypeInt,
Optional: true,
},
"tx_queue_size": {
Type: schema.TypeInt,
Optional: true,
},
},
},
Description: "Configure libvirt virtio interface parameters. You can only delete values locally. Data on the platform cannot be deleted.",
},
// Computed properties
"account_id": {
Type: schema.TypeInt,