Skip to content

Commit c4f4563

Browse files
Instance and Template testing
1 parent c8b295f commit c4f4563

File tree

5 files changed

+22
-16
lines changed

5 files changed

+22
-16
lines changed

common/github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6048,7 +6048,7 @@ func (vpc *VpcV1) CreateInstanceWithContext(ctx context.Context, createInstanceO
60486048
}
60496049
builder.AddHeader("Accept", "application/json")
60506050
builder.AddHeader("Content-Type", "application/json")
6051-
6051+
builder.AddQuery("maturity", "development")
60526052
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
60536053
builder.AddQuery("generation", fmt.Sprint(*vpc.Generation))
60546054

@@ -6493,7 +6493,7 @@ func (vpc *VpcV1) CreateInstanceTemplateWithContext(ctx context.Context, createI
64936493
}
64946494
builder.AddHeader("Accept", "application/json")
64956495
builder.AddHeader("Content-Type", "application/json")
6496-
6496+
builder.AddQuery("maturity", "development")
64976497
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
64986498
builder.AddQuery("generation", fmt.Sprint(*vpc.Generation))
64996499

@@ -7070,7 +7070,7 @@ func (vpc *VpcV1) GetInstanceWithContext(ctx context.Context, getInstanceOptions
70707070
builder.AddHeader(headerName, headerValue)
70717071
}
70727072
builder.AddHeader("Accept", "application/json")
7073-
7073+
builder.AddQuery("maturity", "development")
70747074
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
70757075
builder.AddQuery("generation", fmt.Sprint(*vpc.Generation))
70767076

@@ -7663,7 +7663,7 @@ func (vpc *VpcV1) GetInstanceProfileWithContext(ctx context.Context, getInstance
76637663
builder.AddHeader(headerName, headerValue)
76647664
}
76657665
builder.AddHeader("Accept", "application/json")
7666-
7666+
builder.AddQuery("maturity", "development")
76677667
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
76687668
builder.AddQuery("generation", fmt.Sprint(*vpc.Generation))
76697669

@@ -7735,7 +7735,7 @@ func (vpc *VpcV1) GetInstanceTemplateWithContext(ctx context.Context, getInstanc
77357735
builder.AddHeader(headerName, headerValue)
77367736
}
77377737
builder.AddHeader("Accept", "application/json")
7738-
7738+
builder.AddQuery("maturity", "development")
77397739
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
77407740
builder.AddQuery("generation", fmt.Sprint(*vpc.Generation))
77417741

@@ -8336,7 +8336,7 @@ func (vpc *VpcV1) ListInstanceProfilesWithContext(ctx context.Context, listInsta
83368336
builder.AddHeader(headerName, headerValue)
83378337
}
83388338
builder.AddHeader("Accept", "application/json")
8339-
8339+
builder.AddQuery("maturity", "development")
83408340
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
83418341
builder.AddQuery("generation", fmt.Sprint(*vpc.Generation))
83428342

@@ -8399,7 +8399,7 @@ func (vpc *VpcV1) ListInstanceTemplatesWithContext(ctx context.Context, listInst
83998399
builder.AddHeader(headerName, headerValue)
84008400
}
84018401
builder.AddHeader("Accept", "application/json")
8402-
8402+
builder.AddQuery("maturity", "development")
84038403
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
84048404
builder.AddQuery("generation", fmt.Sprint(*vpc.Generation))
84058405

@@ -8536,7 +8536,7 @@ func (vpc *VpcV1) ListInstancesWithContext(ctx context.Context, listInstancesOpt
85368536
builder.AddHeader(headerName, headerValue)
85378537
}
85388538
builder.AddHeader("Accept", "application/json")
8539-
8539+
builder.AddQuery("maturity", "development")
85408540
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
85418541
builder.AddQuery("generation", fmt.Sprint(*vpc.Generation))
85428542
if listInstancesOptions.Start != nil {
@@ -8740,7 +8740,7 @@ func (vpc *VpcV1) UpdateInstanceWithContext(ctx context.Context, updateInstanceO
87408740
if updateInstanceOptions.IfMatch != nil {
87418741
builder.AddHeader("If-Match", fmt.Sprint(*updateInstanceOptions.IfMatch))
87428742
}
8743-
8743+
builder.AddQuery("maturity", "development")
87448744
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
87458745
builder.AddQuery("generation", fmt.Sprint(*vpc.Generation))
87468746

@@ -9151,7 +9151,7 @@ func (vpc *VpcV1) UpdateInstanceTemplateWithContext(ctx context.Context, updateI
91519151
}
91529152
builder.AddHeader("Accept", "application/json")
91539153
builder.AddHeader("Content-Type", "application/merge-patch+json")
9154-
9154+
builder.AddQuery("maturity", "development")
91559155
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
91569156
builder.AddQuery("generation", fmt.Sprint(*vpc.Generation))
91579157

ibm/service/vpc/data_source_ibm_is_instance_profile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ func DataSourceIBMISInstanceProfile() *schema.Resource {
791791
Description: "The type for this profile field.",
792792
},
793793
"default": {
794-
Type: schema.TypeInt,
794+
Type: schema.TypeString,
795795
Computed: true,
796796
Description: "The default volume bandwidth QoS mode for this profile.",
797797
},
@@ -800,7 +800,7 @@ func DataSourceIBMISInstanceProfile() *schema.Resource {
800800
Computed: true,
801801
Description: "The permitted volume bandwidth QoS modes for an instance using this profile.",
802802
Elem: &schema.Schema{
803-
Type: schema.TypeInt,
803+
Type: schema.TypeString,
804804
},
805805
},
806806
},

ibm/service/vpc/data_source_ibm_is_instance_profiles.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ func DataSourceIBMISInstanceProfiles() *schema.Resource {
770770
Description: "The type for this profile field.",
771771
},
772772
"default": {
773-
Type: schema.TypeInt,
773+
Type: schema.TypeString,
774774
Computed: true,
775775
Description: "The default volume bandwidth QoS mode for this profile.",
776776
},
@@ -779,7 +779,7 @@ func DataSourceIBMISInstanceProfiles() *schema.Resource {
779779
Computed: true,
780780
Description: "The permitted volume bandwidth QoS modes for an instance using this profile.",
781781
Elem: &schema.Schema{
782-
Type: schema.TypeInt,
782+
Type: schema.TypeString,
783783
},
784784
},
785785
},

ibm/service/vpc/resource_ibm_is_instance.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7375,7 +7375,7 @@ func instanceUpdate(context context.Context, d *schema.ResourceData, meta interf
73757375

73767376
}
73777377

7378-
if (d.HasChange(isInstanceName) || d.HasChange("confidential_compute_mode") || d.HasChange("enable_secure_boot")) && !d.IsNewResource() {
7378+
if (d.HasChange(isInstanceName) || d.HasChange("confidential_compute_mode") || d.HasChange("enable_secure_boot") || d.HasChange(isInstanceVolumeBandwidthQoSMode)) && !d.IsNewResource() {
73797379
restartNeeded := false
73807380
serverstopped := false
73817381
name := d.Get(isInstanceName).(string)
@@ -7389,6 +7389,12 @@ func instanceUpdate(context context.Context, d *schema.ResourceData, meta interf
73897389
}
73907390
if _, ok := d.GetOkExists("enable_secure_boot"); ok && d.HasChange("enable_secure_boot") {
73917391
instanceCCMPatchModel.EnableSecureBoot = core.BoolPtr(d.Get("enable_secure_boot").(bool))
7392+
restartNeeded = true
7393+
}
7394+
7395+
if _, ok := d.GetOkExists(isInstanceVolumeBandwidthQoSMode); ok && d.HasChange(isInstanceVolumeBandwidthQoSMode) {
7396+
instanceCCMPatchModel.VolumeBandwidthQosMode = core.StringPtr(d.Get(isInstanceVolumeBandwidthQoSMode).(string))
7397+
restartNeeded = true
73927398
}
73937399
if d.HasChange("name") {
73947400
instanceCCMPatchModel.Name = &name

ibm/service/vpc/resource_ibm_is_instance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE
785785
`)
786786
sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100))
787787
totalVolumeBandwidth := 1000
788-
qosMode := "pooled"
788+
qosMode := "weighted"
789789
qosModeUpdated := "weighted"
790790
resource.Test(t, resource.TestCase{
791791
PreCheck: func() { acc.TestAccPreCheck(t) },

0 commit comments

Comments
 (0)