Fixed regression in GuestNetworkGuru - get networkId from the network object passed to the method call instead of retrieving it from tne NicProfile when it wasn't set yet

This commit is contained in:
Alena Prokharchyk 2012-08-16 15:45:39 -07:00
parent c5ed65fecc
commit 01f33deca0
1 changed files with 2 additions and 2 deletions

View File

@ -330,11 +330,11 @@ public class GuestNetworkGuru extends AdapterBase implements NetworkGuru {
boolean isGateway = false;
if (vm.getVirtualMachine().getType() == VirtualMachine.Type.DomainRouter) {
if (network.getVpcId() != null) {
if (_networkMgr.isProviderSupportServiceInNetwork(nic.getNetworkId(), Service.SourceNat, Provider.VPCVirtualRouter)) {
if (_networkMgr.isProviderSupportServiceInNetwork(network.getId(), Service.SourceNat, Provider.VPCVirtualRouter)) {
isGateway = true;
}
} else {
if (_networkMgr.isProviderSupportServiceInNetwork(nic.getNetworkId(), Service.SourceNat, Provider.VirtualRouter)) {
if (_networkMgr.isProviderSupportServiceInNetwork(network.getId(), Service.SourceNat, Provider.VirtualRouter)) {
isGateway = true;
}
}