4.9.0
This commit is contained in:
@@ -355,10 +355,6 @@ func dataSourceRgSchemaMake() map[string]*schema.Schema {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"register_computes": {
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
},
|
||||
"resource_limits": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
|
||||
@@ -202,10 +202,6 @@ func dataSourceRgListSchemaMake() map[string]*schema.Schema {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"register_computes": {
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
},
|
||||
"resource_limits": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
|
||||
@@ -199,10 +199,6 @@ func dataSourceRgListDeletedSchemaMake() map[string]*schema.Schema {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"register_computes": {
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
},
|
||||
"resource_limits": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
|
||||
@@ -106,7 +106,6 @@ func flattenResgroup(d *schema.ResourceData, details rg.RecordResourceGroup) err
|
||||
d.Set("rg_id", details.ID)
|
||||
d.Set("lock_status", details.LockStatus)
|
||||
d.Set("milestones", details.Milestones)
|
||||
d.Set("register_computes", details.RegisterComputes)
|
||||
d.Set("res_types", details.ResTypes)
|
||||
d.Set("secret", details.Secret)
|
||||
d.Set("status", details.Status)
|
||||
@@ -193,7 +192,6 @@ func flattenRg(d *schema.ResourceData, itemRg rg.RecordResourceGroup) {
|
||||
d.Set("lock_status", itemRg.LockStatus)
|
||||
d.Set("milestones", itemRg.Milestones)
|
||||
d.Set("name", itemRg.Name)
|
||||
d.Set("register_computes", itemRg.RegisterComputes)
|
||||
d.Set("res_types", itemRg.ResTypes)
|
||||
d.Set("resource_limits", flattenRgResourceLimits(itemRg.ResourceLimits))
|
||||
d.Set("secret", itemRg.Secret)
|
||||
@@ -245,7 +243,6 @@ func flattenRgList(rgl *rg.ListResourceGroups) []map[string]interface{} {
|
||||
"lock_status": rg.LockStatus,
|
||||
"milestones": rg.Milestones,
|
||||
"name": rg.Name,
|
||||
"register_computes": rg.RegisterComputes,
|
||||
"resource_limits": flattenRgResourceLimits(rg.ResourceLimits),
|
||||
"secret": rg.Secret,
|
||||
"status": rg.Status,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -160,10 +160,6 @@ func resourceResgroupCreate(ctx context.Context, d *schema.ResourceData, m inter
|
||||
req.ExtIP = extIp.(string)
|
||||
}
|
||||
|
||||
if regComputes, ok := d.GetOk("register_computes"); ok {
|
||||
req.RegisterComputes = regComputes.(bool)
|
||||
}
|
||||
|
||||
apiResp, err := c.CloudAPI().RG().Create(ctx, req)
|
||||
if err != nil {
|
||||
return diag.FromErr(err)
|
||||
@@ -404,7 +400,7 @@ func resourceResgroupUpdate(ctx context.Context, d *schema.ResourceData, m inter
|
||||
return diag.FromErr(fmt.Errorf("resourceResgroupUpdate: RG ID %s: changing ext_net_id for existing RG is not allowed", d.Id()))
|
||||
}
|
||||
|
||||
if d.HasChanges("name", "quota", "description", "register_computes", "uniq_pools") {
|
||||
if d.HasChanges("name", "quota", "description", "uniq_pools") {
|
||||
if err := utilityUpdateRG(ctx, d, m, rgData.ID); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
@@ -696,12 +692,6 @@ func ResourceRgSchemaMake() map[string]*schema.Schema {
|
||||
Default: false,
|
||||
Description: "Set to True if you want force delete non-empty RG",
|
||||
},
|
||||
"register_computes": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
Default: false,
|
||||
Description: "Register computes in registration system",
|
||||
},
|
||||
"restore": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
|
||||
@@ -129,11 +129,6 @@ func utilityUpdateRG(ctx context.Context, d *schema.ResourceData, m interface{},
|
||||
req.Description = d.Get("description").(string)
|
||||
}
|
||||
|
||||
if d.HasChange("register_computes") {
|
||||
log.Debugf("resourceResgroupUpdate: register_computes specified - looking for deltas from the old settings.")
|
||||
req.RegisterComputes = d.Get("register_computes").(bool)
|
||||
}
|
||||
|
||||
if d.HasChange("uniq_pools") {
|
||||
uniqPools := d.Get("uniq_pools").([]interface{})
|
||||
if len(uniqPools) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user