VPC: CS-15548 - don't plug the nic for guest network to router when network not in Implemented state

This commit is contained in:
Alena Prokharchyk 2012-07-11 15:03:57 -07:00
parent b727c58497
commit be4185338f
1 changed files with 4 additions and 2 deletions

View File

@ -1206,8 +1206,10 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
//2) allocate nic for guest gateway if needed
List<? extends Network> guestNetworks = _vpcMgr.getVpcNetworks(vpcId);
for (Network guestNetwork : guestNetworks) {
NicProfile guestNic = createGuestNicProfileForVpcRouter(guestNetwork);
networks.add(new Pair<NetworkVO, NicProfile>((NetworkVO) guestNetwork, guestNic));
if (guestNetwork.getState() == Network.State.Implemented) {
NicProfile guestNic = createGuestNicProfileForVpcRouter(guestNetwork);
networks.add(new Pair<NetworkVO, NicProfile>((NetworkVO) guestNetwork, guestNic));
}
}
return networks;