IPv6: Disable untested features

This commit is contained in:
Sheng Yang 2013-01-30 17:07:33 -08:00
parent ed547d91f7
commit 4adc974ab7
3 changed files with 11 additions and 4 deletions

View File

@ -268,6 +268,10 @@ public class CreateNetworkCmd extends BaseCmd {
@Override
// an exception thrown by createNetwork() will be caught by the dispatcher.
public void execute() throws InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException{
if (getStartIpv6() != null && getStartIp() != null) {
throw new InvalidParameterValueException("Cannot support dualstack at this moment!");
}
Network result = _networkService.createGuestNetwork(this);
if (result != null) {
NetworkResponse response = _responseGenerator.createNetworkResponse(result);

View File

@ -302,6 +302,9 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
if (requestedIpv6 != null) {
requestedIpv6 = requestedIpv6.toLowerCase();
}
if (requestedIpv6 != null) {
throw new InvalidParameterValueException("Cannot support specified IPv6 address!");
}
IpAddresses addrs = new IpAddresses(requestedIp, requestedIpv6);
ipToNetworkMap.put(networkId, addrs);
}
@ -404,6 +407,10 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
@Override
public void create() throws ResourceAllocationException{
try {
if (getIp6Address() != null) {
throw new InvalidParameterValueException("Cannot support specified IPv6 address!");
}
//Verify that all objects exist before passing them to the service
Account owner = _accountService.getActiveAccountById(getEntityOwnerId());

View File

@ -735,10 +735,6 @@ public class NetworkServiceImpl implements NetworkService, Manager {
UserContext.current().setAccountId(owner.getAccountId());
if (startIPv6 != null && startIP != null) {
throw new InvalidParameterValueException("Cannot support dualstack at this moment!");
}
boolean ipv4 = false, ipv6 = false;
if (startIP != null) {
ipv4 = true;