예제 #1
0
 @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;
 }
예제 #2
0
 @Override
 public boolean hasVirtualIP(PhysicalIPAddress ip) {
   return this.physicalIPMap.getValueForExactKey(ip.toString()) != null;
 }
예제 #3
0
 /**
  * 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);
 }