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
Removing memoryovercommitratio and cpuovercommitratio parameters from addCluster and updateCluster APIs,
since these can be configurable using updateConfiguration API at cluster level.
By default while creating cluster these values are taken from global configuration parameters.
Copy file name to clipboardExpand all lines: api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java
-23Lines changed: 0 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -81,12 +81,6 @@ public class AddClusterCmd extends BaseCmd {
81
81
@Parameter(name = ApiConstants.VSM_IPADDRESS, type = CommandType.STRING, required = false, description = "the ipaddress of the VSM associated with this cluster")
82
82
privateStringvsmipaddress;
83
83
84
-
@Parameter (name=ApiConstants.CPU_OVERCOMMIT_RATIO, type = CommandType.STRING, required = false , description = "value of the cpu overcommit ratio, defaults to 1")
85
-
privateStringcpuOvercommitRatio;
86
-
87
-
@Parameter(name = ApiConstants.MEMORY_OVERCOMMIT_RATIO, type = CommandType.STRING, required = false, description = "value of the default memory overcommit ratio, defaults to 1")
88
-
privateStringmemoryOvercommitRatio;
89
-
90
84
@Parameter(name = ApiConstants.VSWITCH_TYPE_GUEST_TRAFFIC, type = CommandType.STRING, required = false, description = "Type of virtual switch used for guest traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)")
91
85
privateStringvSwitchTypeGuestTraffic;
92
86
@@ -181,26 +175,9 @@ public void setAllocationState(String allocationState) {
181
175
this.allocationState = allocationState;
182
176
}
183
177
184
-
publicFloatgetCpuOvercommitRatio (){
185
-
if(cpuOvercommitRatio != null){
186
-
returnFloat.parseFloat(cpuOvercommitRatio);
187
-
}
188
-
return1.0f;
189
-
}
190
-
191
-
publicFloatgetMemoryOvercommitRatio(){
192
-
if (memoryOvercommitRatio != null){
193
-
returnFloat.parseFloat(memoryOvercommitRatio);
194
-
}
195
-
return1.0f;
196
-
}
197
-
198
178
@Override
199
179
publicvoidexecute(){
200
180
try {
201
-
if (getMemoryOvercommitRatio().compareTo(1f) < 0 || getCpuOvercommitRatio().compareTo(1f) < 0) {
202
-
thrownewInvalidParameterValueException("cpu and memory overcommit ratios should be greater than or equal to one");
203
-
}
204
181
List<? extendsCluster> result = _resourceService.discoverCluster(this);
0 commit comments