You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by we...@apache.org on 2022/03/18 08:14:53 UTC
[cloudstack] branch 4.16 updated: api: Allow updating VM settings when custom contrained offering is used (#6136)
This is an automated email from the ASF dual-hosted git repository.
weizhou pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.16 by this push:
new 4be99fe api: Allow updating VM settings when custom contrained offering is used (#6136)
4be99fe is described below
commit 4be99fe971eaba8d129d6dac18354a222a146b3f
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Fri Mar 18 13:39:40 2022 +0530
api: Allow updating VM settings when custom contrained offering is used (#6136)
---
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
index 44cc2dd..3feaa58 100644
--- a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
@@ -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()) {