CLOUDSTACK-3914: assignToLoadBalancer - return false, when empty vmIds list is passed in

This commit is contained in:
Alena Prokharchyk 2013-07-29 13:55:33 -07:00
parent a5503de1d1
commit e6ec6137ab

View File

@ -967,6 +967,11 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
}
List<UserVm> vmsToAdd = new ArrayList<UserVm>();
if (instanceIds == null || instanceIds.isEmpty()) {
s_logger.warn("List of vms to assign to the lb, is empty");
return false;
}
for (Long instanceId : instanceIds) {
if (mappedInstanceIds.contains(instanceId)) {