mirror of https://github.com/apache/cloudstack.git
VPC: one more fix for multiple public nic case for the VPC VR
This commit is contained in:
parent
c0fb2fece9
commit
aa6ee7c506
|
|
@ -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);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue