mirror of https://github.com/apache/cloudstack.git
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