VPC: one more fix for multiple public nic case for the VPC VR

This commit is contained in:
Alena Prokharchyk 2012-07-20 14:08:00 -07:00
parent c0fb2fece9
commit aa6ee7c506
4 changed files with 6 additions and 7 deletions

View File

@ -380,9 +380,9 @@ public interface NetworkManager extends NetworkService {
/**
* @param vm
* @param network
* @param nic TODO
*/
void removeNic(VirtualMachineProfile<? extends VMInstanceVO> vm, Network network);
void removeNic(VirtualMachineProfile<? extends VMInstanceVO> vm, Nic nic);
/**

View File

@ -2502,9 +2502,8 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
}
@Override
public void removeNic(VirtualMachineProfile<? extends VMInstanceVO> vm, Network network) {
NicVO nic = _nicDao.findByInstanceIdAndNetworkId(network.getId(), vm.getVirtualMachine().getId());
removeNic(vm, nic);
public void removeNic(VirtualMachineProfile<? extends VMInstanceVO> vm, Nic nic) {
removeNic(vm, _nicDao.findById(nic.getId()));
}
protected void removeNic(VirtualMachineProfile<? extends VMInstanceVO> vm, NicVO nic) {

View File

@ -2553,7 +2553,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
s_logger.debug("Successfully released nic " + nic + "for vm " + vm);
//3) Remove the nic
_networkMgr.removeNic(vmProfile, network);
_networkMgr.removeNic(vmProfile, nic);
return result;
}

View File

@ -938,7 +938,7 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
* @see com.cloud.network.NetworkManager#removeNic(com.cloud.vm.VirtualMachineProfile, com.cloud.network.Network)
*/
@Override
public void removeNic(VirtualMachineProfile<? extends VMInstanceVO> vm, Network network) {
public void removeNic(VirtualMachineProfile<? extends VMInstanceVO> vm, Nic nic) {
// TODO Auto-generated method stub
}