mirror of
https://github.com/apache/cloudstack
synced 2026-09-03 01:49:06 +00:00
Throw an exception when can't find network offering during zone creation
This commit is contained in:
parent
f84c81a47d
commit
404b288af4
@ -2348,7 +2348,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
}
|
||||
|
||||
List<NetworkVO> networks = _networksDao.listBy(Account.ACCOUNT_ID_SYSTEM, networkOfferingId, zoneId);
|
||||
if (networks == null) {
|
||||
if (networks == null || networks.isEmpty()) {
|
||||
throw new InvalidParameterValueException("Unable to find network with traffic type " + trafficType + " in zone " + zoneId);
|
||||
}
|
||||
return networks.get(0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user