-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IOPS and bytes preset variables to VOLUME
usage type
#10326
base: main
Are you sure you want to change the base?
Add IOPS and bytes preset variables to VOLUME
usage type
#10326
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10326 +/- ##
============================================
+ Coverage 16.02% 16.03% +0.01%
- Complexity 13147 13161 +14
============================================
Files 5658 5659 +1
Lines 496312 496417 +105
Branches 60109 60109
============================================
+ Hits 79527 79600 +73
- Misses 407943 407968 +25
- Partials 8842 8849 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
...a/src/main/java/org/apache/cloudstack/quota/activationrule/presetvariables/DiskOffering.java
Outdated
Show resolved
Hide resolved
...a/src/main/java/org/apache/cloudstack/quota/activationrule/presetvariables/DiskOffering.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
Description
This PR adds the following preset variables to the activation rules of
VOLUME
Quota tariffs:Disk Offering:
value.diskOffering.bytesReadRate
: returns along
with the bytes read rate of the disk offering;value.diskOffering.bytesReadBurst
: returns along
with the burst bytes read rate of the disk offering;value.diskOffering.bytesReadBurstLength
: returns the length, in seconds, of the bytes read rate burst;value.diskOffering.bytesWriteRate
: returns along
with the bytes write rate of the disk offering;value.diskOffering.bytesWriteBurst
: returns along
with the burst bytes write rate of the disk offering;value.diskOffering.bytesWriteBurstLength
: returns the length, in seconds, of the bytes write rate burst;value.diskOffering.iopsReadRate
: returns along
with the I/O requests read rate of the disk offering;value.diskOffering.iopsReadBurst
: returns along
with the burst I/O requests read rate of the disk offering;value.diskOffering.iopsReadBurstLength
: returns the length, in seconds, of the IOPS read burst in seconds;value.diskOffering.iopsWriteRate
: returns along
with the I/O requests write rate of the disk offering;value.diskOffering.iopsWriteBurst
: returns along
with the burst I/O requests write rate of the disk offering;value.diskOffering.iopsWriteBurstLength
: returns the length, in seconds, of the IOPS write burst.Volume:
value.volumeType
: the volume type. Values can be:UNKNOWN
,ROOT
,SWAP
,DATADISK
andISO
.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
First, I executed the
quotaPresetVariablesList
API using the parameterusagetype=6
, and it listed all the new preset variables.Then, in the
Create Quota Tariff
form, I checked if the presets were available for different usage types by using them in an activation rule and pressing theValidate activation rule
button. As expected, theVOLUME
usage type was the only one that didn't result in an error.Finally, for each preset variable, I created a tariff using them, and the tariff was applied in every case, as expected.