VPC: createLB rule - removed duplicated check for ip services when createLB rule

This commit is contained in:
Alena Prokharchyk 2012-07-03 17:34:49 -07:00
parent 3383c79452
commit 1ac1bcb2f6
1 changed files with 4 additions and 3 deletions

View File

@ -738,15 +738,16 @@ public class LoadBalancingRulesManagerImpl<Type> implements LoadBalancingRulesMa
try {
if (ipAddressVO != null) {
if (ipAddressVO.getAssociatedWithNetworkId() == null) {
//set networkId just for verification purposes
//set networkId just for verification purposes
ipAddressVO.setAssociatedWithNetworkId(lb.getNetworkId());
_networkMgr.checkIpForService(ipAddressVO, Service.Lb);
s_logger.debug("The ip is not associated with the network id="+ lb.getNetworkId() + " so assigning");
ipAddressVO = _networkMgr.associateIPToGuestNetwork(ipAddrId, lb.getNetworkId());
boolean perfomedIpAssoc = true;
performedIpAssoc = true;
} else {
_networkMgr.checkIpForService(ipAddressVO, Service.Lb);
}
_networkMgr.checkIpForService(ipAddressVO, Service.Lb);
}
if (lb.getSourceIpAddressId() == null) {