mirror of https://github.com/apache/cloudstack.git
Wrap deletePhysicalNetwork in transaction
This commit is contained in:
parent
0f5524dd47
commit
ce433f9df2
|
|
@ -4771,6 +4771,8 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
|
||||
checkIfPhysicalNetworkIsDeletable(physicalNetworkId);
|
||||
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
txn.start();
|
||||
// delete vlans for this zone
|
||||
List<VlanVO> vlans = _vlanDao.listVlansByPhysicalNetworkId(physicalNetworkId);
|
||||
for (VlanVO vlan : vlans) {
|
||||
|
|
@ -4795,6 +4797,8 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
_pNTrafficTypeDao.deleteTrafficTypes(physicalNetworkId);
|
||||
|
||||
boolean success = _physicalNetworkDao.remove(physicalNetworkId);
|
||||
|
||||
txn.commit();
|
||||
|
||||
return success;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue