You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2883 lines
61 KiB
2883 lines
61 KiB
package disks
|
|
|
|
import (
|
|
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
|
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
|
|
)
|
|
|
|
func dataSourceDiskSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"disk_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"acl": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"boot_partition": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"computes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"compute_name": {
|
|
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,
|
|
},
|
|
"devicename": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"disk_path": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"image_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"images": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"iotune": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"read_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"size_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"iqn": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"login": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"disk_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"order": {
|
|
Type: schema.TypeInt,
|
|
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.TypeList,
|
|
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,
|
|
},
|
|
"sep_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"shareable": {
|
|
Type: schema.TypeBool,
|
|
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,
|
|
},
|
|
"reference_id": {
|
|
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,
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"vmid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
|
|
return rets
|
|
}
|
|
|
|
func dataSourceDiskListSchemaMake() 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_name": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "Find by account name",
|
|
},
|
|
"disk_max_size": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Find by max disk size",
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "Find by status",
|
|
},
|
|
"shared": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Description: "Find by shared field",
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "ID of the account the disks belong to",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "type of the disks",
|
|
},
|
|
"sep_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Find by sep id",
|
|
},
|
|
"pool": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "Find by pool name",
|
|
},
|
|
"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,
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"acl": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"boot_partition": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"computes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"compute_name": {
|
|
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,
|
|
},
|
|
"devicename": {
|
|
Type: schema.TypeString,
|
|
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,
|
|
},
|
|
},
|
|
"iotune": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"read_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"size_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"iqn": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"login": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"machine_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"machine_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"disk_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"order": {
|
|
Type: schema.TypeInt,
|
|
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.TypeList,
|
|
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,
|
|
},
|
|
"sep_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"shareable": {
|
|
Type: schema.TypeBool,
|
|
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,
|
|
},
|
|
"reference_id": {
|
|
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,
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"vmid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
return res
|
|
}
|
|
|
|
func dataSourceDiskListDeletedSchemaMake() 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_name": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "Find by account name",
|
|
},
|
|
"disk_max_size": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Find by max disk size",
|
|
},
|
|
"shared": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Description: "Find by shared field",
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "ID of the account the disks belong to",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "type of the disks",
|
|
},
|
|
"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,
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"acl": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"boot_partition": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"computes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"compute_name": {
|
|
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,
|
|
},
|
|
"devicename": {
|
|
Type: schema.TypeString,
|
|
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,
|
|
},
|
|
},
|
|
"iotune": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"read_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"size_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"iqn": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"login": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"machine_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"machine_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"disk_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"order": {
|
|
Type: schema.TypeInt,
|
|
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.TypeList,
|
|
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,
|
|
},
|
|
"sep_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"shareable": {
|
|
Type: schema.TypeBool,
|
|
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,
|
|
},
|
|
"reference_id": {
|
|
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,
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"vmid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
return res
|
|
}
|
|
|
|
func dataSourceDiskListTypesSchemaMake() map[string]*schema.Schema {
|
|
res := map[string]*schema.Schema{
|
|
"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.Schema{
|
|
Type: schema.TypeString,
|
|
},
|
|
Description: "The types of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'",
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
return res
|
|
}
|
|
|
|
func dataSourceDiskListTypesDetailedSchemaMake() map[string]*schema.Schema {
|
|
return map[string]*schema.Schema{
|
|
"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{
|
|
"pools": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Pool name",
|
|
},
|
|
"system": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"types": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeString,
|
|
},
|
|
Description: "The types of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"sep_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Storage endpoint provider ID to create disk",
|
|
},
|
|
"sep_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
}
|
|
|
|
func dataSourceDiskListUnattachedSchemaMake() map[string]*schema.Schema {
|
|
res := map[string]*schema.Schema{
|
|
"by_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Find by ID",
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "Find by account name",
|
|
},
|
|
"disk_max_size": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Find by max disk size",
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "Find by status",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "type of the disks",
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "ID of the account the disks belong to",
|
|
},
|
|
"sep_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "ID of SEP",
|
|
},
|
|
"pool": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
},
|
|
"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,
|
|
Description: "CKey",
|
|
},
|
|
"_meta": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeString,
|
|
},
|
|
Description: "Meta parameters",
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "ID of the account the disks belong to",
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "The name of the subscriber '(account') to whom this disk belongs",
|
|
},
|
|
"acl": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"boot_partition": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Number of disk partitions",
|
|
},
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Created time",
|
|
},
|
|
"deleted_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Deleted time",
|
|
},
|
|
"desc": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Description of disk",
|
|
},
|
|
"destruction_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Time of final deletion",
|
|
},
|
|
"disk_path": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Disk path",
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "ID of the grid (platform)",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Disk ID on the storage side",
|
|
},
|
|
"disk_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "The unique ID of the subscriber-owner of the disk",
|
|
},
|
|
"image_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Image ID",
|
|
},
|
|
"images": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
Description: "IDs of images using the disk",
|
|
},
|
|
"iotune": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"read_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Number of bytes to read per second",
|
|
},
|
|
"read_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Maximum number of bytes to read",
|
|
},
|
|
"read_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Number of io read operations per second",
|
|
},
|
|
"read_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Maximum number of io read operations",
|
|
},
|
|
"size_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Size of io operations",
|
|
},
|
|
"total_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Total size bytes per second",
|
|
},
|
|
"total_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Maximum total size of bytes per second",
|
|
},
|
|
"total_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Total number of io operations per second",
|
|
},
|
|
"total_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Maximum total number of io operations per second",
|
|
},
|
|
"write_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Number of bytes to write per second",
|
|
},
|
|
"write_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Maximum number of bytes to write per second",
|
|
},
|
|
"write_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Number of write operations per second",
|
|
},
|
|
"write_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Maximum number of write operations per second",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"iqn": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Disk IQN",
|
|
},
|
|
"login": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Login to access the disk",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Milestones",
|
|
},
|
|
"disk_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Name of disk",
|
|
},
|
|
"order": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Disk order",
|
|
},
|
|
"params": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Disk params",
|
|
},
|
|
"parent_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "ID of the parent disk",
|
|
},
|
|
"passwd": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Password to access the disk",
|
|
},
|
|
"pci_slot": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "ID of the pci slot to which the disk is connected",
|
|
},
|
|
"pool": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Pool for disk location",
|
|
},
|
|
"present_to": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"purge_attempts": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Number of deletion attempts",
|
|
},
|
|
"purge_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Time of the last deletion attempt",
|
|
},
|
|
"reality_device_number": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Reality device number",
|
|
},
|
|
"reference_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ID of the reference to the disk",
|
|
},
|
|
"res_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Resource ID",
|
|
},
|
|
"res_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Name of the resource",
|
|
},
|
|
"role": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Disk role",
|
|
},
|
|
"sep_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Storage endpoint provider ID to create disk",
|
|
},
|
|
"shareable": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
},
|
|
"size_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Size in GB",
|
|
},
|
|
"size_used": {
|
|
Type: schema.TypeFloat,
|
|
Computed: true,
|
|
Description: "Number of used space, in GB",
|
|
},
|
|
"snapshots": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ID of the snapshot",
|
|
},
|
|
"label": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Name of the snapshot",
|
|
},
|
|
"reference_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"res_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Reference to the snapshot",
|
|
},
|
|
"snap_set_guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "The set snapshot ID",
|
|
},
|
|
"snap_set_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "The set time of the snapshot",
|
|
},
|
|
"timestamp": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Snapshot time",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Disk status",
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Technical status of the disk",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "The type of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'",
|
|
},
|
|
"vmid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Virtual Machine ID (Deprecated)",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
return res
|
|
}
|
|
|
|
func dataSourceDiskSnapshotListSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"disk_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "The unique ID of the subscriber-owner of the disk",
|
|
},
|
|
"items": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ID of the snapshot",
|
|
},
|
|
"label": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Name of the snapshot",
|
|
},
|
|
"reference_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"res_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Reference to the snapshot",
|
|
},
|
|
"snap_set_guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "The set snapshot ID",
|
|
},
|
|
"snap_set_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "The set time of the snapshot",
|
|
},
|
|
"timestamp": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Snapshot time",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
return rets
|
|
}
|
|
|
|
func dataSourceDiskSnapshotSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"disk_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "The unique ID of the subscriber-owner of the disk",
|
|
},
|
|
"label": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
Description: "Name of the snapshot",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ID of the snapshot",
|
|
},
|
|
"reference_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"res_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Reference to the snapshot",
|
|
},
|
|
"snap_set_guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "The set snapshot ID",
|
|
},
|
|
"snap_set_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "The set time of the snapshot",
|
|
},
|
|
"timestamp": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Snapshot time",
|
|
},
|
|
}
|
|
return rets
|
|
}
|
|
|
|
func resourceDiskSnapshotSchemaMake() map[string]*schema.Schema {
|
|
return map[string]*schema.Schema{
|
|
"disk_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
//ForceNew: true,
|
|
Description: "The unique ID of the subscriber-owner of the disk",
|
|
},
|
|
"label": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
//ForceNew: true,
|
|
Description: "Name of the snapshot",
|
|
},
|
|
"rollback": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "Needed in order to make a snapshot rollback",
|
|
},
|
|
"timestamp": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Computed: true,
|
|
Description: "Snapshot time",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ID of the snapshot",
|
|
},
|
|
"reference_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"res_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Reference to the snapshot",
|
|
},
|
|
"snap_set_guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "The set snapshot ID",
|
|
},
|
|
"snap_set_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "The set time of the snapshot",
|
|
},
|
|
}
|
|
}
|
|
|
|
func resourceDiskSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
//ForceNew: true,
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
//ForceNew: true,
|
|
},
|
|
"disk_name": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
ValidateFunc: validation.StringInSlice([]string{"D", "B", "T"}, false),
|
|
Description: "The type of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'",
|
|
},
|
|
|
|
"desc": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Computed: true,
|
|
},
|
|
"size_max": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
},
|
|
"ssd_size": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
},
|
|
"iops": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "max IOPS disk can perform",
|
|
},
|
|
"sep_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Computed: true,
|
|
},
|
|
"pool": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Computed: true,
|
|
},
|
|
"node_ids": {
|
|
Type: schema.TypeSet,
|
|
Optional: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"detach": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "detach disk from machine first",
|
|
},
|
|
"permanently": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "whether to completely delete the disk, works only with non attached disks",
|
|
},
|
|
"shareable": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Computed: true,
|
|
},
|
|
"restore": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "restore deleting disk",
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"acl": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"boot_partition": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"computes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"compute_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"deleted_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"destruction_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"devicename": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"disk_path": {
|
|
Type: schema.TypeString,
|
|
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.TypeString,
|
|
},
|
|
},
|
|
"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,
|
|
},
|
|
|
|
"order": {
|
|
Type: schema.TypeInt,
|
|
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,
|
|
},
|
|
"present_to": {
|
|
Type: schema.TypeList,
|
|
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_type": {
|
|
Type: schema.TypeString,
|
|
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,
|
|
},
|
|
"reference_id": {
|
|
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,
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"vmid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
|
|
return rets
|
|
}
|
|
|
|
func dataSourceDiskReplicationSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"disk_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Id of primary disk",
|
|
},
|
|
"replica_disk_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Id of secondary disk",
|
|
},
|
|
"status_replication": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Status of replication",
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"acl": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"boot_partition": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"computes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"compute_name": {
|
|
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,
|
|
},
|
|
"devicename": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"disk_path": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"image_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"images": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"iotune": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"read_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"size_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"iqn": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"login": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"disk_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"order": {
|
|
Type: schema.TypeInt,
|
|
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.TypeList,
|
|
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,
|
|
},
|
|
"sep_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"shareable": {
|
|
Type: schema.TypeBool,
|
|
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,
|
|
},
|
|
"reference_id": {
|
|
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,
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"vmid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
|
|
return rets
|
|
}
|
|
|
|
func resourceDiskReplicationSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"disk_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Id of primary disk",
|
|
},
|
|
"disk_name": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
Description: "Name of disk replica",
|
|
},
|
|
"sep_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Storage endpoint provider ID to create disk replica",
|
|
},
|
|
"pool_name": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
Description: "Pool for disk location",
|
|
},
|
|
"pause": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Description: "Resume replication",
|
|
},
|
|
"reverse": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "Reverse replication",
|
|
},
|
|
"start": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: true,
|
|
Description: "Start/Stop replication",
|
|
},
|
|
"detach": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "Detach disk from machine first",
|
|
},
|
|
"permanently": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "Delete disk permanently",
|
|
},
|
|
|
|
"replica_disk_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Id of replica disk",
|
|
},
|
|
"status_replication": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "Status of replication",
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"acl": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"boot_partition": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"computes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_id": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"compute_name": {
|
|
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,
|
|
},
|
|
"devicename": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"disk_path": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"image_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"images": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"iotune": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"read_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"read_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"size_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"total_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_bytes_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_bytes_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_iops_sec": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"write_iops_sec_max": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"iqn": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"login": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"order": {
|
|
Type: schema.TypeInt,
|
|
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,
|
|
},
|
|
"present_to": {
|
|
Type: schema.TypeList,
|
|
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_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"shareable": {
|
|
Type: schema.TypeBool,
|
|
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,
|
|
},
|
|
"reference_id": {
|
|
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,
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"vmid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
|
|
return rets
|
|
}
|