This commit is contained in:
asteam
2024-07-25 14:33:38 +03:00
commit 6f40af6a5f
946 changed files with 98335 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
package models
import (
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
"github.com/hashicorp/terraform-plugin-framework/types"
)
type RecordImageModel struct {
// request fields
ImageId types.Int64 `tfsdk:"image_id"`
ShowAll types.Bool `tfsdk:"show_all"`
Timeouts timeouts.Value `tfsdk:"timeouts"`
// responce fields
Id types.String `tfsdk:"id"`
UNCPath types.String `tfsdk:"unc_path"`
CKey types.String `tfsdk:"ckey"`
AccountID types.Int64 `tfsdk:"account_id"`
ACL types.List `tfsdk:"acl"`
Architecture types.String `tfsdk:"architecture"`
BootType types.String `tfsdk:"boot_type"`
Bootable types.Bool `tfsdk:"bootable"`
ComputeCIID types.Int64 `tfsdk:"compute_ci_id"`
CdPresentedTo types.String `tfsdk:"cd_presented_to"`
GID types.Int64 `tfsdk:"gid"`
DeletedTime types.Int64 `tfsdk:"deleted_time"`
Description types.String `tfsdk:"desc"`
Drivers types.List `tfsdk:"drivers"`
Enabled types.Bool `tfsdk:"enabled"`
GUID types.Int64 `tfsdk:"guid"`
History []HistoryModel `tfsdk:"history"`
HotResize types.Bool `tfsdk:"hot_resize"`
LastModified types.Int64 `tfsdk:"last_modified"`
LinkTo types.Int64 `tfsdk:"link_to"`
Milestones types.Int64 `tfsdk:"milestones"`
ImageName types.String `tfsdk:"image_name"`
ImageType types.String `tfsdk:"image_type"`
Password types.String `tfsdk:"password"`
NetworkInterfaceNaming types.String `tfsdk:"network_interface_naming"`
PoolName types.String `tfsdk:"pool_name"`
PresentTo types.List `tfsdk:"present_to"`
ProviderName types.String `tfsdk:"provider_name"`
PurgeAttempts types.Int64 `tfsdk:"purge_attempts"`
ResID types.String `tfsdk:"res_id"`
RescueCD types.Bool `tfsdk:"rescuecd"`
SepID types.Int64 `tfsdk:"sep_id"`
SharedWith types.List `tfsdk:"shared_with"`
Size types.Int64 `tfsdk:"size"`
Status types.String `tfsdk:"status"`
TechStatus types.String `tfsdk:"tech_status"`
Username types.String `tfsdk:"username"`
Version types.String `tfsdk:"version"`
}
type HistoryModel struct {
GUID types.String `tfsdk:"guid"`
ID types.Int64 `tfsdk:"id"`
Timestamp types.Int64 `tfsdk:"timestamp"`
}

View File

@@ -0,0 +1,53 @@
package models
import (
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
"github.com/hashicorp/terraform-plugin-framework/types"
)
type ListImagesModel struct {
// request fields
SEPID types.Int64 `tfsdk:"sep_id"`
ByID types.Int64 `tfsdk:"by_id"`
Name types.String `tfsdk:"name"`
Status types.String `tfsdk:"status"`
Architecture types.String `tfsdk:"architecture"`
TypeImage types.String `tfsdk:"type_image"`
ImageSize types.Int64 `tfsdk:"image_size"`
SEPName types.String `tfsdk:"sep_name"`
PoolName types.String `tfsdk:"pool_name"`
Public types.Bool `tfsdk:"public"`
HotResize types.Bool `tfsdk:"hot_resize"`
Bootable types.Bool `tfsdk:"bootable"`
SortBy types.String `tfsdk:"sort_by"`
Page types.Int64 `tfsdk:"page"`
Size types.Int64 `tfsdk:"size"`
// responce fields
Id types.String `tfsdk:"id"`
Items []ItemImageModel `tfsdk:"items"`
EntryCount types.Int64 `tfsdk:"entry_count"`
Timeouts timeouts.Value `tfsdk:"timeouts"`
}
type ItemImageModel struct {
AccountID types.Int64 `tfsdk:"account_id"`
Architecture types.String `tfsdk:"architecture"`
BootType types.String `tfsdk:"boot_type"`
Bootable types.Bool `tfsdk:"bootable"`
CDROM types.Bool `tfsdk:"cdrom"`
Description types.String `tfsdk:"desc"`
Drivers types.List `tfsdk:"drivers"`
HotResize types.Bool `tfsdk:"hot_resize"`
ImageID types.Int64 `tfsdk:"image_id"`
ImageType types.String `tfsdk:"image_type"`
LinkTo types.Int64 `tfsdk:"link_to"`
ImageName types.String `tfsdk:"image_name"`
PoolName types.String `tfsdk:"pool_name"`
SepID types.Int64 `tfsdk:"sep_id"`
Size types.Int64 `tfsdk:"size"`
Status types.String `tfsdk:"status"`
NetworkInterfaceNaming types.String `tfsdk:"network_interface_naming"`
Username types.String `tfsdk:"username"`
Virtual types.Bool `tfsdk:"virtual"`
}

View File

@@ -0,0 +1,69 @@
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"
)
type ImageResourceModel struct {
// request fields
ImageName types.String `tfsdk:"image_name"`
URL types.String `tfsdk:"url"`
BootType types.String `tfsdk:"boot_type"`
ImageType types.String `tfsdk:"image_type"`
Drivers types.List `tfsdk:"drivers"`
HotResize types.Bool `tfsdk:"hot_resize"`
NetworkInterfaceNaming types.String `tfsdk:"network_interface_naming"`
Username types.String `tfsdk:"username"`
Password types.String `tfsdk:"password"`
AccountID types.Int64 `tfsdk:"account_id"`
UsernameDL types.String `tfsdk:"username_dl"`
PasswordDL types.String `tfsdk:"password_dl"`
SepID types.Int64 `tfsdk:"sep_id"`
PoolName types.String `tfsdk:"pool_name"`
Architecture types.String `tfsdk:"architecture"`
Permanently types.Bool `tfsdk:"permanently"`
Timeouts timeouts.Value `tfsdk:"timeouts"`
// responce fields
Id types.String `tfsdk:"id"`
LastUpdated types.String `tfsdk:"last_updated"`
UNCPath types.String `tfsdk:"unc_path"`
CKey types.String `tfsdk:"ckey"`
ACL types.List `tfsdk:"acl"`
Bootable types.Bool `tfsdk:"bootable"`
ComputeCIID types.Int64 `tfsdk:"compute_ci_id"`
CdPresentedTo types.String `tfsdk:"cd_presented_to"`
GID types.Int64 `tfsdk:"gid"`
DeletedTime types.Int64 `tfsdk:"deleted_time"`
Description types.String `tfsdk:"desc"`
Enabled types.Bool `tfsdk:"enabled"`
GUID types.Int64 `tfsdk:"guid"`
History types.List `tfsdk:"history"`
LastModified types.Int64 `tfsdk:"last_modified"`
LinkTo types.Int64 `tfsdk:"link_to"`
Milestones types.Int64 `tfsdk:"milestones"`
ImageId types.Int64 `tfsdk:"image_id"`
PresentTo types.List `tfsdk:"present_to"`
ProviderName types.String `tfsdk:"provider_name"`
PurgeAttempts types.Int64 `tfsdk:"purge_attempts"`
ResID types.String `tfsdk:"res_id"`
RescueCD types.Bool `tfsdk:"rescuecd"`
SharedWith types.List `tfsdk:"shared_with"`
Size types.Int64 `tfsdk:"size"`
Status types.String `tfsdk:"status"`
TechStatus types.String `tfsdk:"tech_status"`
Version types.String `tfsdk:"version"`
}
type HistoryInImageResourceModel struct {
GUID types.String `tfsdk:"guid"`
ID types.Int64 `tfsdk:"id"`
Timestamp types.Int64 `tfsdk:"timestamp"`
}
var HistoryInResource = map[string]attr.Type{
"guid": types.StringType,
"id": types.Int64Type,
"timestamp": types.Int64Type,
}

View File

@@ -0,0 +1,57 @@
package models
import (
"github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts"
"github.com/hashicorp/terraform-plugin-framework/types"
)
type ImageVirtualResourceModel struct {
// request fields
ImageName types.String `tfsdk:"image_name"`
LinkTo types.Int64 `tfsdk:"link_to"`
Permanently types.Bool `tfsdk:"permanently"`
Timeouts timeouts.Value `tfsdk:"timeouts"`
// responce fields
Id types.String `tfsdk:"id"`
LastUpdated types.String `tfsdk:"last_updated"`
UNCPath types.String `tfsdk:"unc_path"`
CKey types.String `tfsdk:"ckey"`
AccountID types.Int64 `tfsdk:"account_id"`
ACL types.List `tfsdk:"acl"`
Architecture types.String `tfsdk:"architecture"`
BootType types.String `tfsdk:"boot_type"`
Bootable types.Bool `tfsdk:"bootable"`
ComputeCIID types.Int64 `tfsdk:"compute_ci_id"`
DeletedTime types.Int64 `tfsdk:"deleted_time"`
Description types.String `tfsdk:"desc"`
Drivers types.List `tfsdk:"drivers"`
Enabled types.Bool `tfsdk:"enabled"`
GID types.Int64 `tfsdk:"gid"`
GUID types.Int64 `tfsdk:"guid"`
History types.List `tfsdk:"history"`
HotResize types.Bool `tfsdk:"hot_resize"`
LastModified types.Int64 `tfsdk:"last_modified"`
Milestones types.Int64 `tfsdk:"milestones"`
ImageId types.Int64 `tfsdk:"image_id"`
ImageType types.String `tfsdk:"image_type"`
Password types.String `tfsdk:"password"`
PoolName types.String `tfsdk:"pool_name"`
PresentTo types.List `tfsdk:"present_to"`
ProviderName types.String `tfsdk:"provider_name"`
PurgeAttempts types.Int64 `tfsdk:"purge_attempts"`
ResID types.String `tfsdk:"res_id"`
RescueCD types.Bool `tfsdk:"rescuecd"`
SepID types.Int64 `tfsdk:"sep_id"`
SharedWith types.List `tfsdk:"shared_with"`
Size types.Int64 `tfsdk:"size"`
Status types.String `tfsdk:"status"`
TechStatus types.String `tfsdk:"tech_status"`
Username types.String `tfsdk:"username"`
Version types.String `tfsdk:"version"`
}
type HistoryInImageVirtualResourceModel struct {
GUID types.String `tfsdk:"guid"`
ID types.Int64 `tfsdk:"id"`
Timestamp types.Int64 `tfsdk:"timestamp"`
}