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
79e38f0a1f
commit
6a12a1c3cf
|
|
@ -1959,6 +1959,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