Skip to content

Commit

Permalink
[Fix] CCE: Fix CCE Nodepool Update (#2743)
Browse files Browse the repository at this point in the history
[Fix] CCE: Fix CCE Nodepool Update

Summary of the Pull Request
Fixes change in nodepool update function.
PR Checklist

 Refers to: #2726
 Tests added/passed.
 Release notes added.

Acceptance Steps Performed
=== RUN   TestAccCCENodePoolsV3_basic
=== PAUSE TestAccCCENodePoolsV3_basic
=== CONT  TestAccCCENodePoolsV3_basic
    resource_opentelekomcloud_cce_node_pool_v3_test.go:45: Cluster is required by the test. 1 test(s) are using cluster.
    cluster.go:121: starting creating shared cluster
2024/11/22 15:03:14 [DEBUG] Waiting for state to become: [Available]
2024/11/22 15:03:20 [TRACE] Waiting 3s before next try
2024/11/22 15:03:23 [TRACE] Waiting 6s before next try
2024/11/22 15:03:29 [TRACE] Waiting 10s before next try
...
2024/11/22 15:08:05 [TRACE] Waiting 10s before next try
2024/11/22 15:08:15 [TRACE] Waiting 10s before next try
    cluster.go:117: Cluster usage is 0 now, ready to delete the cluster
    cluster.go:80: starting deleting shared cluster
--- PASS: TestAccCCENodePoolsV3_basic (844.05s)
PASS

Reviewed-by: Anton Sidelnikov
  • Loading branch information
muneeb-jan authored Nov 23, 2024
1 parent 1c5af71 commit f6e8b63
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/jmespath/go-jmespath v0.4.0
github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4
github.com/mitchellh/go-homedir v1.1.0
github.com/opentelekomcloud/gophertelekomcloud v0.9.4-0.20241118132450-dc76c6a2c167
github.com/opentelekomcloud/gophertelekomcloud v0.9.4-0.20241122132702-9656a4ef9527
github.com/unknwon/com v1.0.1
golang.org/x/crypto v0.23.0
golang.org/x/sync v0.1.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/opentelekomcloud/gophertelekomcloud v0.9.4-0.20241118132450-dc76c6a2c167 h1:GqhKpfQ3NWgC04oedIjK2QPOkkfHRSZlgLuzqIawAbE=
github.com/opentelekomcloud/gophertelekomcloud v0.9.4-0.20241118132450-dc76c6a2c167/go.mod h1:M1F6OfSRZRzAmAFKQqSLClX952at5hx5rHe4UTEykgg=
github.com/opentelekomcloud/gophertelekomcloud v0.9.4-0.20241122132702-9656a4ef9527 h1:XdmNPg09iH+T6SUikh1WT/3BbFBKXGfkuDLgUujyl/k=
github.com/opentelekomcloud/gophertelekomcloud v0.9.4-0.20241122132702-9656a4ef9527/go.mod h1:M1F6OfSRZRzAmAFKQqSLClX952at5hx5rHe4UTEykgg=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,15 +556,12 @@ func resourceCCENodePoolV3Update(ctx context.Context, d *schema.ResourceData, me
}

updateOpts := nodepools.UpdateOpts{
Kind: "NodePool",
ApiVersion: "v3",
Metadata: nodepools.UpdateMetaData{
Name: d.Get("name").(string),
},
Spec: nodepools.UpdateSpec{
Type: "vm",
InitialNodeCount: d.Get("initial_node_count").(int),
Autoscaling: nodepools.AutoscalingSpec{
Autoscaling: nodepools.UpdateAutoscalingSpec{
Enable: d.Get("scale_enable").(bool),
MinNodeCount: d.Get("min_node_count").(int),
MaxNodeCount: d.Get("max_node_count").(int),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
**[CCE]** Removed discarded parameters in ``resource/opentelekomcloud_cce_node_pool_v3`` (`#2743 <https://github.com/opentelekomcloud/terraform-provider-opentelekomcloud/pull/2743>`_)

0 comments on commit f6e8b63

Please sign in to comment.