Skip to content

Commit 1f27357

Browse files
authored
Modified disk type field for oracle cloud-drives to pv-<vpus> in decision matrix(#123)
Signed-off-by: Vinayak Shinde <vinayakshnd@gmail.com>
1 parent 3fa4664 commit 1f27357

5 files changed

Lines changed: 7853 additions & 7853 deletions

File tree

oracle/storagemanager/oracle.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,43 +73,43 @@ func (o *oracleStorageManager) RecommendStoragePoolUpdate(request *cloudops.Stor
7373
func determineIOPSForPool(instStorage *cloudops.StoragePoolSpec, row *cloudops.StorageDecisionMatrixRow) uint64 {
7474
var iopsPerGB, maxIopsPerVol int64
7575
switch row.DriveType {
76-
case "0_vpus":
76+
case "pv-0":
7777
iopsPerGB = 2
7878
maxIopsPerVol = 3000
79-
case "10_vpus":
79+
case "pv-10":
8080
iopsPerGB = 60
8181
maxIopsPerVol = 25000
82-
case "20_vpus":
82+
case "pv-20":
8383
iopsPerGB = 75
8484
maxIopsPerVol = 50000
85-
case "30_vpus":
85+
case "pv-30":
8686
iopsPerGB = 90
8787
maxIopsPerVol = 75000
88-
case "40_vpus":
88+
case "pv-40":
8989
iopsPerGB = 105
9090
maxIopsPerVol = 100000
91-
case "50_vpus":
91+
case "pv-50":
9292
iopsPerGB = 120
9393
maxIopsPerVol = 125000
94-
case "60_vpus":
94+
case "pv-60":
9595
iopsPerGB = 135
9696
maxIopsPerVol = 150000
97-
case "70_vpus":
97+
case "pv-70":
9898
iopsPerGB = 150
9999
maxIopsPerVol = 175000
100-
case "80_vpus":
100+
case "pv-80":
101101
iopsPerGB = 165
102102
maxIopsPerVol = 200000
103-
case "90_vpus":
103+
case "pv-90":
104104
iopsPerGB = 180
105105
maxIopsPerVol = 225000
106-
case "100_vpus":
106+
case "pv-100":
107107
iopsPerGB = 195
108108
maxIopsPerVol = 250000
109-
case "110_vpus":
109+
case "pv-110":
110110
iopsPerGB = 210
111111
maxIopsPerVol = 275000
112-
case "120_vpus":
112+
case "pv-120":
113113
iopsPerGB = 225
114114
maxIopsPerVol = 300000
115115
}

oracle/storagemanager/oracle_test.go

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func storageDistribution(t *testing.T) {
6969
InstanceStorage: []*cloudops.StoragePoolSpec{
7070
&cloudops.StoragePoolSpec{
7171
DriveCapacityGiB: 250,
72-
DriveType: "0_vpus",
72+
DriveType: "pv-0",
7373
InstancesPerZone: 3,
7474
DriveCount: 1,
7575
IOPS: 500,
@@ -99,7 +99,7 @@ func storageDistribution(t *testing.T) {
9999
InstanceStorage: []*cloudops.StoragePoolSpec{
100100
&cloudops.StoragePoolSpec{
101101
DriveCapacityGiB: 14,
102-
DriveType: "0_vpus",
102+
DriveType: "pv-0",
103103
InstancesPerZone: 3,
104104
DriveCount: 8,
105105
IOPS: 28,
@@ -127,7 +127,7 @@ func storageDistribution(t *testing.T) {
127127
InstanceStorage: []*cloudops.StoragePoolSpec{
128128
&cloudops.StoragePoolSpec{
129129
DriveCapacityGiB: 1250,
130-
DriveType: "0_vpus",
130+
DriveType: "pv-0",
131131
InstancesPerZone: 3,
132132
DriveCount: 1,
133133
IOPS: 2500,
@@ -154,7 +154,7 @@ func storageDistribution(t *testing.T) {
154154
InstanceStorage: []*cloudops.StoragePoolSpec{
155155
&cloudops.StoragePoolSpec{
156156
DriveCapacityGiB: 250,
157-
DriveType: "10_vpus",
157+
DriveType: "pv-10",
158158
InstancesPerZone: 2,
159159
DriveCount: 8,
160160
IOPS: 15000,
@@ -182,7 +182,7 @@ func storageDistribution(t *testing.T) {
182182
InstanceStorage: []*cloudops.StoragePoolSpec{
183183
&cloudops.StoragePoolSpec{
184184
DriveCapacityGiB: 349,
185-
DriveType: "0_vpus",
185+
DriveType: "pv-0",
186186
InstancesPerZone: 2,
187187
DriveCount: 1,
188188
IOPS: 698,
@@ -209,7 +209,7 @@ func storageDistribution(t *testing.T) {
209209
InstanceStorage: []*cloudops.StoragePoolSpec{
210210
&cloudops.StoragePoolSpec{
211211
DriveCapacityGiB: 128,
212-
DriveType: "10_vpus",
212+
DriveType: "pv-10",
213213
InstancesPerZone: 2,
214214
DriveCount: 8,
215215
IOPS: 7680,
@@ -248,7 +248,7 @@ func storageUpdate(t *testing.T) {
248248
DesiredCapacity: 1536,
249249
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_RESIZE_DISK,
250250
CurrentDriveSize: 256,
251-
CurrentDriveType: "20_vpus",
251+
CurrentDriveType: "pv-20",
252252
CurrentIOPS: 768,
253253
CurrentDriveCount: 3,
254254
},
@@ -257,7 +257,7 @@ func storageUpdate(t *testing.T) {
257257
InstanceStorage: []*cloudops.StoragePoolSpec{
258258
&cloudops.StoragePoolSpec{
259259
DriveCapacityGiB: 512,
260-
DriveType: "20_vpus",
260+
DriveType: "pv-20",
261261
DriveCount: 3,
262262
IOPS: 38400,
263263
},
@@ -273,7 +273,7 @@ func storageUpdate(t *testing.T) {
273273
DesiredCapacity: 800,
274274
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_RESIZE_DISK,
275275
CurrentDriveSize: 350,
276-
CurrentDriveType: "20_vpus",
276+
CurrentDriveType: "pv-20",
277277
CurrentDriveCount: 2,
278278
TotalDrivesOnNode: 2,
279279
},
@@ -282,7 +282,7 @@ func storageUpdate(t *testing.T) {
282282
InstanceStorage: []*cloudops.StoragePoolSpec{
283283
&cloudops.StoragePoolSpec{
284284
DriveCapacityGiB: 400,
285-
DriveType: "20_vpus",
285+
DriveType: "pv-20",
286286
DriveCount: 2,
287287
IOPS: 30000,
288288
},
@@ -298,7 +298,7 @@ func storageUpdate(t *testing.T) {
298298
DesiredCapacity: 1200,
299299
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_RESIZE_DISK,
300300
CurrentDriveSize: 300,
301-
CurrentDriveType: "20_vpus",
301+
CurrentDriveType: "pv-20",
302302
CurrentDriveCount: 3,
303303
TotalDrivesOnNode: 3,
304304
},
@@ -307,7 +307,7 @@ func storageUpdate(t *testing.T) {
307307
InstanceStorage: []*cloudops.StoragePoolSpec{
308308
&cloudops.StoragePoolSpec{
309309
DriveCapacityGiB: 400,
310-
DriveType: "20_vpus",
310+
DriveType: "pv-20",
311311
DriveCount: 3,
312312
IOPS: 30000,
313313
},
@@ -324,7 +324,7 @@ func storageUpdate(t *testing.T) {
324324
DesiredCapacity: 4096,
325325
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
326326
CurrentDriveSize: 1024,
327-
CurrentDriveType: "50_vpus",
327+
CurrentDriveType: "pv-50",
328328
CurrentDriveCount: 2,
329329
TotalDrivesOnNode: 2,
330330
},
@@ -333,7 +333,7 @@ func storageUpdate(t *testing.T) {
333333
InstanceStorage: []*cloudops.StoragePoolSpec{
334334
&cloudops.StoragePoolSpec{
335335
DriveCapacityGiB: 1024,
336-
DriveType: "50_vpus",
336+
DriveType: "pv-50",
337337
DriveCount: 2,
338338
IOPS: 122880,
339339
},
@@ -349,7 +349,7 @@ func storageUpdate(t *testing.T) {
349349
DesiredCapacity: 3072,
350350
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
351351
CurrentDriveSize: 1024,
352-
CurrentDriveType: "50_vpus",
352+
CurrentDriveType: "pv-50",
353353
CurrentDriveCount: 2,
354354
TotalDrivesOnNode: 2,
355355
},
@@ -358,7 +358,7 @@ func storageUpdate(t *testing.T) {
358358
InstanceStorage: []*cloudops.StoragePoolSpec{
359359
&cloudops.StoragePoolSpec{
360360
DriveCapacityGiB: 1024,
361-
DriveType: "50_vpus",
361+
DriveType: "pv-50",
362362
DriveCount: 1,
363363
IOPS: 122880,
364364
},
@@ -374,7 +374,7 @@ func storageUpdate(t *testing.T) {
374374
DesiredCapacity: 2000,
375375
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
376376
CurrentDriveSize: 600,
377-
CurrentDriveType: "20_vpus",
377+
CurrentDriveType: "pv-20",
378378
CurrentDriveCount: 3,
379379
TotalDrivesOnNode: 3,
380380
},
@@ -383,7 +383,7 @@ func storageUpdate(t *testing.T) {
383383
InstanceStorage: []*cloudops.StoragePoolSpec{
384384
&cloudops.StoragePoolSpec{
385385
DriveCapacityGiB: 600,
386-
DriveType: "20_vpus",
386+
DriveType: "pv-20",
387387
DriveCount: 1,
388388
IOPS: 45000,
389389
},
@@ -405,7 +405,7 @@ func storageUpdate(t *testing.T) {
405405
InstanceStorage: []*cloudops.StoragePoolSpec{
406406
&cloudops.StoragePoolSpec{
407407
DriveCapacityGiB: 700,
408-
DriveType: "0_vpus",
408+
DriveType: "pv-0",
409409
DriveCount: 1,
410410
IOPS: 1400,
411411
},
@@ -459,7 +459,7 @@ func storageUpdate(t *testing.T) {
459459
DesiredCapacity: 280,
460460
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_RESIZE_DISK,
461461
CurrentDriveSize: 256,
462-
CurrentDriveType: "20_vpus",
462+
CurrentDriveType: "pv-20",
463463
CurrentDriveCount: 1,
464464
TotalDrivesOnNode: 1,
465465
},
@@ -468,7 +468,7 @@ func storageUpdate(t *testing.T) {
468468
InstanceStorage: []*cloudops.StoragePoolSpec{
469469
&cloudops.StoragePoolSpec{
470470
DriveCapacityGiB: 280,
471-
DriveType: "20_vpus",
471+
DriveType: "pv-20",
472472
DriveCount: 1,
473473
IOPS: 21000,
474474
},
@@ -484,7 +484,7 @@ func storageUpdate(t *testing.T) {
484484
DesiredCapacity: 400,
485485
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
486486
CurrentDriveSize: 200,
487-
CurrentDriveType: "0_vpus",
487+
CurrentDriveType: "pv-0",
488488
CurrentDriveCount: 1,
489489
TotalDrivesOnNode: 1,
490490
},
@@ -493,7 +493,7 @@ func storageUpdate(t *testing.T) {
493493
InstanceStorage: []*cloudops.StoragePoolSpec{
494494
&cloudops.StoragePoolSpec{
495495
DriveCapacityGiB: 200,
496-
DriveType: "0_vpus",
496+
DriveType: "pv-0",
497497
DriveCount: 1,
498498
IOPS: 400,
499499
},
@@ -509,7 +509,7 @@ func storageUpdate(t *testing.T) {
509509
DesiredCapacity: 401,
510510
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
511511
CurrentDriveSize: 200,
512-
CurrentDriveType: "0_vpus",
512+
CurrentDriveType: "pv-0",
513513
CurrentDriveCount: 2,
514514
TotalDrivesOnNode: 2,
515515
},
@@ -518,7 +518,7 @@ func storageUpdate(t *testing.T) {
518518
InstanceStorage: []*cloudops.StoragePoolSpec{
519519
&cloudops.StoragePoolSpec{
520520
DriveCapacityGiB: 200,
521-
DriveType: "0_vpus",
521+
DriveType: "pv-0",
522522
DriveCount: 1,
523523
IOPS: 400,
524524
},
@@ -534,7 +534,7 @@ func storageUpdate(t *testing.T) {
534534
DesiredCapacity: 401,
535535
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
536536
CurrentDriveSize: 200,
537-
CurrentDriveType: "0_vpus",
537+
CurrentDriveType: "pv-0",
538538
CurrentDriveCount: 3,
539539
TotalDrivesOnNode: 3,
540540
},

oracle/storagemanager/spec/generator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
const (
1212
oracleYamlPath = "oracle.yaml"
13-
vpusSuffix = "_vpus"
13+
vpusPrefix = "pv-"
1414
)
1515

1616
func main() {
@@ -76,7 +76,7 @@ func getMatrixRows(vpu int) []cloudops.StorageDecisionMatrixRow {
7676
row := getCommonRow(0)
7777

7878
for iops := int64(0); iops < int64(maxIopsPerVol); iops = iops + 500 {
79-
row.DriveType = fmt.Sprintf("%d%s", vpu, vpusSuffix)
79+
row.DriveType = fmt.Sprintf("%s%d", vpusPrefix, vpu)
8080
row.MinIOPS = uint64(iops)
8181
row.MaxIOPS = uint64(iops + 500)
8282
row.MinSize = uint64(math.Ceil(float64(row.MinIOPS) / float64(iopsPerGB)))

0 commit comments

Comments
 (0)