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 82cb1095dc
commit 38e26f8dbd

View File

@ -2664,7 +2664,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());