IpAssoc: when set ROUTER_GUEST_IP, get network id from associatedNetworkId field of the ip address instead of networkId as networkId is the id of the public network the ip belongs to

Reviewed-by: Sheng Yang
This commit is contained in:
Alena Prokharchyk 2012-08-27 16:08:05 -07:00
parent 8ede202718
commit 828c5a9f40
1 changed files with 1 additions and 1 deletions

View File

@ -2751,7 +2751,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
}
IpAssocCommand cmd = new IpAssocCommand(ipsToSend);
cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, getRouterControlIp(router.getId()));
cmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, getRouterIpInNetwork(ipAddrList.get(0).getNetworkId(), router.getId()));
cmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, getRouterIpInNetwork(ipAddrList.get(0).getAssociatedWithNetworkId(), router.getId()));
cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());
DataCenterVO dcVo = _dcDao.findById(router.getDataCenterIdToDeployIn());
cmd.setAccessDetail(NetworkElementCommand.ZONE_NETWORK_TYPE, dcVo.getNetworkType().toString());