Skip to content

Commit 4040fd6

Browse files
authored
fix(server): use plans default storage tier when creating server (#318)
1 parent c03d6b0 commit 4040fd6

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- In all outputs of `server plans`, sort plans by CPU count, memory amount, and storage size.
1818
- In human readable output of `server plans`, group plans by type.
1919

20+
### Fixed
21+
22+
- 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.
23+
2024
## [3.8.1] - 2024-05-24
2125

2226
### Changed

internal/commands/server/create.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ func (s *createParams) processParams(exec commands.Executor) error {
102102
Storage: osStorage.UUID,
103103
Title: fmt.Sprintf("%s-OS", ui.TruncateText(s.Hostname, 64-7)),
104104
Size: size,
105-
Tier: upcloud.StorageTierMaxIOPS,
106105
Type: upcloud.StorageTypeDisk,
107106
})
108107
}

internal/commands/server/create_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ func TestCreateServer(t *testing.T) {
118118
Storage: StorageDef.UUID,
119119
Title: "example.com-OS",
120120
Size: 50,
121-
Tier: upcloud.StorageTierMaxIOPS,
122121
Type: upcloud.StorageTypeDisk,
123122
}},
124123
},
@@ -148,7 +147,6 @@ func TestCreateServer(t *testing.T) {
148147
Storage: Storage1.UUID,
149148
Title: "example.com-OS",
150149
Size: 100,
151-
Tier: upcloud.StorageTierMaxIOPS,
152150
Type: upcloud.StorageTypeDisk,
153151
}},
154152
},
@@ -207,7 +205,6 @@ func TestCreateServer(t *testing.T) {
207205
Storage: StorageDef.UUID,
208206
Title: "example.com-OS",
209207
Size: 10,
210-
Tier: upcloud.StorageTierMaxIOPS,
211208
Type: upcloud.StorageTypeDisk,
212209
}},
213210
Labels: &upcloud.LabelSlice{upcloud.Label{
@@ -242,7 +239,6 @@ func TestCreateServer(t *testing.T) {
242239
Storage: StorageDef.UUID,
243240
Title: "example.com-OS",
244241
Size: 50,
245-
Tier: upcloud.StorageTierMaxIOPS,
246242
Type: upcloud.StorageTypeDisk,
247243
}},
248244
Labels: &upcloud.LabelSlice{
@@ -289,7 +285,6 @@ func TestCreateServer(t *testing.T) {
289285
Storage: StorageDef.UUID,
290286
Title: "example.com-OS",
291287
Size: 50,
292-
Tier: upcloud.StorageTierMaxIOPS,
293288
Type: upcloud.StorageTypeDisk,
294289
},
295290
request.CreateServerStorageDevice{
@@ -346,7 +341,6 @@ func TestCreateServer(t *testing.T) {
346341
Storage: StorageDef.UUID,
347342
Title: "example.com-OS",
348343
Size: 50,
349-
Tier: upcloud.StorageTierMaxIOPS,
350344
Type: upcloud.StorageTypeDisk,
351345
}},
352346
Networking: &request.CreateServerNetworking{Interfaces: request.CreateServerInterfaceSlice{

0 commit comments

Comments
 (0)