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 8126981f85
commit 3e9740c793
1 changed files with 5 additions and 0 deletions

View File

@ -964,6 +964,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)) {