package account import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) func resourceAccountSchemaMake() map[string]*schema.Schema { return map[string]*schema.Schema{ "account_name": { Type: schema.TypeString, Required: true, Description: "account name", }, "username": { Type: schema.TypeString, Required: true, Description: "username of owner the account", }, "emailaddress": { Type: schema.TypeString, Optional: true, Description: "email", }, "send_access_emails": { Type: schema.TypeBool, Optional: true, Default: true, Description: "if true send emails when a user is granted access to resources", }, "uniq_pools": { Type: schema.TypeList, Optional: true, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "users": { Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "user_id": { Type: schema.TypeString, Required: true, }, "access_type": { Type: schema.TypeString, Required: true, }, }, }, }, "cpu_allocation_parameter": { Type: schema.TypeString, Optional: true, Computed: true, Description: "set cpu allocation parameter", }, "cpu_allocation_ratio": { Type: schema.TypeFloat, Optional: true, Computed: true, Description: "set cpu allocation ratio", }, "available_templates": { Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{ Type: schema.TypeInt, }, Description: "Share images with account", }, "restore": { Type: schema.TypeBool, Optional: true, Description: "restore a deleted account", }, "permanently": { Type: schema.TypeBool, Optional: true, Default: false, Description: "whether to completely delete the account", }, "enable": { Type: schema.TypeBool, Optional: true, Default: true, Description: "enable/disable account", }, "resource_limits": { Type: schema.TypeList, Optional: true, Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cu_c": { Type: schema.TypeFloat, Optional: true, Computed: true, }, "cu_d": { Type: schema.TypeFloat, Computed: true, }, "cu_dm": { Type: schema.TypeFloat, Optional: true, Computed: true, }, "cu_i": { Type: schema.TypeFloat, Optional: true, Computed: true, }, "cu_m": { Type: schema.TypeFloat, Optional: true, Computed: true, }, "cu_np": { Type: schema.TypeFloat, Optional: true, Computed: true, }, "gpu_units": { Type: schema.TypeFloat, Optional: true, Computed: true, }, }, }, }, "compute_features": { Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{ Type: schema.TypeString, ValidateFunc: validation.StringInSlice([]string{"hugepages", "numa", "cpupin", "vfnic"}, true), }, }, "account_id": { Type: schema.TypeInt, Optional: true, Computed: true, }, "dc_location": { Type: schema.TypeString, Computed: true, }, "ckey": { Type: schema.TypeString, Computed: true, }, // "meta": { // Type: schema.TypeList, // Computed: true, // Elem: &schema.Schema{ // Type: schema.TypeString, // }, // }, "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, }, }, }, }, "company": { Type: schema.TypeString, Computed: true, }, "companyurl": { Type: schema.TypeString, Computed: true, }, "created_by": { Type: schema.TypeString, Computed: true, }, "created_time": { Type: schema.TypeInt, Computed: true, }, "deactivation_time": { Type: schema.TypeFloat, Computed: true, }, "deleted_by": { Type: schema.TypeString, Computed: true, }, "deleted_time": { Type: schema.TypeInt, Computed: true, }, "displayname": { Type: schema.TypeString, Computed: true, }, "guid": { Type: schema.TypeInt, Computed: true, }, "resource_types": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "status": { Type: schema.TypeString, Computed: true, }, "updated_time": { Type: schema.TypeInt, Computed: true, }, "version": { Type: schema.TypeInt, Computed: true, }, "vins": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeInt, }, }, } } func dataSourceAccountAuditsListSchemaMake() map[string]*schema.Schema { res := map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Required: true, Description: "ID of the account", }, "items": { Type: schema.TypeList, Computed: true, Description: "Search Result", 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, }, }, }, }, } return res } func dataSourceAccountComputesListSchemaMake() map[string]*schema.Schema { res := map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Required: true, Description: "ID of the account", }, "compute_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by compute ID", }, "name": { Type: schema.TypeString, Optional: true, Description: "Filter by compute name", }, "rg_name": { Type: schema.TypeString, Optional: true, Description: "Filter by RG name", }, "rg_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by RG ID", }, "tech_status": { Type: schema.TypeString, Optional: true, Description: "Filter by tech. status", }, "ip_address": { Type: schema.TypeString, Optional: true, Description: "Filter by IP address", }, "extnet_name": { Type: schema.TypeString, Optional: true, Description: "Filter by extnet name", }, "extnet_id": { Type: schema.TypeInt, Optional: true, Description: "Filter 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, Description: "Page number", }, "size": { Type: schema.TypeInt, Optional: true, Description: "Page size", }, "items": { Type: schema.TypeList, Computed: true, Description: "Search Result", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Computed: true, }, "account_name": { Type: schema.TypeString, Computed: true, }, "cpus": { 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, }, "compute_id": { Type: schema.TypeInt, Computed: true, }, "compute_name": { Type: schema.TypeString, Computed: true, }, "ram": { Type: schema.TypeInt, Computed: true, }, "registered": { Type: schema.TypeBool, Computed: true, }, "rg_id": { Type: schema.TypeInt, Computed: true, }, "rg_name": { Type: schema.TypeString, Computed: true, }, "status": { Type: schema.TypeString, Computed: true, }, "tech_status": { Type: schema.TypeString, Computed: true, }, "total_disks_size": { Type: schema.TypeInt, Computed: true, }, "updated_by": { Type: schema.TypeString, Computed: true, }, "updated_time": { Type: schema.TypeInt, Computed: true, }, "user_managed": { Type: schema.TypeBool, Computed: true, }, "vins_connected": { Type: schema.TypeInt, Computed: true, }, }, }, }, "entry_count": { Type: schema.TypeInt, Computed: true, }, } return res } func dataSourceAccountListDeletedSchemaMake() map[string]*schema.Schema { return map[string]*schema.Schema{ "by_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by ID", }, "name": { Type: schema.TypeString, Optional: true, Description: "Filter by name", }, "acl": { Type: schema.TypeString, Optional: true, Description: "Filter by ACL", }, "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{ "dc_location": { Type: schema.TypeString, Computed: true, }, "ckey": { Type: schema.TypeString, Computed: true, }, "meta": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "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, }, }, }, }, "company": { Type: schema.TypeString, Computed: true, }, "companyurl": { Type: schema.TypeString, Computed: true, }, "compute_features": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "cpu_allocation_parameter": { Type: schema.TypeString, Computed: true, }, "cpu_allocation_ratio": { Type: schema.TypeFloat, Computed: true, }, "created_by": { Type: schema.TypeString, Computed: true, }, "created_time": { Type: schema.TypeInt, Computed: true, }, "deactivation_time": { Type: schema.TypeFloat, Computed: true, }, "deleted_by": { Type: schema.TypeString, Computed: true, }, "deleted_time": { Type: schema.TypeInt, Computed: true, }, "displayname": { Type: schema.TypeString, Computed: true, }, "guid": { Type: schema.TypeInt, Computed: true, }, "account_id": { Type: schema.TypeInt, Computed: true, }, "account_name": { Type: schema.TypeString, Computed: true, }, "resource_limits": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cu_c": { Type: schema.TypeFloat, Computed: true, }, "cu_d": { Type: schema.TypeFloat, Computed: true, }, "cu_dm": { Type: schema.TypeFloat, Computed: true, }, "cu_i": { Type: schema.TypeFloat, Computed: true, }, "cu_m": { Type: schema.TypeFloat, Computed: true, }, "cu_np": { Type: schema.TypeFloat, Computed: true, }, "gpu_units": { Type: schema.TypeFloat, Computed: true, }, }, }, }, "resource_types": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "send_access_emails": { Type: schema.TypeBool, Computed: true, }, "status": { Type: schema.TypeString, Computed: true, }, "uniq_pools": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "updated_time": { Type: schema.TypeInt, Computed: true, }, "version": { Type: schema.TypeInt, Computed: true, }, "vins": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeInt, }, }, }, }, }, "entry_count": { Type: schema.TypeInt, Computed: true, }, } } func dataSourceAccountDisksListSchemaMake() map[string]*schema.Schema { res := map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Required: true, Description: "ID of the account", }, "disk_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by disk ID", }, "name": { Type: schema.TypeString, Optional: true, Description: "Filter by disk name", }, "disk_max_size": { Type: schema.TypeInt, Optional: true, Description: "Filter by disk max size", }, "type": { Type: schema.TypeString, Optional: true, Description: "Filter by disk type", }, "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, Description: "Search Result", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "disk_id": { Type: schema.TypeInt, Computed: true, }, "disk_name": { Type: schema.TypeString, Computed: true, }, "pool_name": { Type: schema.TypeString, Computed: true, }, "sep_id": { Type: schema.TypeInt, Computed: true, }, "shareable": { Type: schema.TypeBool, Computed: true, }, "size_max": { Type: schema.TypeInt, Computed: true, }, "type": { Type: schema.TypeString, Computed: true, }, }, }, }, "entry_count": { Type: schema.TypeInt, Computed: true, }, } return res } func dataSourceAccountFlipGroupsListSchemaMake() map[string]*schema.Schema { res := map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Required: true, Description: "ID of the account", }, "name": { Type: schema.TypeString, Optional: true, Description: "Filter by name", }, "vins_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by ViNS ID", }, "vins_name": { Type: schema.TypeString, Optional: true, Description: "Filter by ViNS name", }, "extnet_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by extnet ID", }, "by_ip": { Type: schema.TypeString, Optional: true, Description: "Filter by IP", }, "flipgroup_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by flipgroup ID", }, "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, Description: "Search Result", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Computed: true, }, "client_type": { Type: schema.TypeString, Computed: true, }, "conn_type": { Type: schema.TypeString, Computed: true, }, "created_by": { Type: schema.TypeString, Computed: true, }, "created_time": { Type: schema.TypeInt, Computed: true, }, "default_gw": { 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, }, "gid": { Type: schema.TypeInt, Computed: true, }, "guid": { Type: schema.TypeInt, Computed: true, }, "fg_id": { Type: schema.TypeInt, Computed: true, }, "ip": { Type: schema.TypeString, Computed: true, }, "milestones": { Type: schema.TypeInt, Computed: true, }, "fg_name": { Type: schema.TypeString, Computed: true, }, "net_id": { Type: schema.TypeInt, Computed: true, }, "net_type": { Type: schema.TypeString, Computed: true, }, "netmask": { Type: schema.TypeInt, Computed: true, }, "status": { Type: schema.TypeString, Computed: true, }, "updated_by": { Type: schema.TypeString, Computed: true, }, "updated_time": { Type: schema.TypeInt, Computed: true, }, }, }, }, "entry_count": { Type: schema.TypeInt, Computed: true, }, } return res } func dataSourceAccountResourceConsumptionGetSchemaMake() map[string]*schema.Schema { res := map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Required: true, }, "consumed": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpu": { Type: schema.TypeInt, Computed: true, }, "disksize": { Type: schema.TypeFloat, Computed: true, }, "disksizemax": { Type: schema.TypeFloat, Computed: true, }, "extips": { Type: schema.TypeInt, Computed: true, }, "exttraffic": { Type: schema.TypeInt, Computed: true, }, "gpu": { Type: schema.TypeInt, Computed: true, }, "ram": { Type: schema.TypeInt, Computed: true, }, "seps": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "sep_id": { Type: schema.TypeString, Computed: true, }, "data_name": { Type: schema.TypeString, Computed: true, }, "disk_size": { Type: schema.TypeFloat, Computed: true, }, "disk_size_max": { Type: schema.TypeFloat, Computed: true, }, }, }, }, }, }, }, "reserved": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpu": { Type: schema.TypeInt, Computed: true, }, "disksize": { Type: schema.TypeFloat, Computed: true, }, "disksizemax": { Type: schema.TypeFloat, Computed: true, }, "extips": { Type: schema.TypeInt, Computed: true, }, "exttraffic": { Type: schema.TypeInt, Computed: true, }, "gpu": { Type: schema.TypeInt, Computed: true, }, "ram": { Type: schema.TypeInt, Computed: true, }, "seps": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "sep_id": { Type: schema.TypeString, Computed: true, }, "data_name": { Type: schema.TypeString, Computed: true, }, "disk_size": { Type: schema.TypeFloat, Computed: true, }, "disk_size_max": { Type: schema.TypeFloat, Computed: true, }, }, }, }, }, }, }, "resource_limits": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cu_c": { Type: schema.TypeFloat, Computed: true, }, "cu_d": { Type: schema.TypeFloat, Computed: true, }, "cu_dm": { Type: schema.TypeFloat, Computed: true, }, "cu_i": { Type: schema.TypeFloat, Computed: true, }, "cu_m": { Type: schema.TypeFloat, Computed: true, }, "cu_np": { Type: schema.TypeFloat, Computed: true, }, "gpu_units": { Type: schema.TypeFloat, Computed: true, }, }, }, }, } return res } func dataSourceAccountListSchemaMake() map[string]*schema.Schema { res := map[string]*schema.Schema{ "by_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by ID", }, "name": { Type: schema.TypeString, Optional: true, Description: "Filter by name", }, "acl": { Type: schema.TypeString, Optional: true, Description: "Filter by ACL", }, "status": { Type: schema.TypeString, Optional: true, Description: "Filter 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{ "dc_location": { Type: schema.TypeString, Computed: true, }, "ckey": { Type: schema.TypeString, Computed: true, }, "meta": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "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, }, }, }, }, "company": { Type: schema.TypeString, Computed: true, }, "companyurl": { Type: schema.TypeString, Computed: true, }, "compute_features": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "cpu_allocation_parameter": { Type: schema.TypeString, Computed: true, }, "cpu_allocation_ratio": { Type: schema.TypeFloat, Computed: true, }, "created_by": { Type: schema.TypeString, Computed: true, }, "created_time": { Type: schema.TypeInt, Computed: true, }, "deactivation_time": { Type: schema.TypeFloat, Computed: true, }, "deleted_by": { Type: schema.TypeString, Computed: true, }, "deleted_time": { Type: schema.TypeInt, Computed: true, }, "displayname": { Type: schema.TypeString, Computed: true, }, "guid": { Type: schema.TypeInt, Computed: true, }, "account_id": { Type: schema.TypeInt, Computed: true, }, "account_name": { Type: schema.TypeString, Computed: true, }, "resource_limits": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cu_c": { Type: schema.TypeFloat, Computed: true, }, "cu_d": { Type: schema.TypeFloat, Computed: true, }, "cu_dm": { Type: schema.TypeFloat, Computed: true, }, "cu_i": { Type: schema.TypeFloat, Computed: true, }, "cu_m": { Type: schema.TypeFloat, Computed: true, }, "cu_np": { Type: schema.TypeFloat, Computed: true, }, "gpu_units": { Type: schema.TypeFloat, Computed: true, }, }, }, }, "resource_types": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "send_access_emails": { Type: schema.TypeBool, Computed: true, }, "status": { Type: schema.TypeString, Computed: true, }, "uniq_pools": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "updated_time": { Type: schema.TypeInt, Computed: true, }, "version": { Type: schema.TypeInt, Computed: true, }, "vins": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeInt, }, }, }, }, }, "entry_count": { Type: schema.TypeInt, Computed: true, }, } return res } func dataSourceAccountResourceConsumptionListSchemaMake() map[string]*schema.Schema { res := map[string]*schema.Schema{ "items": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Computed: true, }, "consumed": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpu": { Type: schema.TypeInt, Computed: true, }, "disksize": { Type: schema.TypeFloat, Computed: true, }, "disksizemax": { Type: schema.TypeFloat, Computed: true, }, "extips": { Type: schema.TypeInt, Computed: true, }, "exttraffic": { Type: schema.TypeInt, Computed: true, }, "gpu": { Type: schema.TypeInt, Computed: true, }, "ram": { Type: schema.TypeInt, Computed: true, }, "seps": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "sep_id": { Type: schema.TypeString, Computed: true, }, "data_name": { Type: schema.TypeString, Computed: true, }, "disk_size": { Type: schema.TypeFloat, Computed: true, }, "disk_size_max": { Type: schema.TypeFloat, Computed: true, }, }, }, }, }, }, }, "reserved": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpu": { Type: schema.TypeInt, Computed: true, }, "disksize": { Type: schema.TypeFloat, Computed: true, }, "disksizemax": { Type: schema.TypeFloat, Computed: true, }, "extips": { Type: schema.TypeInt, Computed: true, }, "exttraffic": { Type: schema.TypeInt, Computed: true, }, "gpu": { Type: schema.TypeInt, Computed: true, }, "ram": { Type: schema.TypeInt, Computed: true, }, "seps": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "sep_id": { Type: schema.TypeString, Computed: true, }, "data_name": { Type: schema.TypeString, Computed: true, }, "disk_size": { Type: schema.TypeFloat, Computed: true, }, "disk_size_max": { Type: schema.TypeFloat, Computed: true, }, }, }, }, }, }, }, }, }, }, "entry_count": { Type: schema.TypeInt, Computed: true, }, } return res } func dataSourceAccountRGListSchemaMake() map[string]*schema.Schema { res := map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Required: true, Description: "ID of the account", }, "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", }, "rg_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by RG ID", }, "name": { Type: schema.TypeString, Optional: true, Description: "Filter by name", }, "vins_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by ViNS ID", }, "vm_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by VM ID", }, "status": { Type: schema.TypeString, Optional: true, Description: "Filter by status", }, "items": { Type: schema.TypeList, Computed: true, Description: "Search Result", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "computes": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "started": { Type: schema.TypeInt, Computed: true, }, "stopped": { Type: schema.TypeInt, Computed: true, }, }, }, }, "resources": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "consumed": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpu": { Type: schema.TypeInt, Computed: true, }, "disksize": { Type: schema.TypeFloat, Computed: true, }, "disksizemax": { Type: schema.TypeInt, Computed: true, }, "extips": { Type: schema.TypeInt, Computed: true, }, "exttraffic": { Type: schema.TypeInt, Computed: true, }, "gpu": { Type: schema.TypeInt, Computed: true, }, "ram": { Type: schema.TypeInt, Computed: true, }, "seps": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "sep_id": { Type: schema.TypeString, Computed: true, }, "data_name": { Type: schema.TypeString, Computed: true, }, "disk_size": { Type: schema.TypeFloat, Computed: true, }, "disk_size_max": { Type: schema.TypeFloat, Computed: true, }, }, }, }, }, }, }, "limits": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpu": { Type: schema.TypeInt, Computed: true, }, "disksize": { Type: schema.TypeInt, Computed: true, }, "disksizemax": { Type: schema.TypeInt, Computed: true, }, "extips": { Type: schema.TypeInt, Computed: true, }, "exttraffic": { Type: schema.TypeInt, Computed: true, }, "gpu": { Type: schema.TypeInt, Computed: true, }, "ram": { Type: schema.TypeInt, Computed: true, }, "seps": { Type: schema.TypeInt, Computed: true, }, }, }, }, "reserved": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpu": { Type: schema.TypeInt, Computed: true, }, "disksize": { Type: schema.TypeInt, Computed: true, }, "disksizemax": { Type: schema.TypeInt, Computed: true, }, "extips": { Type: schema.TypeInt, Computed: true, }, "exttraffic": { Type: schema.TypeInt, Computed: true, }, "gpu": { Type: schema.TypeInt, Computed: true, }, "ram": { Type: schema.TypeInt, Computed: true, }, "seps": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "sep_id": { Type: schema.TypeString, Computed: true, }, "data_name": { Type: schema.TypeString, Computed: true, }, "disk_size": { Type: schema.TypeFloat, Computed: true, }, "disk_size_max": { Type: schema.TypeFloat, 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, }, "rg_id": { Type: schema.TypeInt, Computed: true, }, "milestones": { Type: schema.TypeInt, Computed: true, }, "rg_name": { Type: schema.TypeString, Computed: true, }, "status": { Type: schema.TypeString, Computed: true, }, "updated_by": { Type: schema.TypeString, Computed: true, }, "updated_time": { Type: schema.TypeInt, Computed: true, }, "vinses": { Type: schema.TypeInt, Computed: true, }, }, }, }, "entry_count": { Type: schema.TypeInt, Optional: true, }, } return res } func dataSourceAccountVinsListSchemaMake() map[string]*schema.Schema { res := map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Required: true, Description: "ID of the account", }, "vins_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by ViNS ID", }, "name": { Type: schema.TypeString, Optional: true, Description: "Filter by name", }, "rg_id": { Type: schema.TypeInt, Optional: true, Description: "Filter by RG ID", }, "ext_ip": { Type: schema.TypeString, Optional: true, Description: "Filter by external IP", }, "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, Description: "Search Result", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Computed: true, }, "account_name": { Type: schema.TypeString, Computed: true, }, "computes": { 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, }, "external_ip": { Type: schema.TypeString, Computed: true, }, "extnet_id": { Type: schema.TypeInt, Computed: true, }, "free_ips": { Type: schema.TypeInt, Computed: true, }, "vin_id": { Type: schema.TypeInt, Computed: true, }, "vin_name": { Type: schema.TypeString, Computed: true, }, "network": { Type: schema.TypeString, Computed: true, }, "pri_vnf_dev_id": { Type: schema.TypeInt, Computed: true, }, "rg_id": { Type: schema.TypeInt, Computed: true, }, "rg_name": { Type: schema.TypeString, Computed: true, }, "status": { Type: schema.TypeString, Computed: true, }, "updated_by": { Type: schema.TypeString, Computed: true, }, "updated_time": { Type: schema.TypeInt, Computed: true, }, }, }, }, "entry_count": { Type: schema.TypeInt, Computed: true, }, } return res } func dataSourceAccountSchemaMake() map[string]*schema.Schema { return map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Required: true, }, "dc_location": { Type: schema.TypeString, Computed: true, }, "ckey": { Type: schema.TypeString, Computed: true, }, "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, }, }, }, }, "company": { Type: schema.TypeString, Computed: true, }, "companyurl": { Type: schema.TypeString, Computed: true, }, "compute_features": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "cpu_allocation_parameter": { Type: schema.TypeString, Computed: true, }, "cpu_allocation_ratio": { Type: schema.TypeFloat, Computed: true, }, "created_by": { Type: schema.TypeString, Computed: true, }, "created_time": { Type: schema.TypeInt, Computed: true, }, "deactivation_time": { Type: schema.TypeInt, Computed: true, }, "deleted_by": { Type: schema.TypeString, Computed: true, }, "deleted_time": { Type: schema.TypeInt, Computed: true, }, "displayname": { Type: schema.TypeString, Computed: true, }, "guid": { Type: schema.TypeInt, Computed: true, }, "account_name": { Type: schema.TypeString, Computed: true, }, "resource_limits": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cu_c": { Type: schema.TypeFloat, Computed: true, }, "cu_d": { Type: schema.TypeFloat, Computed: true, }, "cu_dm": { Type: schema.TypeFloat, Computed: true, }, "cu_i": { Type: schema.TypeFloat, Computed: true, }, "cu_m": { Type: schema.TypeFloat, Computed: true, }, "cu_np": { Type: schema.TypeFloat, Computed: true, }, "gpu_units": { Type: schema.TypeFloat, Computed: true, }, }, }, }, "resource_types": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "send_access_emails": { Type: schema.TypeBool, Computed: true, }, "status": { Type: schema.TypeString, Computed: true, }, "uniq_pools": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "updated_time": { Type: schema.TypeInt, Computed: true, }, "version": { Type: schema.TypeInt, Computed: true, }, "vins": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeInt, }, }, } } func dataSourceAccountAvailableTemplatesListSchemaMake() map[string]*schema.Schema { res := map[string]*schema.Schema{ "account_id": { Type: schema.TypeInt, Required: true, }, "items": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeInt, }, }, } return res }