This commit is contained in:
asteam
2025-06-16 14:17:01 +03:00
parent 9e68edb2b9
commit e04dab77cb
4880 changed files with 97 additions and 535839 deletions

View File

@@ -21,6 +21,7 @@ func flattenAccount(d *schema.ResourceData, acc account.RecordAccount) error {
d.Set("deleted_by", acc.DeletedBy)
d.Set("deleted_time", acc.DeletedTime)
d.Set("displayname", acc.DisplayName)
d.Set("enable", flattenEnabled(acc.Status))
d.Set("guid", acc.GUID)
d.Set("account_id", acc.ID)
d.Set("account_name", acc.Name)
@@ -45,6 +46,10 @@ func flattenAccount(d *schema.ResourceData, acc account.RecordAccount) error {
return nil
}
func flattenEnabled(status string) bool {
return status == "CONFIRMED"
}
func flattenAccComputes(acs account.Computes) []map[string]interface{} {
res := make([]map[string]interface{}, 0)
temp := map[string]interface{}{

View File

@@ -432,7 +432,7 @@ func resourceAccountSchemaMake() map[string]*schema.Schema {
},
},
"reason": {
Type: schema.TypeBool,
Type: schema.TypeString,
Optional: true,
Description: "reason for deactivation",
},
@@ -450,6 +450,7 @@ func resourceAccountSchemaMake() map[string]*schema.Schema {
"enable": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Description: "enable/disable account",
},
"resource_limits": {

View File

@@ -2133,12 +2133,6 @@ func ResourceComputeSchemaMake() map[string]*schema.Schema {
Optional: true,
Computed: true,
},
"stateless": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Description: "Compute will be stateless (SVA_KVM_X86) if set to True",
},
"boot_disk": {
Type: schema.TypeSet,
Computed: true,

View File

@@ -50,7 +50,7 @@ func utilityAvailableSEPAndPoolsListCheckPresence(ctx context.Context, d *schema
req.AccountID = uint64(AccountID.(int))
}
if RGID, ok := d.GetOk("rg_id"); ok {
req.RGID = RGID.(uint64)
req.RGID = uint64(RGID.(int))
}
log.Debugf("utilityAvailableSEPAndPoolsListCheckPresence: load sep and pools list")

View File

@@ -803,7 +803,6 @@ func resourceVinsSchemaMake() map[string]*schema.Schema {
rets["pre_reservations_num"] = &schema.Schema{
Type: schema.TypeInt,
Optional: true,
Default: 32,
}
rets["gid"] = &schema.Schema{
Type: schema.TypeInt,