mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Hiding system reserved IP addresses (#4408)
This PR removes system reserved IP addresses from the options of acquiring IP addresses. Choosing any reserved IP address results in an error. The IP addresses should not have been displayed in the first place. Fixes: #4310
This commit is contained in:
parent
3ab43e2edb
commit
18e837516a
@ -1998,6 +1998,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
|
||||
sb.and("vpcId", sb.entity().getVpcId(), SearchCriteria.Op.EQ);
|
||||
sb.and("state", sb.entity().getState(), SearchCriteria.Op.EQ);
|
||||
sb.and("display", sb.entity().isDisplay(), SearchCriteria.Op.EQ);
|
||||
sb.and("forsystemvms", sb.entity().isForSystemVms(), SearchCriteria.Op.EQ);
|
||||
|
||||
if (forLoadBalancing != null && forLoadBalancing) {
|
||||
final SearchBuilder<LoadBalancerVO> lbSearch = _loadbalancerDao.createSearchBuilder();
|
||||
@ -2106,6 +2107,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
|
||||
sc.setParameters("state", state);
|
||||
}
|
||||
|
||||
sc.setParameters( "forsystemvms", false);
|
||||
final Pair<List<IPAddressVO>, Integer> result = _publicIpAddressDao.searchAndCount(sc, searchFilter);
|
||||
return new Pair<List<? extends IpAddress>, Integer>(result.first(), result.second());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user