mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3914: assignToLoadBalancer - return false, when empty vmIds list is passed in
This commit is contained in:
parent
a5503de1d1
commit
e6ec6137ab
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue