public IpPool getIpPoolById(Integer poolid, String nwName, Datacenter dc, String dcName) throws RemoteException { if (ipPools == null) { ipPools = ipPoolManager.queryIpPools(dc); if (ipPools == null || ipPools.length == 0) { s_logger.debug(" Datacenter: " + dcName + " IP Pools NOT configured"); return null; } } // refresh cached pools and try again ipPools = ipPoolManager.queryIpPools(dc); if (ipPools == null || ipPools.length == 0) { s_logger.debug(" Datacenter: " + dcName + " IP Pools NOT configured"); return null; } return getIpPool(poolid, nwName); }
public void setIpPoolId(Integer poolId, VCenterDB vcenterDB) throws RuntimeFault, RemoteException { IpPool ipPool = vcenterDB.getIpPoolById(poolId, name, dc, dcName); if (ipPool != null) { IpPoolIpPoolConfigInfo ipConfigInfo = ipPool.getIpv4Config(); subnetAddress = ipConfigInfo.getSubnetAddress(); subnetMask = ipConfigInfo.getNetmask(); gatewayAddress = ipConfigInfo.getGateway(); ipPoolEnabled = ipConfigInfo.getIpPoolEnabled(); range = ipConfigInfo.getRange(); this.ipPoolId = ipPool.id; s_logger.info("Set ipPoolId to " + ipPoolId + " for " + this); } else { subnetAddress = null; subnetMask = null; gatewayAddress = null; ipPoolEnabled = false; range = null; this.ipPoolId = null; s_logger.info("Set ipPoolId to null for " + this); } }
public int createIpPool(Datacenter dc, IpPool pool) throws RuntimeFault, RemoteException { return getVimService().createIpPool(getMOR(), dc.getMOR(), pool); }
public IpPool[] queryIpPools(Datacenter dc) throws RuntimeFault, RemoteException { return getVimService().queryIpPools(getMOR(), dc.getMOR()); }
public void updateIpPool(Datacenter dc, IpPool pool) throws RuntimeFault, RemoteException { getVimService().updateIpPool(getMOR(), dc.getMOR(), pool); }
int createIpPool(Datacenter dc, IpPool pool) throws RuntimeFault, RemoteException;
List<IpPool> queryIpPools(Datacenter dc) throws RuntimeFault, RemoteException;
void updateIpPool(Datacenter dc, IpPool pool) throws RuntimeFault, RemoteException;