bug 10553: allow networkDomain update for Guest system network in Basic zone

status 10553: resolved fixed
This commit is contained in:
alena 2011-07-06 10:51:20 -07:00
parent 1c73e378da
commit 01a47e0717
3 changed files with 2 additions and 4 deletions

View File

@ -25,7 +25,6 @@ import com.cloud.api.BaseCmd;
import com.cloud.api.Implementation; import com.cloud.api.Implementation;
import com.cloud.api.Parameter; import com.cloud.api.Parameter;
import com.cloud.api.ServerApiException; import com.cloud.api.ServerApiException;
import com.cloud.api.BaseCmd.CommandType;
import com.cloud.api.response.ZoneResponse; import com.cloud.api.response.ZoneResponse;
import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter;
import com.cloud.user.Account; import com.cloud.user.Account;

View File

@ -27,7 +27,6 @@ import com.cloud.api.BaseCmd;
import com.cloud.api.Implementation; import com.cloud.api.Implementation;
import com.cloud.api.Parameter; import com.cloud.api.Parameter;
import com.cloud.api.ServerApiException; import com.cloud.api.ServerApiException;
import com.cloud.api.BaseCmd.CommandType;
import com.cloud.api.response.NetworkResponse; import com.cloud.api.response.NetworkResponse;
import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.InsufficientCapacityException;

View File

@ -2917,9 +2917,9 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
throw new InvalidParameterException("Unable to support more than one tag on network yet"); throw new InvalidParameterException("Unable to support more than one tag on network yet");
} }
// Don't allow to update system network // Don't allow to update system network - make an exception for the Guest network in Basic zone
NetworkOffering offering = _networkOfferingDao.findByIdIncludingRemoved(network.getNetworkOfferingId()); NetworkOffering offering = _networkOfferingDao.findByIdIncludingRemoved(network.getNetworkOfferingId());
if (offering.isSystemOnly()) { if (offering.isSystemOnly() && network.getTrafficType() != TrafficType.Guest) {
throw new InvalidParameterValueException("Can't update system networks"); throw new InvalidParameterValueException("Can't update system networks");
} }