From 09adc781962f4f302f150a11ff8a6c62d3857ddf Mon Sep 17 00:00:00 2001 From: Vijay Date: Wed, 18 Jul 2012 08:47:32 +0530 Subject: [PATCH] AutoScale. Removed checks for no parameters in update command. --- .../cloud/network/as/AutoScaleManagerImpl.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java index e1249c43860..e7b32286f7f 100644 --- a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java +++ b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java @@ -358,11 +358,6 @@ public class AutoScaleManagerImpl implements AutoScaleService, Manager { AutoScaleVmProfileVO vmProfile = getEntityInDatabase(UserContext.current().getCaller(), "Auto Scale Vm Profile", profileId, _autoScaleVmProfileDao); AutoScaleVmProfileVO bakUpProfile = getEntityInDatabase(UserContext.current().getCaller(), "Auto Scale Vm Profile", profileId, _autoScaleVmProfileDao); - if(templateId == null && otherDeployParams == null) { - //"Atleast one parameter should be passed for update" - return vmProfile; - } - if (templateId != null) { vmProfile.setTemplateId(templateId); } @@ -595,11 +590,6 @@ public class AutoScaleManagerImpl implements AutoScaleService, Manager { List conditionIds = cmd.getConditionIds(); AutoScalePolicyVO policy = getEntityInDatabase(UserContext.current().getCaller(), "Auto Scale Policy", policyId, _autoScalePolicyDao); - if(duration == null && quietTime == null && conditionIds == null) { - //"Atleast one parameter should be passed for update" - return policy; - } - if (duration != null) { policy.setDuration(duration); } @@ -863,11 +853,6 @@ public class AutoScaleManagerImpl implements AutoScaleService, Manager { AutoScaleVmGroupVO vmGroupVO = getEntityInDatabase(UserContext.current().getCaller(), "AutoScale Vm Group", vmGroupId, _autoScaleVmGroupDao); - if(minMembers == null && maxMembers == null && interval == null && scaleUpPolicyIds == null && scaleDownPolicyIds == null) { - //"Atleast one parameter should be passed for update" - return vmGroupVO; - } - if (!vmGroupVO.getState().equals(AutoScaleVmGroup.State_Disabled)) { throw new InvalidParameterValueException("An AutoScale Vm Group can be updated only when it is in disabled state"); }