1.0.0
This commit is contained in:
@@ -0,0 +1,670 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceCompute() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"acl": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"account_acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"compute_acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"rg_acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"account_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"account_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"affinity_label": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"affinity_rules": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"key": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mode": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"policy": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"topology": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"value": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"affinity_weight": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"anti_affinity_rules": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"key": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mode": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"policy": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"topology": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"value": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"arch": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"boot_order": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.StringType,
|
||||
},
|
||||
"bootdisk_size": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"cd_image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"clone_reference": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"clones": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"computeci_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"cpu_pin": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"cpus": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"custom_fields": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"desc": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"devices": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"disks": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"ckey": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"acl": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"account_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"boot_partition": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"desc": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"destruction_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"disk_path": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"gid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"disk_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"images": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"iotune": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"read_bytes_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"read_bytes_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"read_iops_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"read_iops_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"size_iops_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_bytes_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_bytes_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_iops_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_iops_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"write_bytes_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"write_bytes_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"write_iops_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"write_iops_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"iqn": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"login": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"milestones": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"order": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"params": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"parent_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"passwd": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pool": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"present_to": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"purge_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"replication": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"disk_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pool_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"role": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"self_volume_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"storage_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"volume_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"reality_device_number": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reference_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"res_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"role": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"sep_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"shareable": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"size_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"size_used": schema.Float64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"snapshots": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"label": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reference_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"res_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"snap_set_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"snap_set_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"timestamp": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"tech_status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vmid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"driver": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"gid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"hp_backed": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"image_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"interfaces": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"conn_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"conn_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"def_gw": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"enabled": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"flip_group_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"ip_address": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"listen_ssh": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mac": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"net_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"netmask": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"net_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"node_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"qos": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"e_rate": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"in_burst": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"in_rate": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"target": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vnfs": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"lock_status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"manager_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"manager_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"migrationjob": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"milestones": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"need_reboot": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"numa_affinity": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"numa_node_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"natable_vins_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"natable_vins_ip": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"natable_vins_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"natable_vins_network": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"natable_vins_network_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"os_users": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"login": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"password": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"public_key": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"pinned": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"ram": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reference_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"registered": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"res_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reserved_node_cpus": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"rg_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"rg_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"snap_sets": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"disks": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"label": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"timestamp": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"stateless_sep_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"stateless_sep_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"tags": schema.MapAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.StringType,
|
||||
},
|
||||
"tech_status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"updated_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"updated_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_data": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_managed": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vgpus": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"virtual_image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"virtual_image_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputeAudits() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"items": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"call": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"responsetime": schema.Float64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"statuscode": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"timestamp": schema.Float64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputeGetAudits() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"items": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"epoch": schema.Float64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"message": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputeGetConsoleUrl() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"console_url": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputeGetLog() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
"path": schema.StringAttribute{
|
||||
Required: true,
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"log": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,443 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputeList() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// optional attributes
|
||||
"by_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Find by ID",
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by name",
|
||||
},
|
||||
"account_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Find by AccountID",
|
||||
},
|
||||
"rg_name": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by resgroup name",
|
||||
},
|
||||
"rg_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Find by RGID",
|
||||
},
|
||||
"tech_status": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by tech status",
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by status",
|
||||
},
|
||||
"ip_address": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by IP address",
|
||||
},
|
||||
"extnet_name": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by Extnet name",
|
||||
},
|
||||
"extnet_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Find by Extnet ID",
|
||||
},
|
||||
"includedeleted": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
Description: "Include deleted computes. If using field 'status', then includedeleted will be ignored",
|
||||
},
|
||||
"sort_by": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "sort by one of supported fields, format +|-(field)",
|
||||
},
|
||||
"page": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Page number",
|
||||
},
|
||||
"size": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Page size",
|
||||
},
|
||||
"ignore_k8s": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
Description: "If set to true, ignores any VMs associated with any k8s cluster",
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"items": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"account_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"account_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"affinity_label": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"affinity_rules": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"key": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mode": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"policy": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"topology": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"value": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"affinity_weight": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"anti_affinity_rules": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"key": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mode": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"policy": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"topology": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"value": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"arch": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"boot_order": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.StringType,
|
||||
},
|
||||
"bootdisk_size": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"cd_image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"clone_reference": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"clones": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"computeci_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"cpu_pin": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"cpus": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"custom_fields": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"desc": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"devices": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"disks": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"disk_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"driver": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"gid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"hp_backed": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"interfaces": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"conn_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"conn_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"def_gw": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"enabled": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"flip_group_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"ip_address": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"listen_ssh": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mac": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"net_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"netmask": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"net_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"node_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"qos": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"e_rate": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"in_burst": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"in_rate": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"target": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vnfs": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"lock_status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"manager_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"manager_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"migrationjob": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"milestones": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"need_reboot": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"numa_affinity": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"numa_node_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pinned": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"ram": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reference_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"registered": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"res_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reserved_node_cpus": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"rg_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"rg_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"snap_sets": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"disks": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"label": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"timestamp": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"stateless_sep_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"stateless_sep_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"tags": schema.MapAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.StringType,
|
||||
},
|
||||
"tech_status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_disks_size": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"updated_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"updated_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_managed": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vgpus": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"vins_connected": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"virtual_image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"entry_count": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,435 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputeListDeleted() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// optional attributes
|
||||
"by_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Find by ID",
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by name",
|
||||
},
|
||||
"account_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Find by AccountID",
|
||||
},
|
||||
"rg_name": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by resgroup name",
|
||||
},
|
||||
"rg_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Find by RGID",
|
||||
},
|
||||
"tech_status": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by tech status",
|
||||
},
|
||||
"ip_address": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by IP address",
|
||||
},
|
||||
"extnet_name": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Find by Extnet name",
|
||||
},
|
||||
"extnet_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Find by Extnet ID",
|
||||
},
|
||||
"sort_by": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "sort by one of supported fields, format +|-(field)",
|
||||
},
|
||||
"page": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Page number",
|
||||
},
|
||||
"size": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "Page size",
|
||||
},
|
||||
"ignore_k8s": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
Description: "If set to true, ignores any VMs associated with any k8s cluster",
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"items": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"account_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"account_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"affinity_label": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"affinity_rules": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"key": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mode": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"policy": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"topology": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"value": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"affinity_weight": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"anti_affinity_rules": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"key": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mode": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"policy": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"topology": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"value": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"arch": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"boot_order": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.StringType,
|
||||
},
|
||||
"bootdisk_size": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"cd_image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"clone_reference": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"clones": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"computeci_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"cpu_pin": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"cpus": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"custom_fields": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"desc": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"devices": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"disks": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"disk_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"driver": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"gid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"hp_backed": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"interfaces": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"conn_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"conn_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"def_gw": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"enabled": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"flip_group_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"ip_address": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"listen_ssh": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mac": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"net_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"netmask": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"net_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"node_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"qos": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"e_rate": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"in_burst": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"in_rate": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"target": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vnfs": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"lock_status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"manager_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"manager_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"migrationjob": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"milestones": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"need_reboot": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"numa_affinity": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"numa_node_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pinned": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"ram": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reference_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"registered": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"res_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reserved_node_cpus": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"rg_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"rg_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"snap_sets": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"disks": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"label": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"timestamp": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"stateless_sep_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"stateless_sep_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"tags": schema.MapAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.StringType,
|
||||
},
|
||||
"tech_status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_disks_size": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"updated_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"updated_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_managed": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vgpus": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"vins_connected": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"virtual_image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"entry_count": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputePciDeviceList() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
// optional attributes
|
||||
"rg_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
},
|
||||
"device_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Optional: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Optional: true,
|
||||
},
|
||||
"sort_by": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "sort by one of supported fields, format +|-(field)",
|
||||
},
|
||||
"page": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
},
|
||||
"size": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"items": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"description": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"hwpath": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"device_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"rg_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"stack_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"system_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"entry_count": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputePFWList() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"items": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"pfw_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"local_ip": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"local_port": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"protocol": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"public_port_end": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"public_port_start": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vm_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"entry_count": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputeSnapshotUsage() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
// optional attributes
|
||||
"label": schema.StringAttribute{
|
||||
Optional: true,
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"items": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"count": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"stored": schema.Float64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"label": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"timestamp": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputeUserList() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"items": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"account_acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"compute_acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"rg_acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"entry_count": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
|
||||
)
|
||||
|
||||
func MakeSchemaDataSourceComputeVGPUList() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
// optional attributes
|
||||
"gpu_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Optional: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Optional: true,
|
||||
},
|
||||
"includedeleted": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
},
|
||||
"sort_by": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "sort by one of supported fields, format +|-(field)",
|
||||
},
|
||||
"page": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
},
|
||||
"size": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"items": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"account_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"gid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vgpu_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"last_claimed_by": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"last_update_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mode": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pgpuid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"profile_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"ram": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reference_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"rg_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vm_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"entry_count": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,952 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-validators/int64validator"
|
||||
"github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
|
||||
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
|
||||
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
|
||||
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
|
||||
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
|
||||
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
"repository.basistech.ru/BASIS/terraform-provider-dynamix/internal/constants"
|
||||
"repository.basistech.ru/BASIS/terraform-provider-dynamix/internal/validate"
|
||||
)
|
||||
|
||||
func MakeSchemaResourceCompute() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
// required attributes
|
||||
"name": schema.StringAttribute{
|
||||
Required: true,
|
||||
Description: "Name of this compute. Compute names are case sensitive and must be unique in the resource group.",
|
||||
},
|
||||
"rg_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
Validators: []validator.Int64{
|
||||
int64validator.AtLeast(1),
|
||||
},
|
||||
Description: "ID of the resource group where this compute should be deployed.",
|
||||
},
|
||||
"driver": schema.StringAttribute{
|
||||
Required: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("SVA_KVM_X86", "KVM_X86", "KVM_PPC"),
|
||||
},
|
||||
Description: "Hardware architecture of this compute instance.",
|
||||
},
|
||||
"cpu": schema.Int64Attribute{
|
||||
Required: true,
|
||||
Validators: []validator.Int64{
|
||||
int64validator.Between(1, constants.MaxCpusPerCompute),
|
||||
},
|
||||
Description: "Number of CPUs to allocate to this compute instance.",
|
||||
},
|
||||
"ram": schema.Int64Attribute{
|
||||
Required: true,
|
||||
Validators: []validator.Int64{
|
||||
validate.DivisibleBy(constants.DivisibleByRAM),
|
||||
},
|
||||
Description: "Amount of RAM in MB to allocate to this compute instance.",
|
||||
},
|
||||
|
||||
// optional attributes
|
||||
"image_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Description: "ID of the OS image to base this compute instance on.",
|
||||
},
|
||||
"without_boot_disk": schema.BoolAttribute{ //default false
|
||||
Optional: true,
|
||||
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_size": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "This compute instance boot disk size in GB. Make sure it is large enough to accomodate selected OS image.",
|
||||
},
|
||||
"affinity_label": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "Set affinity label for compute",
|
||||
},
|
||||
"affinity_rules": schema.SetNestedAttribute{
|
||||
Optional: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"topology": schema.StringAttribute{
|
||||
Required: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("node", "compute"),
|
||||
},
|
||||
Description: "compute or node, for whom rule applies",
|
||||
},
|
||||
"policy": schema.StringAttribute{
|
||||
Required: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("RECOMMENDED", "REQUIRED"),
|
||||
},
|
||||
Description: "RECOMMENDED or REQUIRED, the degree of 'strictness' of this rule",
|
||||
},
|
||||
"mode": schema.StringAttribute{
|
||||
Required: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("EQ", "NE", "ANY"),
|
||||
},
|
||||
Description: "EQ or NE or ANY - the comparison mode is 'value', recorded by the specified 'key'",
|
||||
},
|
||||
"key": schema.StringAttribute{
|
||||
Required: true,
|
||||
Description: "key that are taken into account when analyzing this rule will be identified",
|
||||
},
|
||||
"value": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "value that must match the key to be taken into account when analyzing this rule",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"anti_affinity_rules": schema.SetNestedAttribute{
|
||||
Optional: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"topology": schema.StringAttribute{
|
||||
Required: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("node", "compute"),
|
||||
},
|
||||
Description: "compute or node, for whom rule applies",
|
||||
},
|
||||
"policy": schema.StringAttribute{
|
||||
Required: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("RECOMMENDED", "REQUIRED"),
|
||||
},
|
||||
Description: "RECOMMENDED or REQUIRED, the degree of 'strictness' of this rule",
|
||||
},
|
||||
"mode": schema.StringAttribute{
|
||||
Required: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("EQ", "NE", "ANY"),
|
||||
},
|
||||
Description: "EQ or NE or ANY - the comparison mode is 'value', recorded by the specified 'key'",
|
||||
},
|
||||
"key": schema.StringAttribute{
|
||||
Required: true,
|
||||
Description: "key that are taken into account when analyzing this rule will be identified",
|
||||
},
|
||||
"value": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "value that must match the key to be taken into account when analyzing this rule",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"custom_fields": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "custom fields for Compute. Must be dict",
|
||||
},
|
||||
"stateless": schema.BoolAttribute{ //default false
|
||||
Optional: true,
|
||||
Description: "Compute will be stateless (SVA_KVM_X86) if set to True",
|
||||
},
|
||||
"sep_id": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "ID of SEP to create bootDisk on. Uses image's sepId if not set.",
|
||||
},
|
||||
"pool": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "Pool to use if sepId is set, can be also empty if needed to be chosen by system.",
|
||||
},
|
||||
"extra_disks": schema.SetAttribute{
|
||||
Optional: true,
|
||||
//Computed: true,
|
||||
Validators: []validator.Set{
|
||||
setvalidator.SizeAtMost(constants.MaxExtraDisksPerCompute),
|
||||
},
|
||||
ElementType: types.Int64Type,
|
||||
Description: "Optional list of IDs of extra disks to attach to this compute. You may specify several extra disks.",
|
||||
},
|
||||
"network": schema.SetNestedAttribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Validators: []validator.Set{
|
||||
setvalidator.SizeBetween(1, constants.MaxNetworksPerCompute),
|
||||
},
|
||||
Description: "Optional network connection(s) for this compute. You may specify several network blocks, one for each connection.",
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"net_type": schema.StringAttribute{
|
||||
Required: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("EXTNET", "VINS", "VFNIC"),
|
||||
},
|
||||
Description: "Type of the network for this connection, either EXTNET or VINS.",
|
||||
},
|
||||
"net_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
Description: "ID of the network for this connection.",
|
||||
},
|
||||
"ip_address": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "Optional IP address to assign to this connection. This IP should belong to the selected network and free for use.",
|
||||
},
|
||||
"mac": schema.StringAttribute{
|
||||
Computed: true,
|
||||
Description: "MAC address associated with this connection. MAC address is assigned automatically.",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"tags": schema.SetNestedAttribute{
|
||||
Optional: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"key": schema.StringAttribute{
|
||||
Required: true,
|
||||
},
|
||||
"value": schema.StringAttribute{
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"port_forwarding": schema.SetNestedAttribute{
|
||||
Optional: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"public_port_start": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
"public_port_end": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
//Default: -1,
|
||||
},
|
||||
"local_port": schema.Int64Attribute{
|
||||
Optional: true,
|
||||
},
|
||||
"proto": schema.StringAttribute{
|
||||
Required: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("tcp", "udp"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"user_access": schema.SetNestedAttribute{
|
||||
Optional: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"username": schema.StringAttribute{
|
||||
Required: true,
|
||||
},
|
||||
"access_type": schema.StringAttribute{
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"snapshot": schema.SetNestedAttribute{
|
||||
Optional: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"label": schema.StringAttribute{
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"rollback": schema.SingleNestedAttribute{
|
||||
Optional: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"label": schema.StringAttribute{
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"cd": schema.SingleNestedAttribute{
|
||||
Optional: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"cdrom_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"pin_to_stack": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
},
|
||||
"description": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "Optional text description of this compute instance.",
|
||||
},
|
||||
"cloud_init": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "Optional cloud_init parameters. Applied when creating new compute instance only, ignored in all other cases.",
|
||||
},
|
||||
"enabled": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
Description: "If true - enable compute, else - disable",
|
||||
},
|
||||
"pause": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
//Default: false,
|
||||
},
|
||||
"reset": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
//Default: false,
|
||||
},
|
||||
"restore": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
//Default: true,
|
||||
},
|
||||
"auto_start": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
//Default: false,
|
||||
Description: "Flag for redeploy compute",
|
||||
},
|
||||
"force_stop": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
//Default: false,
|
||||
Description: "Flag for redeploy compute",
|
||||
},
|
||||
"force_resize": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
//Default: false,
|
||||
Description: "Flag for resize compute",
|
||||
},
|
||||
"data_disks": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("KEEP", "DETACH", "DESTROY"),
|
||||
},
|
||||
//Default: "DETACH",
|
||||
Description: "Flag for redeploy compute",
|
||||
},
|
||||
"started": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
//Default: true,
|
||||
Description: "Is compute started.",
|
||||
},
|
||||
"detach_disks": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
//Default: true,
|
||||
},
|
||||
"permanently": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
//Default: true,
|
||||
},
|
||||
"is": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "system name",
|
||||
},
|
||||
"ipa_type": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: "compute purpose",
|
||||
},
|
||||
"numa_affinity": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.OneOf("none", "strict", "loose"),
|
||||
},
|
||||
//Default: "none",
|
||||
Description: "Rule for VM placement with NUMA affinity.",
|
||||
},
|
||||
"cpu_pin": schema.BoolAttribute{
|
||||
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": schema.BoolAttribute{
|
||||
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.",
|
||||
},
|
||||
|
||||
// computed attributes
|
||||
"compute_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"boot_disk": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: MakeSchemaResourceComputeDisks(),
|
||||
},
|
||||
// computed attributes
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
PlanModifiers: []planmodifier.String{
|
||||
stringplanmodifier.UseStateForUnknown(),
|
||||
},
|
||||
},
|
||||
"account_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"account_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"acl": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"account_acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"compute_acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"rg_acl": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"explicit": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"right": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_group_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
"affinity_weight": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"arch": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"boot_order": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.StringType,
|
||||
},
|
||||
"boot_disk_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"cd_image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"clone_reference": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"clones": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"computeci_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"devices": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"disks": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: MakeSchemaResourceComputeDisks(),
|
||||
},
|
||||
},
|
||||
"gid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"image_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"interfaces": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"conn_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"conn_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"get_gw": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"enabled": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"flip_group_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"ip_address": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"listen_ssh": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"mac": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"net_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"netmask": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"net_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"node_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"qos": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"e_rate": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"in_burst": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"in_rate": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"target": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vnfs": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"lock_status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"manager_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"manager_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"migrationjob": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"milestones": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"need_reboot": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"numa_node_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"natable_vins_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"natable_vins_ip": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"natable_vins_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"natable_vins_network": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"natable_vins_network_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"os_users": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"login": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"password": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"public_key": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"pinned": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"reference_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"registered": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"res_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reserved_node_cpus": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"rg_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"snap_sets": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"disks": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"label": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"timestamp": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"stateless_sep_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"stateless_sep_type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"tech_status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"updated_by": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"updated_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_data": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"user_managed": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vgpus": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"virtual_image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"virtual_image_name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func MakeSchemaResourceComputeDisks() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
"ckey": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"acl": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"account_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"boot_partition": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"created_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"deleted_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"desc": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"destruction_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"disk_path": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"gid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"disk_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"images": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.StringType,
|
||||
},
|
||||
"iotune": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"read_bytes_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"read_bytes_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"read_iops_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"read_iops_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"size_iops_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_bytes_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_bytes_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_iops_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"total_iops_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"write_bytes_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"write_bytes_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"write_iops_sec": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"write_iops_sec_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"iqn": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"login": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"milestones": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"name": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"order": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"params": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"parent_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"passwd": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pci_slot": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pool": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"present_to": schema.ListAttribute{
|
||||
Computed: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"purge_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"replication": schema.SingleNestedAttribute{
|
||||
Computed: true,
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"disk_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"pool_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"role": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"self_volume_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"storage_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"volume_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"reality_device_number": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reference_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"res_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"role": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"sep_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"shareable": schema.BoolAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"size_max": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"size_used": schema.Float64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"snapshots": schema.ListNestedAttribute{
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"label": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"reference_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"res_id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"snap_set_guid": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"snap_set_time": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"timestamp": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"tech_status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"type": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"vmid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user