This commit is contained in:
2025-11-18 16:20:26 +03:00
parent 4b3f21d9be
commit e42fbcef39
397 changed files with 17560 additions and 1501 deletions

View File

@@ -34,7 +34,6 @@ package image
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/statefuncs"
)
func dataSourceImageListStacksSchemaMake() map[string]*schema.Schema {
@@ -404,6 +403,10 @@ func dataSourceImageListSchemaMake() map[string]*schema.Schema {
Optional: true,
Description: "find by enabled True or False",
},
"storage_policy_id": {
Type: schema.TypeInt,
Optional: true,
},
"items": {
Type: schema.TypeList,
Computed: true,
@@ -624,6 +627,14 @@ func dataSourceImageListSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "status",
},
"storage_policy_id": {
Type: schema.TypeInt,
Computed: true,
},
"to_clean": {
Type: schema.TypeBool,
Computed: true,
},
"tech_status": {
Type: schema.TypeString,
Computed: true,
@@ -882,10 +893,18 @@ func dataSourceImageSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "status",
},
"storage_policy_id": {
Type: schema.TypeInt,
Computed: true,
},
"tech_status": {
Type: schema.TypeString,
Computed: true,
Description: "tech atatus",
Description: "tech status",
},
"to_clean": {
Type: schema.TypeBool,
Computed: true,
},
"image_type": {
Type: schema.TypeString,
@@ -922,13 +941,10 @@ func resourceCDROMImageSchemaMake() map[string]*schema.Schema {
Required: true,
Description: "URL where to download ISO from",
},
"drivers": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Description: "List of types of compute suitable for image. Example: [ \"KVM_X86\" ]",
"storage_policy_id": {
Type: schema.TypeInt,
Required: true,
Description: "ID of the storage policy",
},
"hot_resize": {
Type: schema.TypeBool,
@@ -996,13 +1012,6 @@ func resourceCDROMImageSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
},
},
"enabled_stacks": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
},
},
"unc_path": {
Type: schema.TypeString,
Computed: true,
@@ -1047,6 +1056,13 @@ func resourceCDROMImageSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "Boot type of image bios or uefi",
},
"drivers": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"gid": {
Type: schema.TypeInt,
Computed: true,
@@ -1132,6 +1148,10 @@ func resourceCDROMImageSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "tech atatus",
},
"to_clean": {
Type: schema.TypeBool,
Computed: true,
},
"version": {
Type: schema.TypeString,
Computed: true,
@@ -1187,15 +1207,10 @@ func resourceImageSchemaMake() map[string]*schema.Schema {
Required: true,
Description: "Image type linux, windows or other",
},
"drivers": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{"KVM_X86"}, false),
},
Description: "List of types of compute suitable for image. Example: [ \"KVM_X86\" ]",
"storage_policy_id": {
Type: schema.TypeInt,
Required: true,
Description: "ID of the storage policy",
},
"hot_resize": {
Type: schema.TypeBool,
@@ -1279,13 +1294,6 @@ func resourceImageSchemaMake() map[string]*schema.Schema {
Default: false,
Description: "Create image from a media identified by URL (in synchronous mode)",
},
"enabled_stacks": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
},
},
"shared_with": {
Type: schema.TypeList,
Optional: true,
@@ -1329,6 +1337,13 @@ func resourceImageSchemaMake() map[string]*schema.Schema {
},
},
},
"drivers": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"gid": {
Type: schema.TypeInt,
Computed: true,
@@ -1413,6 +1428,10 @@ func resourceImageSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "tech atatus",
},
"to_clean": {
Type: schema.TypeBool,
Computed: true,
},
"version": {
Type: schema.TypeString,
Computed: true,
@@ -1506,13 +1525,6 @@ func resourceVirtualImageSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
},
},
"enabled_stacks": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
},
},
"unc_path": {
Type: schema.TypeString,
@@ -1684,6 +1696,10 @@ func resourceVirtualImageSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "tech atatus",
},
"to_clean": {
Type: schema.TypeBool,
Computed: true,
},
"image_type": {
Type: schema.TypeString,
Computed: true,
@@ -1784,13 +1800,6 @@ func resourceImageFromBlankComputeSchemaMake() map[string]*schema.Schema {
Optional: true,
Computed: true,
},
"enabled_stacks": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
},
},
"shared_with": {
Type: schema.TypeList,
Optional: true,
@@ -1956,6 +1965,10 @@ func resourceImageFromBlankComputeSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"to_clean": {
Type: schema.TypeBool,
Computed: true,
},
"url": {
Type: schema.TypeString,
Computed: true,
@@ -2018,16 +2031,6 @@ func resourceImageFromPlatformDiskSchemaMake() map[string]*schema.Schema {
Computed: true,
Description: "storage endpoint provider ID",
},
"drivers": {
Type: schema.TypeList,
Required: true,
Elem: &schema.Schema{
StateFunc: statefuncs.StateFuncToUpper,
ValidateFunc: validation.StringInSlice([]string{"SVA_KVM_X86", "KVM_X86"}, false), // observe case while validating
Type: schema.TypeString,
},
Description: "List of types of compute suitable for image. Example: [ \"KVM_X86\" ]",
},
"pool_name": {
Type: schema.TypeString,
Optional: true,
@@ -2062,13 +2065,6 @@ func resourceImageFromPlatformDiskSchemaMake() map[string]*schema.Schema {
Optional: true,
Computed: true,
},
"enabled_stacks": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
},
},
"shared_with": {
Type: schema.TypeList,
Optional: true,
@@ -2135,6 +2131,13 @@ func resourceImageFromPlatformDiskSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"drivers": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"gid": {
Type: schema.TypeInt,
Computed: true,
@@ -2223,6 +2226,10 @@ func resourceImageFromPlatformDiskSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"to_clean": {
Type: schema.TypeBool,
Computed: true,
},
"url": {
Type: schema.TypeString,
Computed: true,