You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add IOPS and bytes preset variables to VOLUME usage type (#10326)
* Add bytes and iops preset variables to volume usage type
* Add new line at the end of file
Co-authored-by: dahn <daan.hoogland@gmail.com>
* Change disk offering preset variable class name
---------
Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
Co-authored-by: dahn <daan.hoogland@gmail.com>
Copy file name to clipboardexpand all lines: framework/quota/src/main/java/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelper.java
+15-2
Original file line number
Diff line number
Diff line change
@@ -492,6 +492,7 @@ protected void loadPresetVariableValueForVolume(UsageVO usageRecord, Value value
@@ -75,7 +76,7 @@ public class Value extends GenericPresetVariable {
75
76
privateGenericPresetVariabletemplate;
76
77
77
78
@PresetVariableDefinition(description = "Disk offering of the volume.", supportedTypes = {QuotaTypes.VOLUME})
78
-
privateGenericPresetVariablediskOffering;
79
+
privateDiskOfferingPresetVariablesdiskOffering;
79
80
80
81
@PresetVariableDefinition(description = "Storage where the volume or snapshot is. While handling with snapshots, this value can be from the primary storage if the global " +
81
82
"setting 'snapshot.backup.to.secondary' is false, otherwise it will be from secondary storage.", supportedTypes = {QuotaTypes.VOLUME, QuotaTypes.SNAPSHOT})
@@ -93,6 +94,10 @@ public class Value extends GenericPresetVariable {
93
94
94
95
@PresetVariableDefinition(description = "The volume format. Values can be: RAW, VHD, VHDX, OVA and QCOW2.", supportedTypes = {QuotaTypes.VOLUME, QuotaTypes.VOLUME_SECONDARY})
95
96
privateStringvolumeFormat;
97
+
98
+
@PresetVariableDefinition(description = "The volume type. Values can be: UNKNOWN, ROOT, SWAP, DATADISK and ISO.", supportedTypes = {QuotaTypes.VOLUME})
99
+
privateVolume.TypevolumeType;
100
+
96
101
privateStringstate;
97
102
98
103
publicHostgetHost() {
@@ -194,11 +199,11 @@ public void setTemplate(GenericPresetVariable template) {
Copy file name to clipboardexpand all lines: framework/quota/src/test/java/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java
+19-5
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,7 @@
76
76
importcom.cloud.storage.Storage.ImageFormat;
77
77
importcom.cloud.storage.Storage.ProvisioningType;
78
78
importcom.cloud.storage.VMTemplateVO;
79
+
importcom.cloud.storage.Volume;
79
80
importcom.cloud.storage.VolumeVO;
80
81
importcom.cloud.storage.dao.DiskOfferingDao;
81
82
importcom.cloud.storage.dao.GuestOSDao;
@@ -208,14 +209,15 @@ private Value getValueForTests() {
0 commit comments