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 b15c2576a7
commit 5923659dba
1 changed files with 4 additions and 2 deletions

View File

@ -1192,8 +1192,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;