Skip to content

Commit

Permalink
Revert "feat: add cloud provider to output for compute pool commands" (
Browse files Browse the repository at this point in the history
  • Loading branch information
brianstrauch authored Dec 4, 2023
1 parent 23dcf93 commit 3c2be7f
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 27 deletions.
1 change: 0 additions & 1 deletion internal/flink/command_compute_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ type computePoolOut struct {
Name string `human:"Name" serialized:"name"`
CurrentCfu int32 `human:"Current CFU" serialized:"currrent_cfu"`
MaxCfu int32 `human:"Max CFU" serialized:"max_cfu"`
Cloud string `human:"Cloud" serialized:"cloud"`
Region string `human:"Region" serialized:"region"`
Status string `human:"Status" serialized:"status"`
}
Expand Down
1 change: 0 additions & 1 deletion internal/flink/command_compute_pool_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func (c *command) computePoolCreate(cmd *cobra.Command, args []string) error {
Name: computePool.Spec.GetDisplayName(),
CurrentCfu: computePool.Status.GetCurrentCfu(),
MaxCfu: computePool.Spec.GetMaxCfu(),
Cloud: computePool.Spec.GetCloud(),
Region: computePool.Spec.GetRegion(),
Status: computePool.Status.GetPhase(),
})
Expand Down
1 change: 0 additions & 1 deletion internal/flink/command_compute_pool_describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func (c *command) computePoolDescribe(cmd *cobra.Command, args []string) error {
Name: computePool.Spec.GetDisplayName(),
CurrentCfu: computePool.Status.GetCurrentCfu(),
MaxCfu: computePool.Spec.GetMaxCfu(),
Cloud: computePool.Spec.GetCloud(),
Region: computePool.Spec.GetRegion(),
Status: computePool.Status.GetPhase(),
})
Expand Down
1 change: 0 additions & 1 deletion internal/flink/command_compute_pool_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ func (c *command) computePoolList(cmd *cobra.Command, _ []string) error {
Name: computePool.Spec.GetDisplayName(),
CurrentCfu: computePool.Status.GetCurrentCfu(),
MaxCfu: computePool.Spec.GetMaxCfu(),
Cloud: computePool.Spec.GetCloud(),
Region: computePool.Spec.GetRegion(),
Status: computePool.Status.GetPhase(),
})
Expand Down
1 change: 0 additions & 1 deletion internal/flink/command_compute_pool_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ func (c *command) computePoolUpdate(cmd *cobra.Command, args []string) error {
Name: updatedComputePool.Spec.GetDisplayName(),
CurrentCfu: computePool.Status.GetCurrentCfu(),
MaxCfu: updatedComputePool.Spec.GetMaxCfu(),
Cloud: computePool.Spec.GetCloud(),
Region: computePool.Spec.GetRegion(),
Status: computePool.Status.GetPhase(),
})
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/output/flink/compute-pool/create.golden
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
| Name | my-compute-pool |
| Current CFU | 0 |
| Max CFU | 5 |
| Cloud | AWS |
| Region | us-west-2 |
| Status | PROVISIONING |
+-------------+-----------------+
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
| Name | my-compute-pool-1 |
| Current CFU | 0 |
| Max CFU | 1 |
| Cloud | AWS |
| Region | us-west-2 |
| Status | PROVISIONED |
+-------------+-------------------+
1 change: 0 additions & 1 deletion test/fixtures/output/flink/compute-pool/describe.golden
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
| Name | my-compute-pool-1 |
| Current CFU | 0 |
| Max CFU | 1 |
| Cloud | AWS |
| Region | us-west-2 |
| Status | PROVISIONED |
+-------------+-------------------+
8 changes: 4 additions & 4 deletions test/fixtures/output/flink/compute-pool/list-after-use.golden
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Current | ID | Name | Current CFU | Max CFU | Cloud | Region | Status
----------+-------------+-------------------+-------------+---------+-------+-----------+--------------
* | lfcp-123456 | my-compute-pool-1 | 0 | 1 | AWS | us-west-1 | PROVISIONED
| lfcp-222222 | my-compute-pool-2 | 0 | 2 | AWS | us-west-2 | PROVISIONED
Current | ID | Name | Current CFU | Max CFU | Region | Status
----------+-------------+-------------------+-------------+---------+-----------+--------------
* | lfcp-123456 | my-compute-pool-1 | 0 | 1 | us-west-1 | PROVISIONED
| lfcp-222222 | my-compute-pool-2 | 0 | 2 | us-west-2 | PROVISIONED
6 changes: 3 additions & 3 deletions test/fixtures/output/flink/compute-pool/list-region.golden
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Current | ID | Name | Current CFU | Max CFU | Cloud | Region | Status
----------+-------------+-------------------+-------------+---------+-------+-----------+--------------
| lfcp-222222 | my-compute-pool-2 | 0 | 2 | AWS | us-west-2 | PROVISIONED
Current | ID | Name | Current CFU | Max CFU | Region | Status
----------+-------------+-------------------+-------------+---------+-----------+--------------
| lfcp-222222 | my-compute-pool-2 | 0 | 2 | us-west-2 | PROVISIONED
8 changes: 4 additions & 4 deletions test/fixtures/output/flink/compute-pool/list.golden
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Current | ID | Name | Current CFU | Max CFU | Cloud | Region | Status
----------+-------------+-------------------+-------------+---------+-------+-----------+--------------
| lfcp-123456 | my-compute-pool-1 | 0 | 1 | AWS | us-west-1 | PROVISIONED
| lfcp-222222 | my-compute-pool-2 | 0 | 2 | AWS | us-west-2 | PROVISIONED
Current | ID | Name | Current CFU | Max CFU | Region | Status
----------+-------------+-------------------+-------------+---------+-----------+--------------
| lfcp-123456 | my-compute-pool-1 | 0 | 1 | us-west-1 | PROVISIONED
| lfcp-222222 | my-compute-pool-2 | 0 | 2 | us-west-2 | PROVISIONED
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
| Name | my-compute-pool-1 |
| Current CFU | 0 |
| Max CFU | 5 |
| Cloud | AWS |
| Region | us-west-2 |
| Status | PROVISIONED |
+-------------+-------------------+
1 change: 0 additions & 1 deletion test/fixtures/output/flink/compute-pool/update.golden
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
| Name | my-compute-pool-1 |
| Current CFU | 0 |
| Max CFU | 5 |
| Cloud | AWS |
| Region | us-west-2 |
| Status | PROVISIONED |
+-------------+-------------------+
6 changes: 0 additions & 6 deletions test/test-server/fcpm_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package testserver
import (
"encoding/json"
"net/http"
"strings"
"testing"

"github.com/gorilla/mux"
Expand All @@ -24,7 +23,6 @@ func handleFcpmComputePools(t *testing.T) http.HandlerFunc {
DisplayName: flinkv2.PtrString("my-compute-pool-1"),
MaxCfu: flinkv2.PtrInt32(1),
Region: flinkv2.PtrString("us-west-1"),
Cloud: flinkv2.PtrString("AWS"),
},
Status: &flinkv2.FcpmV2ComputePoolStatus{Phase: "PROVISIONED"},
}
Expand All @@ -34,7 +32,6 @@ func handleFcpmComputePools(t *testing.T) http.HandlerFunc {
DisplayName: flinkv2.PtrString("my-compute-pool-2"),
MaxCfu: flinkv2.PtrInt32(2),
Region: flinkv2.PtrString("us-west-2"),
Cloud: flinkv2.PtrString("AWS"),
},
Status: &flinkv2.FcpmV2ComputePoolStatus{Phase: "PROVISIONED"},
}
Expand All @@ -48,7 +45,6 @@ func handleFcpmComputePools(t *testing.T) http.HandlerFunc {
create := new(flinkv2.FcpmV2ComputePool)
err := json.NewDecoder(r.Body).Decode(create)
require.NoError(t, err)
create.Spec.Cloud = flinkv2.PtrString(strings.ToUpper(create.Spec.GetCloud()))

v = flinkv2.FcpmV2ComputePool{
Id: flinkv2.PtrString("lfcp-123456"),
Expand Down Expand Up @@ -79,7 +75,6 @@ func handleFcpmComputePoolsId(t *testing.T) http.HandlerFunc {
DisplayName: flinkv2.PtrString("my-compute-pool-1"),
HttpEndpoint: flinkv2.PtrString(TestFlinkGatewayUrl.String()),
MaxCfu: flinkv2.PtrInt32(1),
Cloud: flinkv2.PtrString("AWS"),
Region: flinkv2.PtrString("us-west-2"),
},
Status: &flinkv2.FcpmV2ComputePoolStatus{Phase: "PROVISIONED"},
Expand All @@ -97,7 +92,6 @@ func handleFcpmComputePoolsId(t *testing.T) http.HandlerFunc {
Spec: &flinkv2.FcpmV2ComputePoolSpec{
DisplayName: flinkv2.PtrString("my-compute-pool-1"),
MaxCfu: flinkv2.PtrInt32(update.Spec.GetMaxCfu()),
Cloud: flinkv2.PtrString("AWS"),
Region: flinkv2.PtrString("us-west-2"),
},
Status: &flinkv2.FcpmV2ComputePoolStatus{Phase: "PROVISIONED"},
Expand Down

0 comments on commit 3c2be7f

Please sign in to comment.