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 691be5c60e
commit f8bd05a1e3
1 changed files with 2 additions and 2 deletions

View File

@ -373,11 +373,11 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
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;
}
}