bug 10447: don't allow to use system networks for vm deployment in Advance zone

status 10447: resolved fixed
This commit is contained in:
alena 2011-06-27 12:29:07 -07:00
parent 3ab96b99af
commit 4e20cfd0ef
1 changed files with 5 additions and 0 deletions

View File

@ -2287,6 +2287,11 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
if (networkOffering.getAvailability() == Availability.Unavailable) {
throw new InvalidParameterValueException("Network id=" + network.getId() + " can't be used; corresponding network offering is " + Availability.Unavailable);
}
//don't allow to use system networks
if (networkOffering.isSystemOnly()) {
throw new InvalidParameterValueException("Network id=" + networkId + " is system only and can't be used for vm deployment");
}
if (requiredOfferingId != null && network.getNetworkOfferingId() == requiredOfferingId.longValue()) {
requiredNetworkOfferingIsPresent = true;