harikrishna-patnala commented on a change in pull request #4643:
URL: https://github.com/apache/cloudstack/pull/4643#discussion_r572149114
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -2730,6 +2730,19 @@ public UserVm updateVirtualMachine(long id, String
displayName, String group, Bo
if (isDynamicallyScalable == null) {
isDynamicallyScalable = vm.isDynamicallyScalable();
+ } else {
+ if (isDynamicallyScalable == true) {
+ VMTemplateVO template =
_templateDao.findByIdIncludingRemoved(vm.getTemplateId());
+ if (!template.isDynamicallyScalable()) {
Review comment:
This is part of updateVirtualMachine API. If no option is provided then
we dont have to evaluate the existing dynamic scalability of VM.
If user wants to update the value to "false", meaning VM not to be scalable
this implies a kill switch. No need to evaluate the other values at service
offering or template or global setting. CS can straight away update the VM.
Only If user wants to update the value to "true" meaning VM to be scalable
then CS needs to evaluate whether VM can be marked dynamically scalable based
on other options at other granular levels.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]