VPC: resend private gateway as a part of VPC VR start

This commit is contained in:
Alena Prokharchyk 2012-06-22 15:47:15 -07:00
parent 42c17e0131
commit 05332128e9
2 changed files with 6 additions and 3 deletions

View File

@ -1972,9 +1972,8 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
ArrayList<PublicIp> publicIps = providerToIpList.get(provider);
s_logger.debug("Found " + publicIps.size() + " ip(s) to apply as a part of domR " + router + " start.");
if (!publicIps.isEmpty()) {
if (publicIps != null && !publicIps.isEmpty()) {
s_logger.debug("Found " + publicIps.size() + " ip(s) to apply as a part of domR " + router + " start.");
List<RemoteAccessVpn> vpns = new ArrayList<RemoteAccessVpn>();
List<PortForwardingRule> pfRules = new ArrayList<PortForwardingRule>();
List<FirewallRule> staticNatFirewallRules = new ArrayList<FirewallRule>();

View File

@ -778,7 +778,11 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
IpAddressTO ip = new IpAddressTO(Account.ACCOUNT_ID_SYSTEM, guestNic.getIp4Address(), true, false,
true, guestNic.getBroadcastUri().getHost(), guestNic.getGateway(), guestNic.getNetmask(), guestNic.getMacAddress(),
null, networkRate, false);
Network network = _networkMgr.getNetwork(guestNic.getNetworkId());
ip.setTrafficType(network.getTrafficType());
SetSourceNatCommand cmd = new SetSourceNatCommand(ip, true);
cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, getRouterControlIp(router.getId()));
cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());
cmds.addCommand(cmd);
}
}