public String getLowAddr() { String ans = null; Iterator<NeutronSubnet_IPAllocationPool> i = allocationPools.iterator(); while (i.hasNext()) { NeutronSubnet_IPAllocationPool pool = i.next(); if (ans == null) { ans = pool.getPoolStart(); } else { if (ipVersion == 4) { if (NeutronSubnet_IPAllocationPool.convert(pool.getPoolStart()) < NeutronSubnet_IPAllocationPool.convert(ans)) { ans = pool.getPoolStart(); } } if (ipVersion == 6) { if (NeutronSubnet_IPAllocationPool.convert_V6(pool.getPoolStart()).compareTo(NeutronSubnet_IPAllocationPool.convert_V6(ans)) < 0) { ans = pool.getPoolStart(); } } } } return ans; }
static private Integer poolSize(NeutronSubnet_IPAllocationPool pool) { long bottom = convertIPv4StringToLong(pool.getPoolStart()); long top = convertIPv4StringToLong(pool.getPoolEnd()); int ans = (int) (top-bottom)+1; return new Integer(ans); }
pool.getPoolStart().equalsIgnoreCase(ipAddress))) { if (ipVersion == 4) { if (pool.contains(ipAddress)) {
long lIP = NeutronSubnet_IPAllocationPool.convert(pool.getPoolStart()); long hIP = NeutronSubnet_IPAllocationPool.convert(pool.getPoolEnd()); if (sIP+1 == lIP) { BigInteger lIP = NeutronSubnet_IPAllocationPool.convert_V6(pool.getPoolStart()); BigInteger hIP = NeutronSubnet_IPAllocationPool.convert_V6(pool.getPoolEnd()); if (lIP.compareTo(sIP.add(BigInteger.ONE)) == 0) { allocationPools.remove(hPool); allocationPools.add(new NeutronSubnet_IPAllocationPool( lPool.getPoolStart(), hPool.getPoolEnd()));
int i1; for (i1=1; i1<=snatPoolSize; i1++) { String ipAddr = pool.getPoolStart(); if (i1 == 1) { ip_low = ipAddr;