api: Allow updating VM settings when custom contrained offering is used (#6136)

This commit is contained in:
Pearl Dsilva 2022-03-18 13:39:40 +05:30 committed by GitHub
parent 75b54171ae
commit 4be99fe971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -2647,7 +2647,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
Map<String, String> customParameters = new HashMap<>();
customParameters.put(VmDetailConstants.CPU_NUMBER, String.valueOf(newCpu));
customParameters.put(VmDetailConstants.MEMORY, String.valueOf(newMemory));
customParameters.put(VmDetailConstants.CPU_SPEED, details.get(VmDetailConstants.CPU_SPEED));
if (svcOffering.isCustomCpuSpeedSupported()) {
customParameters.put(VmDetailConstants.CPU_SPEED, details.get(VmDetailConstants.CPU_SPEED));
}
validateCustomParameters(svcOffering, customParameters);
}
if (VirtualMachineManager.ResourceCountRunningVMsonly.value()) {