Skip to content

Commit

Permalink
fix(server): use plans default storage tier when creating server (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
kangasta authored Jul 3, 2024
1 parent c03d6b0 commit 4040fd6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- In all outputs of `server plans`, sort plans by CPU count, memory amount, and storage size.
- In human readable output of `server plans`, group plans by type.

### Fixed

- Omit storage tier from server create payload to use plans default storage tier. This allows creating servers with developer plans that do not allow creating MaxIOPS storages with the server. Other plan types will continue to use MaxIOPS by default.

## [3.8.1] - 2024-05-24

### Changed
Expand Down
1 change: 0 additions & 1 deletion internal/commands/server/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ func (s *createParams) processParams(exec commands.Executor) error {
Storage: osStorage.UUID,
Title: fmt.Sprintf("%s-OS", ui.TruncateText(s.Hostname, 64-7)),
Size: size,
Tier: upcloud.StorageTierMaxIOPS,
Type: upcloud.StorageTypeDisk,
})
}
Expand Down
6 changes: 0 additions & 6 deletions internal/commands/server/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ func TestCreateServer(t *testing.T) {
Storage: StorageDef.UUID,
Title: "example.com-OS",
Size: 50,
Tier: upcloud.StorageTierMaxIOPS,
Type: upcloud.StorageTypeDisk,
}},
},
Expand Down Expand Up @@ -148,7 +147,6 @@ func TestCreateServer(t *testing.T) {
Storage: Storage1.UUID,
Title: "example.com-OS",
Size: 100,
Tier: upcloud.StorageTierMaxIOPS,
Type: upcloud.StorageTypeDisk,
}},
},
Expand Down Expand Up @@ -207,7 +205,6 @@ func TestCreateServer(t *testing.T) {
Storage: StorageDef.UUID,
Title: "example.com-OS",
Size: 10,
Tier: upcloud.StorageTierMaxIOPS,
Type: upcloud.StorageTypeDisk,
}},
Labels: &upcloud.LabelSlice{upcloud.Label{
Expand Down Expand Up @@ -242,7 +239,6 @@ func TestCreateServer(t *testing.T) {
Storage: StorageDef.UUID,
Title: "example.com-OS",
Size: 50,
Tier: upcloud.StorageTierMaxIOPS,
Type: upcloud.StorageTypeDisk,
}},
Labels: &upcloud.LabelSlice{
Expand Down Expand Up @@ -289,7 +285,6 @@ func TestCreateServer(t *testing.T) {
Storage: StorageDef.UUID,
Title: "example.com-OS",
Size: 50,
Tier: upcloud.StorageTierMaxIOPS,
Type: upcloud.StorageTypeDisk,
},
request.CreateServerStorageDevice{
Expand Down Expand Up @@ -346,7 +341,6 @@ func TestCreateServer(t *testing.T) {
Storage: StorageDef.UUID,
Title: "example.com-OS",
Size: 50,
Tier: upcloud.StorageTierMaxIOPS,
Type: upcloud.StorageTypeDisk,
}},
Networking: &request.CreateServerNetworking{Interfaces: request.CreateServerInterfaceSlice{
Expand Down

0 comments on commit 4040fd6

Please sign in to comment.