1.0.0
This commit is contained in:
@@ -0,0 +1,227 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type RecordComputeModel struct {
|
||||
// request fields
|
||||
ComputeId types.Int64 `tfsdk:"compute_id"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
ACL *RecordACLModel `tfsdk:"acl"`
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
AccountName types.String `tfsdk:"account_name"`
|
||||
AffinityLabel types.String `tfsdk:"affinity_label"`
|
||||
AffinityRules []ItemRuleModel `tfsdk:"affinity_rules"`
|
||||
AffinityWeight types.Int64 `tfsdk:"affinity_weight"`
|
||||
AntiAffinityRules []ItemRuleModel `tfsdk:"anti_affinity_rules"`
|
||||
Architecture types.String `tfsdk:"arch"`
|
||||
BootOrder types.List `tfsdk:"boot_order"`
|
||||
BootDiskSize types.Int64 `tfsdk:"bootdisk_size"`
|
||||
CdImageId types.Int64 `tfsdk:"cd_image_id"`
|
||||
CloneReference types.Int64 `tfsdk:"clone_reference"`
|
||||
Clones types.List `tfsdk:"clones"`
|
||||
ComputeCIID types.Int64 `tfsdk:"computeci_id"`
|
||||
CPU types.Int64 `tfsdk:"cpus"`
|
||||
CPUPin types.Bool `tfsdk:"cpu_pin"`
|
||||
CreatedBy types.String `tfsdk:"created_by"`
|
||||
CreatedTime types.Int64 `tfsdk:"created_time"`
|
||||
CustomFields types.String `tfsdk:"custom_fields"`
|
||||
DeletedBy types.String `tfsdk:"deleted_by"`
|
||||
DeletedTime types.Int64 `tfsdk:"deleted_time"`
|
||||
Description types.String `tfsdk:"desc"`
|
||||
Devices types.String `tfsdk:"devices"`
|
||||
Disks []ItemDiskModel `tfsdk:"disks"`
|
||||
Driver types.String `tfsdk:"driver"`
|
||||
GID types.Int64 `tfsdk:"gid"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
HPBacked types.Bool `tfsdk:"hp_backed"`
|
||||
ImageID types.Int64 `tfsdk:"image_id"`
|
||||
ImageName types.String `tfsdk:"image_name"`
|
||||
Interfaces []ItemInterfaceModel `tfsdk:"interfaces"`
|
||||
LockStatus types.String `tfsdk:"lock_status"`
|
||||
ManagerID types.Int64 `tfsdk:"manager_id"`
|
||||
ManagerType types.String `tfsdk:"manager_type"`
|
||||
MigrationJob types.Int64 `tfsdk:"migrationjob"`
|
||||
Milestones types.Int64 `tfsdk:"milestones"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
NatableVINSID types.Int64 `tfsdk:"natable_vins_id"`
|
||||
NatableVINSIP types.String `tfsdk:"natable_vins_ip"`
|
||||
NatableVINSName types.String `tfsdk:"natable_vins_name"`
|
||||
NatableVINSNetwork types.String `tfsdk:"natable_vins_network"`
|
||||
NatableVINSNetworkName types.String `tfsdk:"natable_vins_network_name"`
|
||||
NeedReboot types.Bool `tfsdk:"need_reboot"`
|
||||
NumaAffinity types.String `tfsdk:"numa_affinity"`
|
||||
NumaNodeId types.Int64 `tfsdk:"numa_node_id"`
|
||||
OSUsers []ItemOSUserModel `tfsdk:"os_users"`
|
||||
Pinned types.Bool `tfsdk:"pinned"`
|
||||
RAM types.Int64 `tfsdk:"ram"`
|
||||
ReferenceID types.String `tfsdk:"reference_id"`
|
||||
Registered types.Bool `tfsdk:"registered"`
|
||||
ResName types.String `tfsdk:"res_name"`
|
||||
ReservedNodeCpus types.List `tfsdk:"reserved_node_cpus"`
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
RGName types.String `tfsdk:"rg_name"`
|
||||
SnapSets []ItemSnapSetModel `tfsdk:"snap_sets"`
|
||||
StatelessSepID types.Int64 `tfsdk:"stateless_sep_id"`
|
||||
StatelessSepType types.String `tfsdk:"stateless_sep_type"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Tags types.Map `tfsdk:"tags"`
|
||||
TechStatus types.String `tfsdk:"tech_status"`
|
||||
UpdatedBy types.String `tfsdk:"updated_by"`
|
||||
UpdatedTime types.Int64 `tfsdk:"updated_time"`
|
||||
UserManaged types.Bool `tfsdk:"user_managed"`
|
||||
Userdata types.String `tfsdk:"user_data"`
|
||||
VGPUs types.List `tfsdk:"vgpus"`
|
||||
VirtualImageID types.Int64 `tfsdk:"virtual_image_id"`
|
||||
VirtualImageName types.String `tfsdk:"virtual_image_name"`
|
||||
}
|
||||
|
||||
type RecordACLModel struct {
|
||||
AccountACL []ItemACLModel `tfsdk:"account_acl"`
|
||||
ComputeACL []ItemACLModel `tfsdk:"compute_acl"`
|
||||
RGACL []ItemACLModel `tfsdk:"rg_acl"`
|
||||
}
|
||||
|
||||
type ItemACLModel struct {
|
||||
Explicit types.Bool `tfsdk:"explicit"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Right types.String `tfsdk:"right"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
UserGroupID types.String `tfsdk:"user_group_id"`
|
||||
}
|
||||
|
||||
type ItemRuleModel struct {
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Key types.String `tfsdk:"key"`
|
||||
Mode types.String `tfsdk:"mode"`
|
||||
Policy types.String `tfsdk:"policy"`
|
||||
Topology types.String `tfsdk:"topology"`
|
||||
Value types.String `tfsdk:"value"`
|
||||
}
|
||||
|
||||
type ItemDiskModel struct {
|
||||
CKey types.String `tfsdk:"ckey"`
|
||||
ACL types.String `tfsdk:"acl"`
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
BootPartition types.Int64 `tfsdk:"boot_partition"`
|
||||
CreatedTime types.Int64 `tfsdk:"created_time"`
|
||||
DeletedTime types.Int64 `tfsdk:"deleted_time"`
|
||||
Description types.String `tfsdk:"desc"`
|
||||
DestructionTime types.Int64 `tfsdk:"destruction_time"`
|
||||
DiskPath types.String `tfsdk:"disk_path"`
|
||||
GID types.Int64 `tfsdk:"gid"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
ID types.Int64 `tfsdk:"disk_id"`
|
||||
ImageID types.Int64 `tfsdk:"image_id"`
|
||||
Images types.List `tfsdk:"images"`
|
||||
IOTune *IOTuneModel `tfsdk:"iotune"`
|
||||
IQN types.String `tfsdk:"iqn"`
|
||||
Login types.String `tfsdk:"login"`
|
||||
Milestones types.Int64 `tfsdk:"milestones"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
Order types.Int64 `tfsdk:"order"`
|
||||
Params types.String `tfsdk:"params"`
|
||||
ParentID types.Int64 `tfsdk:"parent_id"`
|
||||
Passwd types.String `tfsdk:"passwd"`
|
||||
PCISlot types.Int64 `tfsdk:"pci_slot"`
|
||||
Pool types.String `tfsdk:"pool"`
|
||||
PresentTo types.List `tfsdk:"present_to"`
|
||||
PurgeTime types.Int64 `tfsdk:"purge_time"`
|
||||
ReferenceID types.String `tfsdk:"reference_id"`
|
||||
RealityDeviceNumber types.Int64 `tfsdk:"reality_device_number"`
|
||||
Replication *ReplicationModel `tfsdk:"replication"`
|
||||
ResID types.String `tfsdk:"res_id"`
|
||||
Role types.String `tfsdk:"role"`
|
||||
SepID types.Int64 `tfsdk:"sep_id"`
|
||||
Shareable types.Bool `tfsdk:"shareable"`
|
||||
SizeMax types.Int64 `tfsdk:"size_max"`
|
||||
SizeUsed types.Float64 `tfsdk:"size_used"`
|
||||
Snapshots []ItemSnapshotExtendModel `tfsdk:"snapshots"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
TechStatus types.String `tfsdk:"tech_status"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VMID types.Int64 `tfsdk:"vmid"`
|
||||
}
|
||||
|
||||
type ItemInterfaceModel struct {
|
||||
ConnID types.Int64 `tfsdk:"conn_id"`
|
||||
ConnType types.String `tfsdk:"conn_type"`
|
||||
DefGW types.String `tfsdk:"def_gw"`
|
||||
Enabled types.Bool `tfsdk:"enabled"`
|
||||
FLIPGroupID types.Int64 `tfsdk:"flip_group_id"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
IPAddress types.String `tfsdk:"ip_address"`
|
||||
ListenSSH types.Bool `tfsdk:"listen_ssh"`
|
||||
MAC types.String `tfsdk:"mac"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
NetID types.Int64 `tfsdk:"net_id"`
|
||||
NetMask types.Int64 `tfsdk:"netmask"`
|
||||
NetType types.String `tfsdk:"net_type"`
|
||||
NodeID types.Int64 `tfsdk:"node_id"`
|
||||
PCISlot types.Int64 `tfsdk:"pci_slot"`
|
||||
QOS *QOSModel `tfsdk:"qos"`
|
||||
Target types.String `tfsdk:"target"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VNFs types.List `tfsdk:"vnfs"`
|
||||
}
|
||||
|
||||
type QOSModel struct {
|
||||
ERate types.Int64 `tfsdk:"e_rate"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
InBurst types.Int64 `tfsdk:"in_burst"`
|
||||
InRate types.Int64 `tfsdk:"in_rate"`
|
||||
}
|
||||
|
||||
type ItemSnapSetModel struct {
|
||||
Disks types.List `tfsdk:"disks"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Label types.String `tfsdk:"label"`
|
||||
Timestamp types.Int64 `tfsdk:"timestamp"`
|
||||
}
|
||||
|
||||
type IOTuneModel struct {
|
||||
ReadBytesSec types.Int64 `tfsdk:"read_bytes_sec"`
|
||||
ReadBytesSecMax types.Int64 `tfsdk:"read_bytes_sec_max"`
|
||||
ReadIOPSSec types.Int64 `tfsdk:"read_iops_sec"`
|
||||
ReadIOPSSecMax types.Int64 `tfsdk:"read_iops_sec_max"`
|
||||
SizeIOPSSec types.Int64 `tfsdk:"size_iops_sec"`
|
||||
TotalBytesSec types.Int64 `tfsdk:"total_bytes_sec"`
|
||||
TotalBytesSecMax types.Int64 `tfsdk:"total_bytes_sec_max"`
|
||||
TotalIOPSSec types.Int64 `tfsdk:"total_iops_sec"`
|
||||
TotalIOPSSecMax types.Int64 `tfsdk:"total_iops_sec_max"`
|
||||
WriteBytesSec types.Int64 `tfsdk:"write_bytes_sec"`
|
||||
WriteBytesSecMax types.Int64 `tfsdk:"write_bytes_sec_max"`
|
||||
WriteIOPSSec types.Int64 `tfsdk:"write_iops_sec"`
|
||||
WriteIOPSSecMax types.Int64 `tfsdk:"write_iops_sec_max"`
|
||||
}
|
||||
|
||||
type ItemSnapshotExtendModel struct {
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Label types.String `tfsdk:"label"`
|
||||
ReferenceID types.String `tfsdk:"reference_id"`
|
||||
ResID types.String `tfsdk:"res_id"`
|
||||
SnapSetGUID types.String `tfsdk:"snap_set_guid"`
|
||||
SnapSetTime types.Int64 `tfsdk:"snap_set_time"`
|
||||
TimeStamp types.Int64 `tfsdk:"timestamp"`
|
||||
}
|
||||
|
||||
type ItemOSUserModel struct {
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Login types.String `tfsdk:"login"`
|
||||
Password types.String `tfsdk:"password"`
|
||||
PubKey types.String `tfsdk:"public_key"`
|
||||
}
|
||||
|
||||
type ReplicationModel struct {
|
||||
DiskID types.Int64 `tfsdk:"disk_id"`
|
||||
PoolID types.String `tfsdk:"pool_id"`
|
||||
Role types.String `tfsdk:"role"`
|
||||
SelfVolumeID types.String `tfsdk:"self_volume_id"`
|
||||
StorageID types.String `tfsdk:"storage_id"`
|
||||
VolumeID types.String `tfsdk:"volume_id"`
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type ListAuditsModel struct {
|
||||
// request fields
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items []ItemAuditModel `tfsdk:"items"`
|
||||
}
|
||||
|
||||
type ItemAuditModel struct {
|
||||
Call types.String `tfsdk:"call"`
|
||||
ResponseTime types.Float64 `tfsdk:"responsetime"`
|
||||
StatusCode types.Int64 `tfsdk:"statuscode"`
|
||||
Timestamp types.Float64 `tfsdk:"timestamp"`
|
||||
User types.String `tfsdk:"user"`
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type GetAuditsModel struct {
|
||||
// request fields
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items []ItemShortAuditModel `tfsdk:"items"`
|
||||
}
|
||||
|
||||
type ItemShortAuditModel struct {
|
||||
Epoch types.Float64 `tfsdk:"epoch"`
|
||||
Message types.String `tfsdk:"message"`
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type GetConsoleUrlModel struct {
|
||||
// request fields
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
ConsoleURL types.String `tfsdk:"console_url"`
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type GetLogModel struct {
|
||||
// request fields
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
Path types.String `tfsdk:"path"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Log types.String `tfsdk:"log"`
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type ListComputesModel struct {
|
||||
// request fields
|
||||
ByID types.Int64 `tfsdk:"by_id"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
RGName types.String `tfsdk:"rg_name"`
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
TechStatus types.String `tfsdk:"tech_status"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
IPAddress types.String `tfsdk:"ip_address"`
|
||||
ExtNetName types.String `tfsdk:"extnet_name"`
|
||||
ExtNetID types.Int64 `tfsdk:"extnet_id"`
|
||||
IncludeDeleted types.Bool `tfsdk:"includedeleted"`
|
||||
SortBy types.String `tfsdk:"sort_by"`
|
||||
Page types.Int64 `tfsdk:"page"`
|
||||
Size types.Int64 `tfsdk:"size"`
|
||||
IgnoreK8s types.Bool `tfsdk:"ignore_k8s"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items []ItemComputeModel `tfsdk:"items"`
|
||||
EntryCount types.Int64 `tfsdk:"entry_count"`
|
||||
}
|
||||
|
||||
type ItemComputeModel struct {
|
||||
ACL []ItemACLInListModel `tfsdk:"acl"`
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
AccountName types.String `tfsdk:"account_name"`
|
||||
AffinityLabel types.String `tfsdk:"affinity_label"`
|
||||
AffinityRules []ItemRuleInListModel `tfsdk:"affinity_rules"`
|
||||
AffinityWeight types.Int64 `tfsdk:"affinity_weight"`
|
||||
AntiAffinityRules []ItemRuleInListModel `tfsdk:"anti_affinity_rules"`
|
||||
Architecture types.String `tfsdk:"arch"`
|
||||
BootOrder types.List `tfsdk:"boot_order"`
|
||||
BootDiskSize types.Int64 `tfsdk:"bootdisk_size"`
|
||||
CdImageId types.Int64 `tfsdk:"cd_image_id"`
|
||||
CloneReference types.Int64 `tfsdk:"clone_reference"`
|
||||
Clones types.List `tfsdk:"clones"`
|
||||
ComputeCIID types.Int64 `tfsdk:"computeci_id"`
|
||||
CPU types.Int64 `tfsdk:"cpus"`
|
||||
CPUPin types.Bool `tfsdk:"cpu_pin"`
|
||||
CreatedBy types.String `tfsdk:"created_by"`
|
||||
CreatedTime types.Int64 `tfsdk:"created_time"`
|
||||
CustomFields types.String `tfsdk:"custom_fields"`
|
||||
DeletedBy types.String `tfsdk:"deleted_by"`
|
||||
DeletedTime types.Int64 `tfsdk:"deleted_time"`
|
||||
Description types.String `tfsdk:"desc"`
|
||||
Devices types.String `tfsdk:"devices"`
|
||||
Disks []DiskInListModel `tfsdk:"disks"`
|
||||
Driver types.String `tfsdk:"driver"`
|
||||
GID types.Int64 `tfsdk:"gid"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
HPBacked types.Bool `tfsdk:"hp_backed"`
|
||||
ComputeId types.Int64 `tfsdk:"compute_id"`
|
||||
ImageID types.Int64 `tfsdk:"image_id"`
|
||||
Interfaces []ItemVNFInterfaceInListModel `tfsdk:"interfaces"`
|
||||
LockStatus types.String `tfsdk:"lock_status"`
|
||||
ManagerID types.Int64 `tfsdk:"manager_id"`
|
||||
ManagerType types.String `tfsdk:"manager_type"`
|
||||
MigrationJob types.Int64 `tfsdk:"migrationjob"`
|
||||
Milestones types.Int64 `tfsdk:"milestones"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
NeedReboot types.Bool `tfsdk:"need_reboot"`
|
||||
NumaAffinity types.String `tfsdk:"numa_affinity"`
|
||||
NumaNodeId types.Int64 `tfsdk:"numa_node_id"`
|
||||
Pinned types.Bool `tfsdk:"pinned"`
|
||||
RAM types.Int64 `tfsdk:"ram"`
|
||||
ReferenceID types.String `tfsdk:"reference_id"`
|
||||
Registered types.Bool `tfsdk:"registered"`
|
||||
ResName types.String `tfsdk:"res_name"`
|
||||
ReservedNodeCpus types.List `tfsdk:"reserved_node_cpus"`
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
RGName types.String `tfsdk:"rg_name"`
|
||||
SnapSets []ItemSnapSetInListModel `tfsdk:"snap_sets"`
|
||||
StatelessSepID types.Int64 `tfsdk:"stateless_sep_id"`
|
||||
StatelessSepType types.String `tfsdk:"stateless_sep_type"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Tags types.Map `tfsdk:"tags"`
|
||||
TechStatus types.String `tfsdk:"tech_status"`
|
||||
TotalDiskSize types.Int64 `tfsdk:"total_disks_size"`
|
||||
UpdatedBy types.String `tfsdk:"updated_by"`
|
||||
UpdatedTime types.Int64 `tfsdk:"updated_time"`
|
||||
UserManaged types.Bool `tfsdk:"user_managed"`
|
||||
VGPUs types.List `tfsdk:"vgpus"`
|
||||
VINSConnected types.Int64 `tfsdk:"vins_connected"`
|
||||
VirtualImageID types.Int64 `tfsdk:"virtual_image_id"`
|
||||
}
|
||||
|
||||
type ItemACLInListModel struct {
|
||||
Explicit types.Bool `tfsdk:"explicit"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Right types.String `tfsdk:"right"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
UserGroupID types.String `tfsdk:"user_group_id"`
|
||||
}
|
||||
|
||||
type ItemRuleInListModel struct {
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Key types.String `tfsdk:"key"`
|
||||
Mode types.String `tfsdk:"mode"`
|
||||
Policy types.String `tfsdk:"policy"`
|
||||
Topology types.String `tfsdk:"topology"`
|
||||
Value types.String `tfsdk:"value"`
|
||||
}
|
||||
|
||||
type DiskInListModel struct {
|
||||
DiskId types.Int64 `tfsdk:"disk_id"`
|
||||
PCISlot types.Int64 `tfsdk:"pci_slot"`
|
||||
}
|
||||
|
||||
type ItemVNFInterfaceInListModel struct {
|
||||
ConnID types.Int64 `tfsdk:"conn_id"`
|
||||
ConnType types.String `tfsdk:"conn_type"`
|
||||
DefGW types.String `tfsdk:"def_gw"`
|
||||
Enabled types.Bool `tfsdk:"enabled"`
|
||||
FLIPGroupID types.Int64 `tfsdk:"flip_group_id"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
IPAddress types.String `tfsdk:"ip_address"`
|
||||
ListenSSH types.Bool `tfsdk:"listen_ssh"`
|
||||
MAC types.String `tfsdk:"mac"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
NetID types.Int64 `tfsdk:"net_id"`
|
||||
NetMask types.Int64 `tfsdk:"netmask"`
|
||||
NetType types.String `tfsdk:"net_type"`
|
||||
NodeID types.Int64 `tfsdk:"node_id"`
|
||||
PCISlot types.Int64 `tfsdk:"pci_slot"`
|
||||
QOS *QOSInListModel `tfsdk:"qos"`
|
||||
Target types.String `tfsdk:"target"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VNFs types.List `tfsdk:"vnfs"`
|
||||
}
|
||||
|
||||
type QOSInListModel struct {
|
||||
ERate types.Int64 `tfsdk:"e_rate"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
InBurst types.Int64 `tfsdk:"in_burst"`
|
||||
InRate types.Int64 `tfsdk:"in_rate"`
|
||||
}
|
||||
|
||||
type ItemSnapSetInListModel struct {
|
||||
Disks types.List `tfsdk:"disks"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Label types.String `tfsdk:"label"`
|
||||
Timestamp types.Int64 `tfsdk:"timestamp"`
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type ListDeletedComputesModel struct {
|
||||
// request fields
|
||||
ByID types.Int64 `tfsdk:"by_id"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
RGName types.String `tfsdk:"rg_name"`
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
TechStatus types.String `tfsdk:"tech_status"`
|
||||
IPAddress types.String `tfsdk:"ip_address"`
|
||||
ExtNetName types.String `tfsdk:"extnet_name"`
|
||||
ExtNetID types.Int64 `tfsdk:"extnet_id"`
|
||||
SortBy types.String `tfsdk:"sort_by"`
|
||||
Page types.Int64 `tfsdk:"page"`
|
||||
Size types.Int64 `tfsdk:"size"`
|
||||
IgnoreK8s types.Bool `tfsdk:"ignore_k8s"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items []ItemListDeletedComputeModel `tfsdk:"items"`
|
||||
EntryCount types.Int64 `tfsdk:"entry_count"`
|
||||
}
|
||||
|
||||
type ItemListDeletedComputeModel struct {
|
||||
ACL []ItemACLInListDeletedModel `tfsdk:"acl"`
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
AccountName types.String `tfsdk:"account_name"`
|
||||
AffinityLabel types.String `tfsdk:"affinity_label"`
|
||||
AffinityRules []ItemRuleInListDeletedModel `tfsdk:"affinity_rules"`
|
||||
AffinityWeight types.Int64 `tfsdk:"affinity_weight"`
|
||||
AntiAffinityRules []ItemRuleInListDeletedModel `tfsdk:"anti_affinity_rules"`
|
||||
Architecture types.String `tfsdk:"arch"`
|
||||
BootOrder types.List `tfsdk:"boot_order"`
|
||||
BootDiskSize types.Int64 `tfsdk:"bootdisk_size"`
|
||||
CdImageId types.Int64 `tfsdk:"cd_image_id"`
|
||||
CloneReference types.Int64 `tfsdk:"clone_reference"`
|
||||
Clones types.List `tfsdk:"clones"`
|
||||
ComputeCIID types.Int64 `tfsdk:"computeci_id"`
|
||||
CPU types.Int64 `tfsdk:"cpus"`
|
||||
CPUPin types.Bool `tfsdk:"cpu_pin"`
|
||||
CreatedBy types.String `tfsdk:"created_by"`
|
||||
CreatedTime types.Int64 `tfsdk:"created_time"`
|
||||
CustomFields types.String `tfsdk:"custom_fields"`
|
||||
DeletedBy types.String `tfsdk:"deleted_by"`
|
||||
DeletedTime types.Int64 `tfsdk:"deleted_time"`
|
||||
Description types.String `tfsdk:"desc"`
|
||||
Devices types.String `tfsdk:"devices"`
|
||||
Disks []DiskInListDeletedModel `tfsdk:"disks"`
|
||||
Driver types.String `tfsdk:"driver"`
|
||||
GID types.Int64 `tfsdk:"gid"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
HPBacked types.Bool `tfsdk:"hp_backed"`
|
||||
ComputeId types.Int64 `tfsdk:"compute_id"`
|
||||
ImageID types.Int64 `tfsdk:"image_id"`
|
||||
Interfaces []ItemVNFInterfaceInListDeletedModel `tfsdk:"interfaces"`
|
||||
LockStatus types.String `tfsdk:"lock_status"`
|
||||
ManagerID types.Int64 `tfsdk:"manager_id"`
|
||||
ManagerType types.String `tfsdk:"manager_type"`
|
||||
MigrationJob types.Int64 `tfsdk:"migrationjob"`
|
||||
Milestones types.Int64 `tfsdk:"milestones"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
NeedReboot types.Bool `tfsdk:"need_reboot"`
|
||||
NumaAffinity types.String `tfsdk:"numa_affinity"`
|
||||
NumaNodeId types.Int64 `tfsdk:"numa_node_id"`
|
||||
Pinned types.Bool `tfsdk:"pinned"`
|
||||
RAM types.Int64 `tfsdk:"ram"`
|
||||
ReferenceID types.String `tfsdk:"reference_id"`
|
||||
Registered types.Bool `tfsdk:"registered"`
|
||||
ResName types.String `tfsdk:"res_name"`
|
||||
ReservedNodeCpus types.List `tfsdk:"reserved_node_cpus"`
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
RGName types.String `tfsdk:"rg_name"`
|
||||
SnapSets []ItemSnapSetInListDeletedModel `tfsdk:"snap_sets"`
|
||||
StatelessSepID types.Int64 `tfsdk:"stateless_sep_id"`
|
||||
StatelessSepType types.String `tfsdk:"stateless_sep_type"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Tags types.Map `tfsdk:"tags"`
|
||||
TechStatus types.String `tfsdk:"tech_status"`
|
||||
TotalDiskSize types.Int64 `tfsdk:"total_disks_size"`
|
||||
UpdatedBy types.String `tfsdk:"updated_by"`
|
||||
UpdatedTime types.Int64 `tfsdk:"updated_time"`
|
||||
UserManaged types.Bool `tfsdk:"user_managed"`
|
||||
VGPUs types.List `tfsdk:"vgpus"`
|
||||
VINSConnected types.Int64 `tfsdk:"vins_connected"`
|
||||
VirtualImageID types.Int64 `tfsdk:"virtual_image_id"`
|
||||
}
|
||||
|
||||
type ItemACLInListDeletedModel struct {
|
||||
Explicit types.Bool `tfsdk:"explicit"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Right types.String `tfsdk:"right"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
UserGroupID types.String `tfsdk:"user_group_id"`
|
||||
}
|
||||
|
||||
type ItemRuleInListDeletedModel struct {
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Key types.String `tfsdk:"key"`
|
||||
Mode types.String `tfsdk:"mode"`
|
||||
Policy types.String `tfsdk:"policy"`
|
||||
Topology types.String `tfsdk:"topology"`
|
||||
Value types.String `tfsdk:"value"`
|
||||
}
|
||||
|
||||
type DiskInListDeletedModel struct {
|
||||
DiskId types.Int64 `tfsdk:"disk_id"`
|
||||
PCISlot types.Int64 `tfsdk:"pci_slot"`
|
||||
}
|
||||
|
||||
type ItemVNFInterfaceInListDeletedModel struct {
|
||||
ConnID types.Int64 `tfsdk:"conn_id"`
|
||||
ConnType types.String `tfsdk:"conn_type"`
|
||||
DefGW types.String `tfsdk:"def_gw"`
|
||||
Enabled types.Bool `tfsdk:"enabled"`
|
||||
FLIPGroupID types.Int64 `tfsdk:"flip_group_id"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
IPAddress types.String `tfsdk:"ip_address"`
|
||||
ListenSSH types.Bool `tfsdk:"listen_ssh"`
|
||||
MAC types.String `tfsdk:"mac"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
NetID types.Int64 `tfsdk:"net_id"`
|
||||
NetMask types.Int64 `tfsdk:"netmask"`
|
||||
NetType types.String `tfsdk:"net_type"`
|
||||
NodeID types.Int64 `tfsdk:"node_id"`
|
||||
PCISlot types.Int64 `tfsdk:"pci_slot"`
|
||||
QOS *QOSInListModel `tfsdk:"qos"`
|
||||
Target types.String `tfsdk:"target"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VNFs types.List `tfsdk:"vnfs"`
|
||||
}
|
||||
|
||||
type QOSInListDeletedModel struct {
|
||||
ERate types.Int64 `tfsdk:"e_rate"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
InBurst types.Int64 `tfsdk:"in_burst"`
|
||||
InRate types.Int64 `tfsdk:"in_rate"`
|
||||
}
|
||||
|
||||
type ItemSnapSetInListDeletedModel struct {
|
||||
Disks types.List `tfsdk:"disks"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Label types.String `tfsdk:"label"`
|
||||
Timestamp types.Int64 `tfsdk:"timestamp"`
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type ListPCIDevicesModel struct {
|
||||
// request fields
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
DevID types.Int64 `tfsdk:"device_id"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
SortBy types.String `tfsdk:"sort_by"`
|
||||
Page types.Int64 `tfsdk:"page"`
|
||||
Size types.Int64 `tfsdk:"size"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items []ItemPCIDevice `tfsdk:"items"`
|
||||
EntryCount types.Int64 `tfsdk:"entry_count"`
|
||||
}
|
||||
|
||||
type ItemPCIDevice struct {
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
Description types.String `tfsdk:"desc"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
HwPath types.String `tfsdk:"hwpath"`
|
||||
ID types.Int64 `tfsdk:"device_id"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
StackID types.Int64 `tfsdk:"stack_id"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
SystemName types.String `tfsdk:"system_name"`
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type ListPFWsModel struct {
|
||||
// request fields
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items []ItemPFWModel `tfsdk:"items"`
|
||||
EntryCount types.Int64 `tfsdk:"entry_count"`
|
||||
}
|
||||
|
||||
type ItemPFWModel struct {
|
||||
PFWId types.Int64 `tfsdk:"pfw_id"`
|
||||
LocalIP types.String `tfsdk:"local_ip"`
|
||||
LocalPort types.Int64 `tfsdk:"local_port"`
|
||||
Protocol types.String `tfsdk:"protocol"`
|
||||
PublicPortEnd types.Int64 `tfsdk:"public_port_end"`
|
||||
PublicPortStart types.Int64 `tfsdk:"public_port_start"`
|
||||
VMID types.Int64 `tfsdk:"vm_id"`
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type ListSnapShotsModel struct {
|
||||
// request fields
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
Label types.String `tfsdk:"label"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items []ItemUsageSnapshotModel `tfsdk:"items"`
|
||||
}
|
||||
|
||||
type ItemUsageSnapshotModel struct {
|
||||
Count types.Int64 `tfsdk:"count"`
|
||||
Stored types.Float64 `tfsdk:"stored"`
|
||||
Label types.String `tfsdk:"label"`
|
||||
Timestamp types.Int64 `tfsdk:"timestamp"`
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type ListUsersModel struct {
|
||||
// request fields
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items *RecordACLInListUsersModel `tfsdk:"items"`
|
||||
EntryCount types.Int64 `tfsdk:"entry_count"`
|
||||
}
|
||||
|
||||
type RecordACLInListUsersModel struct {
|
||||
AccountACL []ItemACLInListUsersModel `tfsdk:"account_acl"`
|
||||
ComputeACL []ItemACLInListUsersModel `tfsdk:"compute_acl"`
|
||||
RGACL []ItemACLInListUsersModel `tfsdk:"rg_acl"`
|
||||
}
|
||||
|
||||
type ItemACLInListUsersModel struct {
|
||||
Explicit types.Bool `tfsdk:"explicit"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
Right types.String `tfsdk:"right"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
UserGroupID types.String `tfsdk:"user_group_id"`
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type ListVGPUsModel struct {
|
||||
// request fields
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
GPUID types.Int64 `tfsdk:"gpu_id"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
SortBy types.String `tfsdk:"sort_by"`
|
||||
Page types.Int64 `tfsdk:"page"`
|
||||
Size types.Int64 `tfsdk:"size"`
|
||||
IncludeDeleted types.Bool `tfsdk:"includedeleted"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items []ItemVGPU `tfsdk:"items"`
|
||||
EntryCount types.Int64 `tfsdk:"entry_count"`
|
||||
}
|
||||
|
||||
type ItemVGPU struct {
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
CreatedTime types.Int64 `tfsdk:"created_time"`
|
||||
DeletedTime types.Int64 `tfsdk:"deleted_time"`
|
||||
GID types.Int64 `tfsdk:"gid"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
ID types.Int64 `tfsdk:"vgpu_id"`
|
||||
LastClaimedBy types.Int64 `tfsdk:"last_claimed_by"`
|
||||
LastUpdateTime types.Int64 `tfsdk:"last_update_time"`
|
||||
Mode types.String `tfsdk:"mode"`
|
||||
PCISlot types.Int64 `tfsdk:"pci_slot"`
|
||||
PGPUID types.Int64 `tfsdk:"pgpuid"`
|
||||
ProfileID types.Int64 `tfsdk:"profile_id"`
|
||||
RAM types.Int64 `tfsdk:"ram"`
|
||||
ReferenceID types.String `tfsdk:"reference_id"`
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VMID types.Int64 `tfsdk:"vm_id"`
|
||||
}
|
||||
336
internal/service/cloudapi/kvmvm/models/model_resource_compute.go
Normal file
336
internal/service/cloudapi/kvmvm/models/model_resource_compute.go
Normal file
@@ -0,0 +1,336 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/attr"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
disks "repository.basistech.ru/BASIS/terraform-provider-dynamix/internal/service/cloudapi/disks/models"
|
||||
)
|
||||
|
||||
type ResourceComputeModel struct {
|
||||
// required fields
|
||||
Name types.String `tfsdk:"name"`
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
Driver types.String `tfsdk:"driver"`
|
||||
CPU types.Int64 `tfsdk:"cpu"`
|
||||
RAM types.Int64 `tfsdk:"ram"`
|
||||
|
||||
//optional fields
|
||||
ImageID types.Int64 `tfsdk:"image_id"`
|
||||
WithoutBootDisk types.Bool `tfsdk:"without_boot_disk"`
|
||||
BootDiskSize types.Int64 `tfsdk:"boot_disk_size"`
|
||||
AffinityLabel types.String `tfsdk:"affinity_label"`
|
||||
AffinityRules types.Set `tfsdk:"affinity_rules"`
|
||||
AntiAffinityRules types.Set `tfsdk:"anti_affinity_rules"`
|
||||
CustomFields types.String `tfsdk:"custom_fields"`
|
||||
Stateless types.Bool `tfsdk:"stateless"`
|
||||
SepId types.Int64 `tfsdk:"sep_id"`
|
||||
Pool types.String `tfsdk:"pool"`
|
||||
ExtraDisks types.Set `tfsdk:"extra_disks"`
|
||||
Network types.Set `tfsdk:"network"`
|
||||
Tags types.Set `tfsdk:"tags"`
|
||||
PortForwarding types.Set `tfsdk:"port_forwarding"`
|
||||
UserAccess types.Set `tfsdk:"user_access"`
|
||||
Snapshot types.Set `tfsdk:"snapshot"`
|
||||
Rollback types.Object `tfsdk:"rollback"`
|
||||
CD types.Object `tfsdk:"cd"`
|
||||
PinToStack types.Bool `tfsdk:"pin_to_stack"`
|
||||
Description types.String `tfsdk:"description"`
|
||||
CloudInit types.String `tfsdk:"cloud_init"`
|
||||
Enabled types.Bool `tfsdk:"enabled"`
|
||||
Pause types.Bool `tfsdk:"pause"`
|
||||
Reset types.Bool `tfsdk:"reset"`
|
||||
Restore types.Bool `tfsdk:"restore"`
|
||||
AutoStart types.Bool `tfsdk:"auto_start"`
|
||||
ForceStop types.Bool `tfsdk:"force_stop"`
|
||||
ForceResize types.Bool `tfsdk:"force_resize"`
|
||||
DataDisks types.String `tfsdk:"data_disks"`
|
||||
Started types.Bool `tfsdk:"started"`
|
||||
DetachDisks types.Bool `tfsdk:"detach_disks"`
|
||||
Permanently types.Bool `tfsdk:"permanently"`
|
||||
IS types.String `tfsdk:"is"`
|
||||
IpaType types.String `tfsdk:"ipa_type"`
|
||||
NumaAffinity types.String `tfsdk:"numa_affinity"`
|
||||
CPUPin types.Bool `tfsdk:"cpu_pin"`
|
||||
HPBacked types.Bool `tfsdk:"hp_backed"`
|
||||
|
||||
// response fields
|
||||
ID types.String `tfsdk:"id"`
|
||||
AccountId types.Int64 `tfsdk:"account_id"`
|
||||
AccountName types.String `tfsdk:"account_name"`
|
||||
ACL types.Object `tfsdk:"acl"` //k8s
|
||||
AffinityWeight types.Int64 `tfsdk:"affinity_weight"`
|
||||
Architecture types.String `tfsdk:"arch"`
|
||||
BootOrder types.List `tfsdk:"boot_order"`
|
||||
BootDisk types.Object `tfsdk:"boot_disk"`
|
||||
BootDiskId types.Int64 `tfsdk:"boot_disk_id"`
|
||||
CdImageId types.Int64 `tfsdk:"cd_image_id"`
|
||||
CloneReference types.Int64 `tfsdk:"clone_reference"`
|
||||
Clones types.List `tfsdk:"clones"`
|
||||
ComputeCIID types.Int64 `tfsdk:"computeci_id"`
|
||||
ComputeId types.Int64 `tfsdk:"compute_id"`
|
||||
CreatedBy types.String `tfsdk:"created_by"`
|
||||
CreatedTime types.Int64 `tfsdk:"created_time"`
|
||||
DeletedBy types.String `tfsdk:"deleted_by"`
|
||||
DeletedTime types.Int64 `tfsdk:"deleted_time"`
|
||||
Devices types.String `tfsdk:"devices"`
|
||||
Disks types.List `tfsdk:"disks"`
|
||||
GID types.Int64 `tfsdk:"gid"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
ImageName types.String `tfsdk:"image_name"`
|
||||
Interfaces types.List `tfsdk:"interfaces"`
|
||||
LockStatus types.String `tfsdk:"lock_status"`
|
||||
ManagerID types.Int64 `tfsdk:"manager_id"`
|
||||
ManagerType types.String `tfsdk:"manager_type"`
|
||||
MigrationJob types.Int64 `tfsdk:"migrationjob"`
|
||||
Milestones types.Int64 `tfsdk:"milestones"`
|
||||
NatableVINSID types.Int64 `tfsdk:"natable_vins_id"`
|
||||
NatableVINSIP types.String `tfsdk:"natable_vins_ip"`
|
||||
NatableVINSName types.String `tfsdk:"natable_vins_name"`
|
||||
NatableVINSNetwork types.String `tfsdk:"natable_vins_network"`
|
||||
NatableVINSNetworkName types.String `tfsdk:"natable_vins_network_name"`
|
||||
NeedReboot types.Bool `tfsdk:"need_reboot"`
|
||||
NumaNodeId types.Int64 `tfsdk:"numa_node_id"`
|
||||
OSUsers types.List `tfsdk:"os_users"`
|
||||
Pinned types.Bool `tfsdk:"pinned"`
|
||||
ReferenceID types.String `tfsdk:"reference_id"`
|
||||
Registered types.Bool `tfsdk:"registered"`
|
||||
ResName types.String `tfsdk:"res_name"`
|
||||
ReservedNodeCpus types.List `tfsdk:"reserved_node_cpus"`
|
||||
RGName types.String `tfsdk:"rg_name"`
|
||||
SnapSets types.List `tfsdk:"snap_sets"`
|
||||
StatelessSepID types.Int64 `tfsdk:"stateless_sep_id"`
|
||||
StatelessSepType types.String `tfsdk:"stateless_sep_type"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
TechStatus types.String `tfsdk:"tech_status"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
UpdatedBy types.String `tfsdk:"updated_by"`
|
||||
UpdatedTime types.Int64 `tfsdk:"updated_time"`
|
||||
UserManaged types.Bool `tfsdk:"user_managed"`
|
||||
Userdata types.String `tfsdk:"user_data"`
|
||||
VGPUs types.List `tfsdk:"vgpus"`
|
||||
VirtualImageID types.Int64 `tfsdk:"virtual_image_id"`
|
||||
VirtualImageName types.String `tfsdk:"virtual_image_name"`
|
||||
}
|
||||
|
||||
type RecordResourceACLModel struct {
|
||||
AccountACL types.List `tfsdk:"account_acl"`
|
||||
ComputeACL types.List `tfsdk:"compute_acl"`
|
||||
RGACL types.List `tfsdk:"rg_acl"`
|
||||
}
|
||||
|
||||
type ItemResourceDiskModel struct {
|
||||
CKey types.String `tfsdk:"ckey"`
|
||||
ACL types.String `tfsdk:"acl"`
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
BootPartition types.Int64 `tfsdk:"boot_partition"`
|
||||
CreatedTime types.Int64 `tfsdk:"created_time"`
|
||||
DeletedTime types.Int64 `tfsdk:"deleted_time"`
|
||||
Description types.String `tfsdk:"desc"`
|
||||
DestructionTime types.Int64 `tfsdk:"destruction_time"`
|
||||
DiskPath types.String `tfsdk:"disk_path"`
|
||||
GID types.Int64 `tfsdk:"gid"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
ID types.Int64 `tfsdk:"disk_id"`
|
||||
ImageID types.Int64 `tfsdk:"image_id"`
|
||||
Images types.List `tfsdk:"images"`
|
||||
IOTune types.Object `tfsdk:"iotune"`
|
||||
IQN types.String `tfsdk:"iqn"`
|
||||
Login types.String `tfsdk:"login"`
|
||||
Milestones types.Int64 `tfsdk:"milestones"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
Order types.Int64 `tfsdk:"order"`
|
||||
Params types.String `tfsdk:"params"`
|
||||
ParentID types.Int64 `tfsdk:"parent_id"`
|
||||
Passwd types.String `tfsdk:"passwd"`
|
||||
PCISlot types.Int64 `tfsdk:"pci_slot"`
|
||||
Pool types.String `tfsdk:"pool"`
|
||||
PresentTo types.List `tfsdk:"present_to"`
|
||||
PurgeTime types.Int64 `tfsdk:"purge_time"`
|
||||
ReferenceID types.String `tfsdk:"reference_id"`
|
||||
RealityDeviceNumber types.Int64 `tfsdk:"reality_device_number"`
|
||||
Replication types.Object `tfsdk:"replication"`
|
||||
ResID types.String `tfsdk:"res_id"`
|
||||
Role types.String `tfsdk:"role"`
|
||||
SepID types.Int64 `tfsdk:"sep_id"`
|
||||
Shareable types.Bool `tfsdk:"shareable"`
|
||||
SizeMax types.Int64 `tfsdk:"size_max"`
|
||||
SizeUsed types.Float64 `tfsdk:"size_used"`
|
||||
Snapshots types.List `tfsdk:"snapshots"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
TechStatus types.String `tfsdk:"tech_status"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VMID types.Int64 `tfsdk:"vmid"`
|
||||
}
|
||||
|
||||
type ItemPortForfardingModel struct {
|
||||
PublicPortStart types.Int64 `tfsdk:"public_port_start"`
|
||||
PublicPortEnd types.Int64 `tfsdk:"public_port_end"`
|
||||
LocalPort types.Int64 `tfsdk:"local_port"`
|
||||
Proto types.String `tfsdk:"proto"`
|
||||
}
|
||||
|
||||
type ItemNetworkModel struct {
|
||||
NetType types.String `tfsdk:"net_type"`
|
||||
NetId types.Int64 `tfsdk:"net_id"`
|
||||
IpAddress types.String `tfsdk:"ip_address"`
|
||||
Mac types.String `tfsdk:"mac"`
|
||||
}
|
||||
|
||||
type ItemResourceInterfacesModel struct {
|
||||
ConnID types.Int64 `tfsdk:"conn_id"`
|
||||
ConnType types.String `tfsdk:"conn_type"`
|
||||
GetGW types.String `tfsdk:"get_gw"`
|
||||
Enabled types.Bool `tfsdk:"enabled"`
|
||||
FLIPGroupID types.Int64 `tfsdk:"flip_group_id"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
IPAddress types.String `tfsdk:"ip_address"`
|
||||
ListenSSH types.Bool `tfsdk:"listen_ssh"`
|
||||
MAC types.String `tfsdk:"mac"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
NetID types.Int64 `tfsdk:"net_id"`
|
||||
NetMask types.Int64 `tfsdk:"netmask"`
|
||||
NetType types.String `tfsdk:"net_type"`
|
||||
NodeID types.Int64 `tfsdk:"node_id"`
|
||||
PCISlot types.Int64 `tfsdk:"pci_slot"`
|
||||
QOS types.Object `tfsdk:"qos"`
|
||||
Target types.String `tfsdk:"target"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VNFs types.List `tfsdk:"vnfs"`
|
||||
}
|
||||
|
||||
type ItemResourceRulesModel struct {
|
||||
Key types.String `tfsdk:"key"`
|
||||
Mode types.String `tfsdk:"mode"`
|
||||
Policy types.String `tfsdk:"policy"`
|
||||
Topology types.String `tfsdk:"topology"`
|
||||
Value types.String `tfsdk:"value"`
|
||||
}
|
||||
|
||||
var ItemNetwork = map[string]attr.Type{
|
||||
"net_type": types.StringType,
|
||||
"net_id": types.Int64Type,
|
||||
"ip_address": types.StringType,
|
||||
"mac": types.StringType,
|
||||
}
|
||||
|
||||
var ItemDisk = map[string]attr.Type{
|
||||
"ckey": types.StringType,
|
||||
"acl": types.StringType,
|
||||
"account_id": types.Int64Type,
|
||||
"boot_partition": types.Int64Type,
|
||||
"created_time": types.Int64Type,
|
||||
"deleted_time": types.Int64Type,
|
||||
"desc": types.StringType,
|
||||
"destruction_time": types.Int64Type,
|
||||
"disk_path": types.StringType,
|
||||
"gid": types.Int64Type,
|
||||
"guid": types.Int64Type,
|
||||
"disk_id": types.Int64Type,
|
||||
"image_id": types.Int64Type,
|
||||
"images": types.ListType{ElemType: types.StringType},
|
||||
"iotune": types.ObjectType{AttrTypes: disks.ItemIOTune},
|
||||
"iqn": types.StringType,
|
||||
"login": types.StringType,
|
||||
"milestones": types.Int64Type,
|
||||
"name": types.StringType,
|
||||
"order": types.Int64Type,
|
||||
"params": types.StringType,
|
||||
"parent_id": types.Int64Type,
|
||||
"passwd": types.StringType,
|
||||
"pci_slot": types.Int64Type,
|
||||
"pool": types.StringType,
|
||||
"present_to": types.ListType{ElemType: types.Int64Type},
|
||||
"purge_time": types.Int64Type,
|
||||
"replication": types.ObjectType{AttrTypes: ItemReplication},
|
||||
"reality_device_number": types.Int64Type,
|
||||
"reference_id": types.StringType,
|
||||
"res_id": types.StringType,
|
||||
"role": types.StringType,
|
||||
"sep_id": types.Int64Type,
|
||||
"shareable": types.BoolType,
|
||||
"size_max": types.Int64Type,
|
||||
"size_used": types.Float64Type,
|
||||
"snapshots": types.ListType{ElemType: types.ObjectType{AttrTypes: ItemSnapshot}},
|
||||
"status": types.StringType,
|
||||
"tech_status": types.StringType,
|
||||
"type": types.StringType,
|
||||
"vmid": types.Int64Type,
|
||||
}
|
||||
|
||||
var ItemReplication = map[string]attr.Type{
|
||||
"disk_id": types.Int64Type,
|
||||
"pool_id": types.StringType,
|
||||
"role": types.StringType,
|
||||
"self_volume_id": types.StringType,
|
||||
"storage_id": types.StringType,
|
||||
"volume_id": types.StringType,
|
||||
}
|
||||
|
||||
var ItemSnapshot = map[string]attr.Type{
|
||||
"guid": types.StringType,
|
||||
"label": types.StringType,
|
||||
"reference_id": types.StringType,
|
||||
"res_id": types.StringType,
|
||||
"snap_set_guid": types.StringType,
|
||||
"snap_set_time": types.Int64Type,
|
||||
"timestamp": types.Int64Type,
|
||||
}
|
||||
|
||||
var ListACL = map[string]attr.Type{
|
||||
"account_acl": types.ListType{ElemType: types.ObjectType{AttrTypes: ItemACL}},
|
||||
"compute_acl": types.ListType{ElemType: types.ObjectType{AttrTypes: ItemACL}},
|
||||
"rg_acl": types.ListType{ElemType: types.ObjectType{AttrTypes: ItemACL}},
|
||||
}
|
||||
|
||||
var ItemACL = map[string]attr.Type{
|
||||
"explicit": types.BoolType,
|
||||
"guid": types.StringType,
|
||||
"right": types.StringType,
|
||||
"status": types.StringType,
|
||||
"type": types.StringType,
|
||||
"user_group_id": types.StringType,
|
||||
}
|
||||
|
||||
var ItemInterfaces = map[string]attr.Type{
|
||||
"conn_id": types.Int64Type,
|
||||
"conn_type": types.StringType,
|
||||
"get_gw": types.StringType,
|
||||
"enabled": types.BoolType,
|
||||
"flip_group_id": types.Int64Type,
|
||||
"guid": types.StringType,
|
||||
"ip_address": types.StringType,
|
||||
"listen_ssh": types.BoolType,
|
||||
"mac": types.StringType,
|
||||
"name": types.StringType,
|
||||
"net_id": types.Int64Type,
|
||||
"netmask": types.Int64Type,
|
||||
"net_type": types.StringType,
|
||||
"node_id": types.Int64Type,
|
||||
"pci_slot": types.Int64Type,
|
||||
"qos": types.ObjectType{AttrTypes: ItemQos},
|
||||
"target": types.StringType,
|
||||
"type": types.StringType,
|
||||
"vnfs": types.ListType{ElemType: types.Int64Type},
|
||||
}
|
||||
|
||||
var ItemQos = map[string]attr.Type{
|
||||
"e_rate": types.Int64Type,
|
||||
"guid": types.StringType,
|
||||
"in_burst": types.Int64Type,
|
||||
"in_rate": types.Int64Type,
|
||||
}
|
||||
|
||||
var ItemOSUsers = map[string]attr.Type{
|
||||
"guid": types.StringType,
|
||||
"login": types.StringType,
|
||||
"password": types.StringType,
|
||||
"public_key": types.StringType,
|
||||
}
|
||||
|
||||
var ItemSnapSets = map[string]attr.Type{
|
||||
"disks": types.ListType{ElemType: types.Int64Type},
|
||||
"guid": types.StringType,
|
||||
"label": types.StringType,
|
||||
"timestamp": types.Int64Type,
|
||||
}
|
||||
Reference in New Issue
Block a user