package kvmvm

import (
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
	"repository.basistech.ru/BASIS/terraform-provider-decort/internal/constants"
	"repository.basistech.ru/BASIS/terraform-provider-decort/internal/statefuncs"
	"repository.basistech.ru/BASIS/terraform-provider-decort/internal/validators"
)

func dataSourceComputeSchemaMake() map[string]*schema.Schema {
	res := map[string]*schema.Schema{
		"compute_id": {
			Type:        schema.TypeInt,
			Required:    true,
			Description: "Get compute by id",
		},

		"account_id": {
			Type:        schema.TypeInt,
			Computed:    true,
			Description: "ID of the account this compute instance belongs to.",
		},
		"account_name": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "Name of the account this compute instance belongs to.",
		},
		"acl": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"explicit": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"right": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"user_group_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"affinity_label": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"affinity_rules": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"key": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"mode": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"policy": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"topology": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"value": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"affinity_weight": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"anti_affinity_rules": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"key": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"mode": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"policy": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"topology": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"value": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"arch": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"auto_start_w_node": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"boot_order": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
		},
		"boot_image_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"chipset": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"cd_image_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"clone_reference": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"clones": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeInt,
			},
		},
		"computeci_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"cpu_pin": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"cpus": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"created_by": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"created_time": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"custom_fields": { //NEED
			Type:     schema.TypeString,
			Computed: true,
		},
		"deleted_by": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"deleted_time": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"desc": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"devices": { //NEED
			Type:     schema.TypeString,
			Computed: true,
		},
		"disks": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"ckey": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"meta": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeString,
						},
					},
					"account_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"blk_discard": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"block_size": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"provision": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"boot_partition": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"bus_number": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"cache": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"created_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"deleted_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"desc": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"destruction_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"disk_path": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"gid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"disk_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"image_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"images": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"independent": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"iotune": {
						Type:     schema.TypeList,
						Optional: true,
						MaxItems: 1,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"read_bytes_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"read_bytes_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"read_iops_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"read_iops_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"size_iops_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"total_bytes_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"total_bytes_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"total_iops_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"total_iops_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"write_bytes_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"write_bytes_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"write_iops_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"write_iops_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
							},
						},
					},
					"iqn": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"login": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"milestones": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"params": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"parent_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"passwd": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"pci_slot": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"pool": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"present_to": {
						Type:     schema.TypeMap,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"purge_attempts": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"purge_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"replication": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"disk_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"pool_id": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"role": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"self_volume_id": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"storage_id": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"volume_id": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
						Description: "Replication status",
					},
					"reality_device_number": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"reference_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"res_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"res_name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"role": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"sep_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"shareable": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"size_available": {
						Type:     schema.TypeFloat,
						Computed: true,
					},
					"size_max": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"size_used": {
						Type:     schema.TypeFloat,
						Computed: true,
					},
					"snapshots": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"label": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"res_id": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"snap_set_guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"snap_set_time": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"timestamp": {
									Type:     schema.TypeInt,
									Computed: true,
								},
							},
						},
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"storage_policy_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"tech_status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"to_clean": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"devicename": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"created_by": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"deleted_by": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"updated_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
		"driver": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"gid": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"guid": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"hp_backed": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"image_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"image_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"pci_devices": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeInt,
			},
		},
		"independent": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"interfaces": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"bus_number": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"conn_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"conn_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"def_gw": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"enabled": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"enable_secgroups": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"flip_group_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"ip_address": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"listen_ssh": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"mac": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"mtu": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"net_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"netmask": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"net_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"node_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"pci_slot": {
						Type:     schema.TypeInt,
						Computed: true,
					},

					"qos": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"e_rate": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"in_brust": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"in_rate": {
									Type:     schema.TypeInt,
									Computed: true,
								},
							},
						},
					},
					"libvirt_settings": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"txmode": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"ioeventfd": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"event_idx": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"queues": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"rx_queue_size": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"tx_queue_size": {
									Type:     schema.TypeInt,
									Computed: true,
								},
							},
						},
					},
					"target": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"trunk_tags": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"sdn_interface_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"security_groups": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"vnfs": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
				},
			},
		},
		"live_migration_job_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"lock_status": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"manager_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"manager_type": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"migrationjob": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"milestones": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"natable_vins_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"natable_vins_ip": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"natable_vins_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"natable_vins_network": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"natable_vins_network_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"need_reboot": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"numa_affinity": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"numa_node_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"os_users": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"login": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"password": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"public_key": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"os_version": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"pinned": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"preferred_cpu": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeInt,
			},
		},
		"qemu_guest": {
			Type: schema.TypeList,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"enabled": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"enabled_agent_features": {
						Type: schema.TypeList,
						Elem: &schema.Schema{
							Type: schema.TypeString,
						},
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"last_update": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"user": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
			Computed: true,
		},
		"ram": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"reference_id": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"registered": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"res_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"reserved_node_cpus": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeInt,
			},
		},
		"rg_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"rg_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"snap_sets": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"disks": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"label": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"timestamp": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
		"node_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"node_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"stateless_sep_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"stateless_sep_type": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"status": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"tags": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"key": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"val": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"tech_status": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"updated_by": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"updated_time": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"loader_meta_iso": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"device_name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"path": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"user_data": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"user_managed": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"read_only": {
			Type:        schema.TypeBool,
			Computed:    true,
			Description: "Shows if compute is locked to read-only operations.",
		},
		"vnc_password": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"vgpus": {
			Type:        schema.TypeList,
			Computed:    true,
			Description: "List of virtual GPUs",
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"gid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"mode": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"profile_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"ram": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"last_update_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"created_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"deleted_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"vmid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"pgpuid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"reference_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"account_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"rg_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"last_claimed_by": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"pci_slot": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"bus_number": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
		//extra parameters
		"boot_disk_size": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"boot_disk_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"sep_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"pool": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"loader_type": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"boot_type": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"hot_resize": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"network_interface_naming": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"zone_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"weight": {
			Type:     schema.TypeInt,
			Computed: true,
		},
	}
	return res
}

func dataSourceComputeListSchemaMake() map[string]*schema.Schema {
	res := map[string]*schema.Schema{
		"by_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by ID",
		},
		"name": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by name",
		},
		"account_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by AccountID",
		},
		"rg_name": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by resgroup name",
		},
		"rg_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by RGID",
		},
		"tech_status": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by tech status",
		},
		"node_name": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by node name.",
		},
		"status": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by status",
		},
		"ip_address": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by IP address",
		},
		"node_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by node ID",
		},
		"cd_image_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by CD image ID",
		},
		"extnet_name": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by Extnet name",
		},
		"extnet_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by Extnet ID",
		},
		"includedeleted": {
			Type:     schema.TypeBool,
			Optional: true,
		},
		"sort_by": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "sort by one of supported fields, format +|-(field)",
		},
		"page": {
			Type:     schema.TypeInt,
			Optional: true,
		},
		"size": {
			Type:     schema.TypeInt,
			Optional: true,
		},
		"zone_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Zone ID",
		},
		"ignore_k8s": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "If set to true, ignores any VMs associated with any k8s cluster",
		},
		"items": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"acl": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"explicit": {
									Type:     schema.TypeBool,
									Computed: true,
								},
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"right": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"status": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"type": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"user_group_id": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
					},
					"account_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"account_name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"affinity_label": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"affinity_rules": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"key": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"mode": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"policy": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"topology": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"value": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
					},
					"affinity_weight": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"anti_affinity_rules": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"key": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"mode": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"policy": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"topology": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"value": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
					},
					"arch": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"auto_start_w_node": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"boot_order": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeString,
						},
					},
					"bootdisk_size": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"boot_image_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"chipset": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"cd_image_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"clone_reference": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"clones": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"computeci_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"cpu_pin": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"cpus": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"created_by": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"created_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"custom_fields": { //NEED
						Type:     schema.TypeString,
						Computed: true,
					},
					"deleted_by": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"deleted_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"desc": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"devices": { //NEED
						Type:     schema.TypeString,
						Computed: true,
					},
					"disks": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"bus_number": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"disk_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"pci_slot": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"sep_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
							},
						},
					},
					"driver": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"gid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"hp_backed": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"compute_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"interfaces": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"bus_number": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"conn_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"conn_type": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"def_gw": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"enabled": {
									Type:     schema.TypeBool,
									Computed: true,
								},
								"enable_secgroups": {
									Type:     schema.TypeBool,
									Computed: true,
								},
								"flip_group_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"ip_address": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"listen_ssh": {
									Type:     schema.TypeBool,
									Computed: true,
								},
								"mac": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"mtu": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"name": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"net_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"netmask": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"net_type": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"node_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"pci_slot": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"qos": {
									Type:     schema.TypeList,
									Computed: true,
									Elem: &schema.Resource{
										Schema: map[string]*schema.Schema{
											"e_rate": {
												Type:     schema.TypeInt,
												Computed: true,
											},
											"guid": {
												Type:     schema.TypeString,
												Computed: true,
											},
											"in_brust": {
												Type:     schema.TypeInt,
												Computed: true,
											},
											"in_rate": {
												Type:     schema.TypeInt,
												Computed: true,
											},
										},
									},
								},
								"libvirt_settings": {
									Type:     schema.TypeList,
									Computed: true,
									Elem: &schema.Resource{
										Schema: map[string]*schema.Schema{
											"guid": {
												Type:     schema.TypeString,
												Computed: true,
											},
											"txmode": {
												Type:     schema.TypeString,
												Computed: true,
											},
											"ioeventfd": {
												Type:     schema.TypeString,
												Computed: true,
											},
											"event_idx": {
												Type:     schema.TypeString,
												Computed: true,
											},
											"queues": {
												Type:     schema.TypeInt,
												Computed: true,
											},
											"rx_queue_size": {
												Type:     schema.TypeInt,
												Computed: true,
											},
											"tx_queue_size": {
												Type:     schema.TypeInt,
												Computed: true,
											},
										},
									},
								},
								"sdn_interface_id": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"security_groups": {
									Type:     schema.TypeList,
									Computed: true,
									Elem: &schema.Schema{
										Type: schema.TypeInt,
									},
								},
								"target": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"type": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"trunk_tags": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"vnfs": {
									Type:     schema.TypeList,
									Computed: true,
									Elem: &schema.Schema{
										Type: schema.TypeInt,
									},
								},
							},
						},
					},
					"live_migration_job_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"lock_status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"manager_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"manager_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"migrationjob": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"milestones": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"need_reboot": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"nid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"numa_affinity": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"numa_node_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"os_users": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"login": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"password": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"public_key": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
					},
					"os_version": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"pinned": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"preferred_cpu": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"qemu_guest": {
						Type: schema.TypeList,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"enabled": {
									Type:     schema.TypeBool,
									Computed: true,
								},
								"enabled_agent_features": {
									Type: schema.TypeList,
									Elem: &schema.Schema{
										Type: schema.TypeString,
									},
									Computed: true,
								},
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"last_update": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"user": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
						Computed: true,
					},
					"ram": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"reference_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"registered": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"res_name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"reserved_node_cpus": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"rg_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"rg_name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"snap_sets": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"disks": {
									Type:     schema.TypeList,
									Computed: true,
									Elem: &schema.Schema{
										Type: schema.TypeInt,
									},
								},
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"label": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"timestamp": {
									Type:     schema.TypeInt,
									Computed: true,
								},
							},
						},
					},
					"node_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"node_name": {
						Type:        schema.TypeString,
						Computed:    true,
						Description: "Find by node name.",
					},
					"stateless_sep_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"stateless_sep_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"tags": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"key": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"val": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
					},
					"tech_status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"total_disk_size": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"updated_by": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"updated_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"user_data": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"user_managed": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"read_only": {
						Type:        schema.TypeBool,
						Computed:    true,
						Description: "Shows if compute is in read-only mode.",
					},
					"vgpus": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"vins_connected": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"loader_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"boot_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"hot_resize": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"network_interface_naming": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"zone_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"weight": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
		"entry_count": {
			Type:     schema.TypeInt,
			Computed: true,
		},
	}
	return res
}

func dataSourceComputeListDeletedSchemaMake() map[string]*schema.Schema {
	res := map[string]*schema.Schema{
		"by_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by ID",
		},
		"name": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by name",
		},
		"account_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by AccountID",
		},
		"rg_name": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by resgroup name",
		},
		"rg_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by RGID",
		},
		"tech_status": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by tech status",
		},
		"ip_address": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by IP address",
		},
		"extnet_name": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by Extnet name",
		},
		"extnet_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by Extnet ID",
		},
		"sort_by": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "sort by one of supported fields, format +|-(field)",
		},
		"page": {
			Type:     schema.TypeInt,
			Optional: true,
		},
		"size": {
			Type:     schema.TypeInt,
			Optional: true,
		},
		"ignore_k8s": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "If set to true, ignores any VMs associated with any k8s cluster",
		},

		"items": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"acl": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"explicit": {
									Type:     schema.TypeBool,
									Computed: true,
								},
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"right": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"status": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"type": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"user_group_id": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
					},
					"account_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"account_name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"affinity_label": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"affinity_rules": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"key": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"mode": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"policy": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"topology": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"value": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
					},
					"affinity_weight": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"anti_affinity_rules": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"key": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"mode": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"policy": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"topology": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"value": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
					},
					"arch": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"auto_start_w_node": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"boot_order": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeString,
						},
					},
					"bootdisk_size": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"boot_image_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"chipset": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"cd_image_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"clone_reference": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"clones": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"computeci_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"cpu_pin": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"cpus": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"created_by": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"created_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"custom_fields": { //NEED
						Type:     schema.TypeString,
						Computed: true,
					},
					"deleted_by": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"deleted_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"desc": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"devices": { //NEED
						Type:     schema.TypeString,
						Computed: true,
					},
					"disks": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"disk_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"pci_slot": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"sep_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
							},
						},
					},
					"driver": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"gid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"hp_backed": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"compute_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"interfaces": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"bus_number": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"conn_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"conn_type": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"def_gw": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"enabled": {
									Type:     schema.TypeBool,
									Computed: true,
								},
								"enable_secgroups": {
									Type:     schema.TypeBool,
									Computed: true,
								},
								"flip_group_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"ip_address": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"listen_ssh": {
									Type:     schema.TypeBool,
									Computed: true,
								},
								"mac": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"mtu": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"name": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"net_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"netmask": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"net_type": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"node_id": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"pci_slot": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"qos": {
									Type:     schema.TypeList,
									Computed: true,
									Elem: &schema.Resource{
										Schema: map[string]*schema.Schema{
											"e_rate": {
												Type:     schema.TypeInt,
												Computed: true,
											},
											"guid": {
												Type:     schema.TypeString,
												Computed: true,
											},
											"in_brust": {
												Type:     schema.TypeInt,
												Computed: true,
											},
											"in_rate": {
												Type:     schema.TypeInt,
												Computed: true,
											},
										},
									},
								},
								"libvirt_settings": {
									Type:     schema.TypeList,
									Computed: true,
									Elem: &schema.Resource{
										Schema: map[string]*schema.Schema{
											"guid": {
												Type:     schema.TypeString,
												Computed: true,
											},
											"txmode": {
												Type:     schema.TypeString,
												Computed: true,
											},
											"ioeventfd": {
												Type:     schema.TypeString,
												Computed: true,
											},
											"event_idx": {
												Type:     schema.TypeString,
												Computed: true,
											},
											"queues": {
												Type:     schema.TypeInt,
												Computed: true,
											},
											"rx_queue_size": {
												Type:     schema.TypeInt,
												Computed: true,
											},
											"tx_queue_size": {
												Type:     schema.TypeInt,
												Computed: true,
											},
										},
									},
								},
								"sdn_interface_id": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"security_groups": {
									Type:     schema.TypeList,
									Computed: true,
									Elem: &schema.Schema{
										Type: schema.TypeInt,
									},
								},
								"target": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"type": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"trunk_tags": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"vnfs": {
									Type:     schema.TypeList,
									Computed: true,
									Elem: &schema.Schema{
										Type: schema.TypeInt,
									},
								},
							},
						},
					},
					"lock_status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"manager_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"manager_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"migrationjob": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"milestones": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"need_reboot": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"numa_affinity": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"numa_node_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"os_users": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"login": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"password": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"public_key": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
					},
					"os_version": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"pinned": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"preferred_cpu": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"ram": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"reference_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"registered": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"res_name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"reserved_node_cpus": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"rg_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"rg_name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"snap_sets": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"disks": {
									Type:     schema.TypeList,
									Computed: true,
									Elem: &schema.Schema{
										Type: schema.TypeInt,
									},
								},
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"label": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"timestamp": {
									Type:     schema.TypeInt,
									Computed: true,
								},
							},
						},
					},
					"node_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"node_name": {
						Type:        schema.TypeString,
						Computed:    true,
						Description: "Find by node name.",
					},
					"stateless_sep_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"stateless_sep_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"tags": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"key": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"val": {
									Type:     schema.TypeString,
									Computed: true,
								},
							},
						},
					},
					"tech_status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"total_disk_size": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"updated_by": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"updated_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"user_data": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"user_managed": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"vgpus": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"vins_connected": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"loader_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"boot_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"hot_resize": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"network_interface_naming": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"zone_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"weight": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
		"entry_count": {
			Type:     schema.TypeInt,
			Computed: true,
		},
	}
	return res
}

func dataSourceComputeAuditsSchemaMake() map[string]*schema.Schema {
	return map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},
		"timestamp_at": {
			Type:     schema.TypeInt,
			Optional: true,
		},
		"timestamp_to": {
			Type:     schema.TypeInt,
			Optional: true,
		},
		"user": {
			Type:     schema.TypeString,
			Optional: true,
		},
		"call": {
			Type:     schema.TypeString,
			Optional: true,
		},
		"sort_by": {
			Type:     schema.TypeString,
			Optional: true,
		},
		"page": {
			Type:     schema.TypeInt,
			Optional: true,
		},
		"size": {
			Type:     schema.TypeInt,
			Optional: true,
		},
		"min_status_code": {
			Type:     schema.TypeInt,
			Optional: true,
		},
		"max_status_code": {
			Type:     schema.TypeInt,
			Optional: true,
		},

		"items": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"call": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"responsetime": {
						Type:     schema.TypeFloat,
						Computed: true,
					},
					"statuscode": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"timestamp": {
						Type:     schema.TypeFloat,
						Computed: true,
					},
					"user": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"entry_count": {
			Type:     schema.TypeInt,
			Computed: true,
		},
	}
}

func dataSourceComputeGetAuditsSchemaMake() map[string]*schema.Schema {
	return map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},

		"items": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"epoch": {
						Type:     schema.TypeFloat,
						Computed: true,
					},
					"message": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
	}
}

func dataSourceComputeGetConsoleUrlSchemaMake() map[string]*schema.Schema {
	return map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},
		"console_url": {
			Type:     schema.TypeString,
			Computed: true,
		},
	}
}

func dataSourceComputePfwListSchemaMake() map[string]*schema.Schema {
	return map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},

		"items": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"pfw_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"local_ip": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"local_port": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"protocol": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"public_port_end": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"public_port_start": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"vm_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},

		"entry_count": {
			Type:     schema.TypeInt,
			Computed: true,
		},
	}
}

func dataSourceComputeUserListSchemaMake() map[string]*schema.Schema {
	res := map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},

		"account_acl": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"explicit": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"right": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"user_group_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"compute_acl": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"explicit": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"right": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"user_group_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"rg_acl": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"explicit": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"right": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"user_group_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
	}

	return res
}

func dataSourceComputeSnapshotListSchemaMake() map[string]*schema.Schema {
	res := map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},

		"items": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"disks": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"label": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"timestamp": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
		"entry_count": {
			Type:     schema.TypeInt,
			Computed: true,
		},
	}
	return res
}

func dataSourceComputeAffinityRelationsSchemaMake() map[string]*schema.Schema {
	res := map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},

		"other_node": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
		},
		"other_node_indirect": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
		},
		"other_node_indirect_soft": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
		},
		"other_node_soft": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
		},
		"same_node": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
		},
		"same_node_soft": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
		},
	}
	return res
}

func dataSourceComputeBootOrderGetSchemaMake() map[string]*schema.Schema {
	res := map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},

		"boot_order": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
		},
	}
	return res
}

func dataSourceComputeMigrateStorageInfoSchemaMake() map[string]*schema.Schema {
	res := map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},

		"migrate_storage_info": {
			Type:     schema.TypeString,
			Computed: true,
		},
	}
	return res
}

func dataSourceComputeSnapshotUsageSchemaMake() map[string]*schema.Schema {
	return map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},
		"label": {
			Type:     schema.TypeString,
			Optional: true,
		},

		"items": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"count": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"stored": {
						Type:     schema.TypeFloat,
						Computed: true,
					},
					"label": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"timestamp": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
	}
}

func dataSourceComputePCIDeviceListSchemaMake() map[string]*schema.Schema {
	return map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},
		"rg_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by RG id",
		},
		"device_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by device id",
		},
		"name": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by name",
		},
		"status": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Find by status",
		},
		"sort_by": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "sort by one of supported fields, format +|-(field)",
		},
		"page": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Page number",
		},
		"size": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Page size",
		},

		"items": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"ckey": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"meta": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeString,
						},
					},
					"compute_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"description": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"hwpath": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"device_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"rg_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"node_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"system_name": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"entry_count": {
			Type:     schema.TypeInt,
			Computed: true,
		},
	}
}

func dataSourceComputeVGPUListSchemaMake() map[string]*schema.Schema {
	return map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},
		"gpu_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Find by GPU id",
		},
		"type": {
			Type:        schema.TypeString,
			Computed:    true,
			Optional:    true,
			Description: "Find by type",
		},
		"status": {
			Type:        schema.TypeString,
			Computed:    true,
			Optional:    true,
			Description: "Find by status",
		},
		"includedeleted": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Include deleted computes. If using field 'status', then includedeleted will be ignored",
		},
		"sort_by": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "sort by one of supported fields, format +|-(field)",
		},
		"page": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Page number",
		},
		"size": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "Page size",
		},

		"items": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"account_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"created_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"deleted_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"gid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"vgpu_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"last_claimed_by": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"last_update_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"mode": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"pci_slot": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"pgpuid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"profile_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"ram": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"reference_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"rg_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"vm_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
		"entry_count": {
			Type:     schema.TypeInt,
			Computed: true,
		},
	}
}

func dataSourceComputeGetLogSchemaMake() map[string]*schema.Schema {
	return map[string]*schema.Schema{
		"compute_id": {
			Type:     schema.TypeInt,
			Required: true,
		},
		"path": {
			Type:     schema.TypeString,
			Required: true,
		},
		"log": {
			Type:     schema.TypeString,
			Computed: true,
		},
	}
}

func resourceComputeSchemaMake() map[string]*schema.Schema {
	return map[string]*schema.Schema{
		"name": {
			Type:        schema.TypeString,
			Required:    true,
			Description: "Name of this compute. Compute names are case sensitive and must be unique in the resource group.",
		},
		"rg_id": {
			Type:         schema.TypeInt,
			Required:     true,
			ValidateFunc: validation.IntAtLeast(1),
			Description:  "ID of the resource group where this compute should be deployed.",
		},
		"cpu": {
			Type:         schema.TypeInt,
			Required:     true,
			ValidateFunc: validation.IntBetween(1, constants.MAX_CPUS_PER_COMPUTE),
			Description:  "Number of CPUs to allocate to this compute instance.",
		},
		"ram": {
			Type:     schema.TypeInt,
			Required: true,
			ValidateFunc: validation.All(
				validation.IntAtLeast(constants.MIN_RAM_PER_COMPUTE),
				validators.DivisibleBy(constants.RAM_DIVISIBILITY),
			),
			Description: "Amount of RAM in MB to allocate to this compute instance.",
		},
		"storage_policy_id": {
			Type:        schema.TypeInt,
			Required:    true,
			Description: "Storage policy id of compute. The rules of the specified storage policy will be used.",
		},
		"image_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Description: "ID of the OS image to base this compute instance on.",
		},
		"zone_id": {
			Type:     schema.TypeInt,
			Optional: true,
			Computed: true,
		},
		"chipset": {
			Type:         schema.TypeString,
			Optional:     true,
			Computed:     true,
			ValidateFunc: validation.StringInSlice([]string{"Q35", "i440fx"}, false), // observe case while validating
			Description:  "Type of the emulated system.",
		},
		"without_boot_disk": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "If True, the imageId, bootDisk, sepId, pool parameters are ignored and the compute is created without a boot disk in the stopped state.",
		},
		"boot_disk_blk_discard": {
			Type:     schema.TypeBool,
			Optional: true,
			Default:  false,
		},
		"create_blank": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "If True, the compute is created via kvmx86/createBlank endpoint (without OS image). The image_id field is not required in this case.",
		},
		"boot_disk_size": {
			Type:        schema.TypeInt,
			Optional:    true,
			Computed:    true,
			Description: "This compute instance boot disk size in GB. Make sure it is large enough to accomodate selected OS image.",
		},
		"boot_disk_cache": {
			Type:         schema.TypeString,
			Optional:     true,
			Default:      "none",
			ValidateFunc: validation.StringInSlice([]string{"none", "writethrough"}, false),
			Description:  "Setting the boot disk caching mode",
		},
		"sep_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Computed:    true,
			Description: "ID of SEP to create bootDisk on. Uses image's sepId if not set.",
		},
		"pool": {
			Type:        schema.TypeString,
			Optional:    true,
			Computed:    true,
			Description: "Pool to use if sepId is set, can be also empty if needed to be chosen by system.",
		},
		"cloud_init": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "Optional cloud_init parameters. Applied when creating new compute instance only, ignored in all other cases.",
		},
		"description": {
			Type:        schema.TypeString,
			Optional:    true,
			Computed:    true,
			Description: "Optional text description of this compute instance.",
		},
		"started": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     true,
			Description: "Is compute started.",
		},
		"alt_boot_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Default:     0,
			Description: "ID of CD-ROM live image to boot",
		},
		"node_id": {
			Type:        schema.TypeInt,
			Optional:    true,
			Computed:    true,
			Description: "ID of node to start compute",
		},
		"custom_fields": {
			Type:     schema.TypeString,
			Optional: true,
			Computed: true,
		},
		"network": {
			Type:     schema.TypeSet,
			Optional: true,
			MinItems: 1,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"net_type": {
						Type:         schema.TypeString,
						Required:     true,
						StateFunc:    statefuncs.StateFuncToUpper,
						ValidateFunc: validation.StringInSlice([]string{"EXTNET", "VINS", "VFNIC", "DPDK", "SDN", "TRUNK"}, false), // observe case while validating
						Description:  "Type of the network for this connection",
					},
					"net_id": {
						Type:        schema.TypeInt,
						Required:    true,
						Description: "ID of the network for this connection.",
					},
					"ip_address": {
						Type:             schema.TypeString,
						Optional:         true,
						Computed:         true,
						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,
						Optional:         true,
						Computed:         true,
						DiffSuppressFunc: networkSubresIPAddreDiffSupperss,
						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(1500, 9216),
						Description:  "Maximum transmission unit, used only for DPDK type, must be 1500-9216",
					},
					"sdn_interface_id": {
						Type:             schema.TypeString,
						Optional:         true,
						Computed:         true,
						DiffSuppressFunc: networkSubresIPAddreDiffSupperss,
						Description:      "unique_identifier of LogicalPort on SDN side",
					},
					"enabled": {
						Type:        schema.TypeBool,
						Optional:    true,
						Computed:    true,
						Description: "network enable flag",
					},
					"net_mask": {
						Type:        schema.TypeInt,
						Optional:    true,
						Computed:    true,
						Description: "Subnet mask, used only for DPDK and VFNIC network types",
					},
				},
			},
			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.",
		},

		"security_groups": {
			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", "EXTNET", "DPDK"}, false), // observe case while validating
						Description:  "Type of the network",
					},
					"net_id": {
						Type:        schema.TypeInt,
						Required:    true,
						Description: "ID of the network",
					},
					"security_groups": {
						Type:     schema.TypeSet,
						Required: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"enable_secgroups": {
						Type:     schema.TypeBool,
						Optional: true,
						Default:  false,
					},
				},
			},
			Description: "list of security group IDs to apply to this interface",
		},

		"affinity_label": {
			Type:        schema.TypeString,
			Optional:    true,
			Computed:    true,
			Description: "Set affinity label for compute",
		},
		"affinity_rules": {
			Type:     schema.TypeList,
			Optional: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"topology": {
						Type:         schema.TypeString,
						Required:     true,
						ValidateFunc: validation.StringInSlice([]string{"node", "compute"}, false),
						Description:  "compute or node, for whom rule applies",
					},
					"policy": {
						Type:         schema.TypeString,
						Required:     true,
						ValidateFunc: validation.StringInSlice([]string{"RECOMMENDED", "REQUIRED"}, false),
						Description:  "RECOMMENDED or REQUIRED, the degree of 'strictness' of this rule",
					},
					"mode": {
						Type:         schema.TypeString,
						Required:     true,
						ValidateFunc: validation.StringInSlice([]string{"EQ", "NE", "ANY"}, false),
						Description:  "EQ or NE or ANY - the comparison mode is 'value', recorded by the specified 'key'",
					},
					"key": {
						Type:        schema.TypeString,
						Required:    true,
						Description: "key that are taken into account when analyzing this rule will be identified",
					},
					"value": {
						Type:        schema.TypeString,
						Required:    true,
						Description: "value that must match the key to be taken into account when analyzing this rule",
					},
				},
			},
		},
		"delete_async_mode": {
			Type:        schema.TypeBool,
			Computed:    true,
			Description: "async mode",
		},
		"anti_affinity_rules": {
			Type:     schema.TypeList,
			Optional: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"topology": {
						Type:         schema.TypeString,
						Required:     true,
						ValidateFunc: validation.StringInSlice([]string{"node", "compute"}, false),
						Description:  "compute or node, for whom rule applies",
					},
					"policy": {
						Type:         schema.TypeString,
						Required:     true,
						ValidateFunc: validation.StringInSlice([]string{"RECOMMENDED", "REQUIRED"}, false),
						Description:  "RECOMMENDED or REQUIRED, the degree of 'strictness' of this rule",
					},
					"mode": {
						Type:         schema.TypeString,
						Required:     true,
						ValidateFunc: validation.StringInSlice([]string{"EQ", "NE", "ANY"}, false),
						Description:  "EQ or NE or ANY - the comparison mode is 'value', recorded by the specified 'key'",
					},
					"key": {
						Type:        schema.TypeString,
						Required:    true,
						Description: "key that are taken into account when analyzing this rule will be identified",
					},
					"value": {
						Type:        schema.TypeString,
						Required:    true,
						Description: "value that must match the key to be taken into account when analyzing this rule",
					},
				},
			},
		},
		"disks": {
			Type:     schema.TypeList,
			Optional: true,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"cache": {
						Type:         schema.TypeString,
						Optional:     true,
						Default:      "none",
						ValidateFunc: validation.StringInSlice([]string{"none", "writethrough"}, false),
						Description:  "Setting the disk caching mode",
					},
					"disk_name": {
						Type:        schema.TypeString,
						Required:    true,
						Description: "Name for disk",
					},
					"size": {
						Type:        schema.TypeInt,
						Required:    true,
						Description: "Disk size in GiB",
					},
					"storage_policy_id": {
						Type:        schema.TypeInt,
						Required:    true,
						Description: "Storage policy id of disk. The rules of the specified storage policy will be used.",
					},
					"blk_discard": {
						Type:     schema.TypeBool,
						Optional: true,
						Default:  false,
					},
					"block_size": {
						Type:        schema.TypeString,
						Optional:    true,
						Computed:    true,
						Description: "Disk block size",
					},
					"provision": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"sep_id": {
						Type:        schema.TypeInt,
						Computed:    true,
						Optional:    true,
						Description: "Storage endpoint provider ID; by default the same with boot disk",
					},
					"pci_slot": {
						Type:        schema.TypeInt,
						Computed:    true,
						Description: "PCI slot number of the disk",
					},
					"bus_number": {
						Type:        schema.TypeInt,
						Computed:    true,
						Description: "Bus number of the disk on virtual bus (6 = boot disk)",
					},
					"pool": {
						Type:        schema.TypeString,
						Computed:    true,
						Optional:    true,
						Description: "Pool name; by default will be chosen automatically",
					},
					"node_ids": {
						Type:     schema.TypeSet,
						Optional: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"desc": {
						Type:        schema.TypeString,
						Computed:    true,
						Optional:    true,
						Description: "Optional description",
					},
					"image_id": {
						Type:        schema.TypeInt,
						Computed:    true,
						Optional:    true,
						Description: "Specify image id for create disk from template",
					},
					"independent": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"permanently": {
						Type:        schema.TypeBool,
						Optional:    true,
						Description: "Disk deletion status",
					},
					"disk_id": {
						Type:        schema.TypeInt,
						Computed:    true,
						Description: "Disk ID",
					},
					"present_to": {
						Type:     schema.TypeMap,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"shareable": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"size_max": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"size_used": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"to_clean": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"devicename": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"create_by": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"create_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"delete_by": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"delete_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"update_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"iotune": {
						Type:     schema.TypeList,
						Optional: true,
						Computed: true,
						MaxItems: 1,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"read_bytes_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"read_bytes_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"read_iops_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"read_iops_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"size_iops_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"total_bytes_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"total_bytes_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"total_iops_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"total_iops_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"write_bytes_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"write_bytes_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"write_iops_sec": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
								"write_iops_sec_max": {
									Type:     schema.TypeInt,
									Optional: true,
									Computed: true,
								},
							},
						},
					},
				},
			},
		},
		"extra_disks": {
			Type:     schema.TypeSet,
			Optional: true,
			Elem: &schema.Schema{
				Type: schema.TypeInt,
			},
			Description: "Optional list of IDs of extra disks to attach to this compute. You may specify several extra disks.",
		},
		"tags": {
			Type:     schema.TypeSet,
			Optional: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"key": {
						Type:     schema.TypeString,
						Required: true,
					},
					"value": {
						Type:     schema.TypeString,
						Required: true,
					},
				},
			},
		},
		"port_forwarding": {
			Type:     schema.TypeSet,
			Optional: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"public_port_start": {
						Type:     schema.TypeInt,
						Required: true,
					},
					"public_port_end": {
						Type:     schema.TypeInt,
						Optional: true,
						Default:  -1,
					},
					"local_port": {
						Type:     schema.TypeInt,
						Optional: true,
					},
					"proto": {
						Type:         schema.TypeString,
						Required:     true,
						ValidateFunc: validation.StringInSlice([]string{"tcp", "udp"}, false),
					},
					"rule_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
		"user_access": {
			Type:     schema.TypeSet,
			Optional: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"username": {
						Type:     schema.TypeString,
						Required: true,
					},
					"access_type": {
						Type:     schema.TypeString,
						Required: true,
					},
				},
			},
		},
		"snapshot": {
			Type:     schema.TypeSet,
			Optional: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"label": {
						Type:     schema.TypeString,
						Required: true,
					},
				},
			},
		},
		"rollback": {
			Type:     schema.TypeSet,
			MaxItems: 1,
			Optional: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"label": {
						Type:     schema.TypeString,
						Required: true,
					},
				},
			},
		},
		"cd": {
			Type:     schema.TypeSet,
			Optional: true,
			MaxItems: 1,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"cdrom_id": {
						Type:     schema.TypeInt,
						Required: true,
					},
				},
			},
		},
		"pin_to_node": {
			Type:     schema.TypeBool,
			Optional: true,
			Default:  false,
		},
		"auto_start_w_node": {
			Type:     schema.TypeBool,
			Optional: true,
			Computed: true,
		},
		"force_pin": {
			Type:     schema.TypeBool,
			Optional: true,
			Default:  false,
		},
		"enabled": {
			Type:        schema.TypeBool,
			Optional:    true,
			Computed:    true,
			Description: "If true - enable compute, else - disable",
		},
		"pause": {
			Type:     schema.TypeBool,
			Optional: true,
			Default:  false,
		},
		"reset": {
			Type:     schema.TypeBool,
			Optional: true,
			Default:  false,
		},
		"restore": {
			Type:     schema.TypeBool,
			Optional: true,
			Default:  false,
		},
		"force_stop": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "Flag for redeploy compute",
		},
		"force_resize": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "Flag for resize compute",
		},
		"detach_disks": {
			Type:     schema.TypeBool,
			Optional: true,
			Default:  true,
		},
		"permanently": {
			Type:     schema.TypeBool,
			Optional: true,
			Default:  true,
		},
		"numa_affinity": {
			Type:         schema.TypeString,
			Optional:     true,
			Default:      "none",
			ValidateFunc: validation.StringInSlice([]string{"none", "strict", "loose"}, false), // observe case while validating
			Description:  "Rule for VM placement with NUMA affinity.",
		},
		"cpu_pin": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "Run VM on dedicated CPUs. To use this feature, the system must be pre-configured by allocating CPUs on the physical node.",
		},
		"hp_backed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node.",
		},
		"preferred_cpu": {
			Type:     schema.TypeList,
			Optional: true,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeInt,
			},
			Description: "Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False",
		},
		"pci_devices": {
			Type:     schema.TypeSet,
			Optional: true,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeInt,
			},
			Description: "ID of the connected pci devices",
		},
		"loader_type": {
			Type:         schema.TypeString,
			Optional:     true,
			Computed:     true,
			ValidateFunc: validation.StringInSlice([]string{"linux", "windows", "unknown"}, false),
			Description:  "Type of image vm.",
		},
		"boot_type": {
			Type:         schema.TypeString,
			Optional:     true,
			Computed:     true,
			ValidateFunc: validation.StringInSlice([]string{"bios", "uefi"}, false),
			Description:  "Type of image upload.",
		},
		"hot_resize": {
			Type:        schema.TypeBool,
			Optional:    true,
			Computed:    true,
			Description: "Type of image vm.",
		},
		"network_interface_naming": {
			Type:         schema.TypeString,
			Optional:     true,
			Computed:     true,
			ValidateFunc: validation.StringInSlice([]string{"eth", "ens"}, false),
			Description:  "Name of netfowrk interface.",
		},
		"os_version": {
			Type:        schema.TypeString,
			Optional:    true,
			Computed:    true,
			Description: "the OS version installed on the VM",
		},
		"weight": {
			Type:         schema.TypeInt,
			Optional:     true,
			Computed:     true,
			ValidateFunc: validation.IntAtLeast(1),
			Description:  "Priority weight of the compute. Higher value means higher priority and later migration.",
		},
		// Computed properties
		"account_id": {
			Type:        schema.TypeInt,
			Computed:    true,
			Description: "ID of the account this compute instance belongs to.",
		},
		"account_name": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "Name of the account this compute instance belongs to.",
		},
		"acl": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"explicit": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"right": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"user_group_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
		"affinity_weight": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"arch": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"boot_order": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
		},
		"boot_disk_id": {
			Type:        schema.TypeInt,
			Computed:    true,
			Description: "This compute instance boot disk ID.",
		},
		"boot_image_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"cd_image_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"clone_reference": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"clones": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeInt,
			},
		},
		"computeci_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"created_by": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"created_time": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"deleted_by": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"deleted_time": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"devices": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"driver": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"gid": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"guid": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"compute_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"interfaces": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"bus_number": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"conn_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"conn_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"def_gw": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"enabled": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"enable_secgroups": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"flip_group_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"ip_address": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"listen_ssh": {
						Type:     schema.TypeBool,
						Computed: true,
					},
					"mac": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"mtu": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"net_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"netmask": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"net_type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"node_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"pci_slot": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"qos": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"e_rate": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"in_brust": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"in_rate": {
									Type:     schema.TypeInt,
									Computed: true,
								},
							},
						},
					},
					"libvirt_settings": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Resource{
							Schema: map[string]*schema.Schema{
								"guid": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"txmode": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"ioeventfd": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"event_idx": {
									Type:     schema.TypeString,
									Computed: true,
								},
								"queues": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"rx_queue_size": {
									Type:     schema.TypeInt,
									Computed: true,
								},
								"tx_queue_size": {
									Type:     schema.TypeInt,
									Computed: true,
								},
							},
						},
					},
					"sdn_interface_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"security_groups": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"target": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"trunk_tags": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"vnfs": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
				},
			},
		},
		"image_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"lock_status": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"manager_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"manager_type": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"migrationjob": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"milestones": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"natable_vins_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"natable_vins_ip": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"natable_vins_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"natable_vins_network": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"natable_vins_network_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"need_reboot": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"numa_node_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"os_users": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"guid": {
						Type:        schema.TypeString,
						Computed:    true,
						Description: "GUID of this guest OS user.",
					},

					"login": {
						Type:        schema.TypeString,
						Computed:    true,
						Description: "Login name of this guest OS user.",
					},

					"password": {
						Type:     schema.TypeString,
						Computed: true,
						//Sensitive:   true,
						Description: "Password of this guest OS user.",
					},

					"public_key": {
						Type:        schema.TypeString,
						Computed:    true,
						Description: "SSH public key of this guest OS user.",
					},
				},
			},
			Description: "Guest OS users provisioned on this compute instance.",
		},
		"pinned": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"reference_id": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"registered": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"res_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"reserved_node_cpus": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Schema{
				Type: schema.TypeInt,
			},
		},
		"rg_name": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "Name of the resource group where this compute instance is located.",
		},
		"snap_sets": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"disks": {
						Type:     schema.TypeList,
						Computed: true,
						Elem: &schema.Schema{
							Type: schema.TypeInt,
						},
					},
					"guid": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"label": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"timestamp": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
		"node_name": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "Name of the node, on which VM started",
		},
		"stateless_sep_id": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"stateless_sep_type": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"status": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"tech_status": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"updated_by": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"updated_time": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"user_managed": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"read_only": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "Sets read-only mode for this compute. Only data operations allowed when enabled.",
		},
		"vnc_password": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"vgpus": {
			Type:        schema.TypeList,
			Computed:    true,
			Description: "List of virtual GPUs",
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"gid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"type": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"mode": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"status": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"profile_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"ram": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"last_update_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"created_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"deleted_time": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"vmid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"pgpuid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"reference_id": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"account_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"rg_id": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"last_claimed_by": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"pci_slot": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"bus_number": {
						Type:     schema.TypeInt,
						Computed: true,
					},
					"guid": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
		"virtual_image_name": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"loader_meta_iso": {
			Type:     schema.TypeList,
			Computed: true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"device_name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"path": {
						Type:     schema.TypeString,
						Computed: true,
					},
				},
			},
		},
	}
}
