@Override public OVXIPAddress getVirtualIP(final PhysicalIPAddress ip) throws AddressMappingException { OVXIPAddress vip = this.physicalIPMap.getValueForExactKey(ip.toString()); if (vip == null) { throw new AddressMappingException(ip, OVXIPAddress.class); } return vip; }
@Override public boolean hasVirtualIP(PhysicalIPAddress ip) { return this.physicalIPMap.getValueForExactKey(ip.toString()) != null; }
/** * This function will create a map indexed on the key PhysicalIPAddress with value OVXIPAddress. * * @param physicalIP refers to the PhysicalIPAddress which is created using the tenant id and * virtualIP * @param virtualIP the IP address used within the VirtualNetwork */ private void addPhysicalIP(final PhysicalIPAddress physicalIP, final OVXIPAddress virtualIP) { this.physicalIPMap.put(physicalIP.toString(), virtualIP); }