mirror of https://github.com/apache/cloudstack.git
bug 12556: Check guest network cidr when add pod
This commit is contained in:
parent
08a1d9ece1
commit
5886109fb9
|
|
@ -704,6 +704,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
if (checkPodCIDRs == null || checkPodCIDRs.trim().isEmpty() || Boolean.parseBoolean(checkPodCIDRs)) {
|
||||
checkPodCidrSubnets(zoneId, podId, cidr);
|
||||
checkCidrVlanOverlap(zoneId, cidr);
|
||||
_networkMgr.checkVirtualNetworkCidrOverlap(zoneId, cidr);
|
||||
}
|
||||
|
||||
Grouping.AllocationState allocationState = null;
|
||||
|
|
@ -2703,7 +2704,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
HashMap<Long, List<Object>> currentPodCidrSubnets = _podDao.getCurrentPodCidrSubnets(dcId, skipPod);
|
||||
List<Object> newCidrPair = new ArrayList<Object>();
|
||||
newCidrPair.add(0, getCidrAddress(cidr));
|
||||
newCidrPair.add(1, getCidrSize(cidr));
|
||||
newCidrPair.add(1, (long)getCidrSize(cidr));
|
||||
currentPodCidrSubnets.put(new Long(-1), newCidrPair);
|
||||
|
||||
String zoneName = getZoneName(dcId);
|
||||
|
|
|
|||
|
|
@ -271,4 +271,6 @@ public interface NetworkManager extends NetworkService {
|
|||
public Map<Provider, ArrayList<PublicIp>> getProviderToIpList(Network network, Map<PublicIp, Set<Service>> ipToServices);
|
||||
|
||||
public boolean checkIpForService(IPAddressVO ip, Service service);
|
||||
|
||||
void checkVirtualNetworkCidrOverlap(Long zoneId, String cidr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2017,6 +2017,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
return Integer.parseInt(cidrPair[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkVirtualNetworkCidrOverlap(Long zoneId, String cidr) {
|
||||
if (zoneId == null) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue