Skip to content

Commit 098cedc

Browse files
committed
Return the IOPS of the candidate which is chosen in the storage distribution algorithm.
Signed-off-by: Aditya Dani <aditya@portworx.com>
1 parent fcd53b3 commit 098cedc

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

azure/azure_storage_management_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func TestAzureStorageDistribution(t *testing.T) {
5151
DriveType: "Premium_LRS",
5252
InstancesPerZone: 2,
5353
DriveCount: 1,
54+
IOPS: 1100,
5455
},
5556
},
5657
}
@@ -83,6 +84,7 @@ func TestAzureStorageDistribution(t *testing.T) {
8384
DriveType: "Premium_LRS",
8485
InstancesPerZone: 1,
8586
DriveCount: 1,
87+
IOPS: 1100,
8688
},
8789
},
8890
}
@@ -113,6 +115,7 @@ func TestAzureStorageDistribution(t *testing.T) {
113115
DriveType: "Premium_LRS",
114116
InstancesPerZone: 3,
115117
DriveCount: 1,
118+
IOPS: 5000,
116119
},
117120
},
118121
}
@@ -143,6 +146,7 @@ func TestAzureStorageDistribution(t *testing.T) {
143146
DriveType: "Premium_LRS",
144147
InstancesPerZone: 2,
145148
DriveCount: 1,
149+
IOPS: 2300,
146150
},
147151
},
148152
}
@@ -174,6 +178,7 @@ func TestAzureStorageDistribution(t *testing.T) {
174178
DriveType: "Premium_LRS",
175179
InstancesPerZone: 2,
176180
DriveCount: 1,
181+
IOPS: 2300,
177182
},
178183
},
179184
}
@@ -204,6 +209,7 @@ func TestAzureStorageDistribution(t *testing.T) {
204209
DriveType: "Premium_LRS",
205210
InstancesPerZone: 1,
206211
DriveCount: 1,
212+
IOPS: 7500,
207213
},
208214
},
209215
}
@@ -257,12 +263,14 @@ func TestAzureStorageDistribution(t *testing.T) {
257263
DriveType: "Premium_LRS",
258264
InstancesPerZone: 1,
259265
DriveCount: 1,
266+
IOPS: 1100,
260267
},
261268
&cloudops.StoragePoolSpec{
262269
DriveCapacityGiB: 1024,
263270
DriveType: "Premium_LRS",
264271
InstancesPerZone: 3,
265272
DriveCount: 1,
273+
IOPS: 5000,
266274
},
267275
},
268276
}

cloud_storage_management.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ type StoragePoolSpec struct {
9393
DriveCount uint32 `json:"drive_count" yaml:"drive_count"`
9494
// InstancesPerZone is the number of instances per zone
9595
InstancesPerZone int `json:"instances_per_zone" yaml:"instances_per_zone"`
96+
// IOPS is the IOPS of the drive
97+
IOPS uint32 `json:"iops" yaml:"iops"`
9698
}
9799

98100
// StorageDistributionResponse is the result returned the CloudStorage Decision Matrix

common/storage_distribution.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ func GetStorageDistribution(
6464
DriveType: candidate.DriveType,
6565
InstancesPerZone: instancePerZone,
6666
DriveCount: candidate.InstanceMinDrives,
67+
IOPS: candidate.IOPS,
6768
},
6869
)
6970

0 commit comments

Comments
 (0)