This commit is contained in:
asteam
2025-07-01 13:44:09 +03:00
parent 5382579a5f
commit ddbb12996d
1041 changed files with 2842 additions and 96448 deletions

View File

@@ -16,47 +16,49 @@ type ResourceComputeModel struct {
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"`
AutoStartWithNode types.Bool `tfsdk:"auto_start_w_node"`
CustomFields types.String `tfsdk:"custom_fields"`
Chipset types.String `tfsdk:"chipset"`
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"`
PCIDevices types.Set `tfsdk:"pci_devices"`
Rollback types.Object `tfsdk:"rollback"`
CD types.Object `tfsdk:"cd"`
PinToStack types.Bool `tfsdk:"pin_to_stack"`
PreferredCPU types.List `tfsdk:"preferred_cpu"`
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"`
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"`
AutoStartWithNode types.Bool `tfsdk:"auto_start_w_node"`
CustomFields types.String `tfsdk:"custom_fields"`
Chipset types.String `tfsdk:"chipset"`
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"`
PCIDevices types.Set `tfsdk:"pci_devices"`
Rollback types.Object `tfsdk:"rollback"`
CDImageID types.Int64 `tfsdk:"cd_image_id"`
PinToStack types.Bool `tfsdk:"pin_to_stack"`
PreferredCPU types.List `tfsdk:"preferred_cpu"`
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"`
ForceStop types.Bool `tfsdk:"force_stop"`
ForceResize types.Bool `tfsdk:"force_resize"`
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"`
LoaderType types.String `tfsdk:"loader_type"`
BootType types.String `tfsdk:"boot_type"`
HotResize types.Bool `tfsdk:"hot_resize"`
NetworkInterfaceNaming types.String `tfsdk:"network_interface_naming"`
SnapshotDeleteAsync types.Bool `tfsdk:"snapshot_delete_async"`
// response fields
ID types.String `tfsdk:"id"`
@@ -68,7 +70,6 @@ type ResourceComputeModel struct {
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"`
@@ -125,7 +126,6 @@ type RecordResourceACLModel struct {
}
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"`
@@ -151,7 +151,7 @@ type ItemResourceDiskModel struct {
Passwd types.String `tfsdk:"passwd"`
PCISlot types.Int64 `tfsdk:"pci_slot"`
Pool types.String `tfsdk:"pool"`
PresentTo types.List `tfsdk:"present_to"`
PresentTo types.Map `tfsdk:"present_to"`
PurgeTime types.Int64 `tfsdk:"purge_time"`
ReferenceID types.String `tfsdk:"reference_id"`
RealityDeviceNumber types.Int64 `tfsdk:"reality_device_number"`
@@ -218,6 +218,38 @@ type ItemResourceRulesModel struct {
Value types.String `tfsdk:"value"`
}
type ItemTagModel struct {
Key types.String `tfsdk:"key"`
Value types.String `tfsdk:"value"`
}
type UserAccessModel struct {
Username types.String `tfsdk:"username"`
AccessType types.String `tfsdk:"access_type"`
}
type ComputeVGPUModel struct {
ID types.Int64 `tfsdk:"id"`
GID types.Int64 `tfsdk:"gid"`
Type types.String `tfsdk:"type"`
Mode types.String `tfsdk:"mode"`
Status types.String `tfsdk:"status"`
ProfileID types.Int64 `tfsdk:"profile_id"`
RAM types.Int64 `tfsdk:"ram"`
LastUpdateTime types.Int64 `tfsdk:"last_update_time"`
CreatedTime types.Int64 `tfsdk:"created_time"`
DeletedTime types.Int64 `tfsdk:"deleted_time"`
VMID types.Int64 `tfsdk:"vmid"`
PGPUID types.Int64 `tfsdk:"pgpuid"`
ReferenceID types.String `tfsdk:"reference_id"`
AccountID types.Int64 `tfsdk:"account_id"`
RGID types.Int64 `tfsdk:"rg_id"`
LastClaimedBy types.Int64 `tfsdk:"last_claimed_by"`
PCISlot types.Int64 `tfsdk:"pci_slot"`
BusNumber types.Int64 `tfsdk:"bus_number"`
GUID types.Int64 `tfsdk:"guid"`
}
var ItemNetwork = map[string]attr.Type{
"net_type": types.StringType,
"net_id": types.Int64Type,
@@ -228,7 +260,6 @@ var ItemNetwork = map[string]attr.Type{
}
var ItemDisk = map[string]attr.Type{
"ckey": types.StringType,
"acl": types.StringType,
"account_id": types.Int64Type,
"boot_partition": types.Int64Type,
@@ -242,7 +273,7 @@ var ItemDisk = map[string]attr.Type{
"guid": types.Int64Type,
"disk_id": types.Int64Type,
"image_id": types.Int64Type,
"images": types.ListType{ElemType: types.StringType},
"images": types.ListType{ElemType: types.Int64Type},
"iotune": types.ObjectType{AttrTypes: disks.ItemIOTune},
"iqn": types.StringType,
"login": types.StringType,
@@ -254,7 +285,7 @@ var ItemDisk = map[string]attr.Type{
"passwd": types.StringType,
"pci_slot": types.Int64Type,
"pool": types.StringType,
"present_to": types.ListType{ElemType: types.Int64Type},
"present_to": types.MapType{ElemType: types.Int64Type},
"purge_time": types.Int64Type,
"replication": types.ObjectType{AttrTypes: ItemReplication},
"reality_device_number": types.Int64Type,
@@ -361,3 +392,50 @@ var ItemSnapSets = map[string]attr.Type{
"label": types.StringType,
"timestamp": types.Int64Type,
}
var ItemResourceRules = map[string]attr.Type{
"key": types.StringType,
"mode": types.StringType,
"policy": types.StringType,
"topology": types.StringType,
"value": types.StringType,
}
var ItemTag = map[string]attr.Type{
"key": types.StringType,
"value": types.StringType,
}
var ItemPortForfarding = map[string]attr.Type{
"public_port_start": types.Int64Type,
"public_port_end": types.Int64Type,
"local_port": types.Int64Type,
"proto": types.StringType,
}
var ItemUserAccess = map[string]attr.Type{
"username": types.StringType,
"access_type": types.StringType,
}
var ComputeItemVGPU = map[string]attr.Type{
"id": types.Int64Type,
"gid": types.Int64Type,
"type": types.StringType,
"mode": types.StringType,
"status": types.StringType,
"profile_id": types.Int64Type,
"ram": types.Int64Type,
"last_update_time": types.Int64Type,
"created_time": types.Int64Type,
"deleted_time": types.Int64Type,
"vmid": types.Int64Type,
"pgpuid": types.Int64Type,
"reference_id": types.StringType,
"account_id": types.Int64Type,
"rg_id": types.Int64Type,
"last_claimed_by": types.Int64Type,
"pci_slot": types.Int64Type,
"bus_number": types.Int64Type,
"guid": types.Int64Type,
}