mirror of https://github.com/apache/cloudstack.git
bug 10359: don't allow system network deletion
status 10359: resolved fixed
This commit is contained in:
parent
976aab77bb
commit
336235e5e3
|
|
@ -1956,6 +1956,12 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
if (network == null) {
|
||||
throw new InvalidParameterValueException("unable to find network " + networkId);
|
||||
}
|
||||
|
||||
//don't allow to delete system network
|
||||
NetworkOffering offering = _networkOfferingDao.findByIdIncludingRemoved(network.getNetworkOfferingId());
|
||||
if (offering.isSystemOnly()) {
|
||||
throw new InvalidParameterValueException("Network id=" + networkId + " is system and can't be removed");
|
||||
}
|
||||
|
||||
Account owner = _accountMgr.getAccount(network.getAccountId());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue