incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [24/43] git commit: refs/heads/javelin - IPv6: Disable untested features
Date Fri, 01 Feb 2013 01:29:17 GMT
IPv6: Disable untested features


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/4adc974a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/4adc974a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/4adc974a

Branch: refs/heads/javelin
Commit: 4adc974ab74c8f79f84e16628660543f4e1afcc6
Parents: ed547d9
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Wed Jan 30 17:07:33 2013 -0800
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Wed Jan 30 17:43:29 2013 -0800

----------------------------------------------------------------------
 .../api/command/user/network/CreateNetworkCmd.java |    4 ++++
 .../api/command/user/vm/DeployVMCmd.java           |    7 +++++++
 .../src/com/cloud/network/NetworkServiceImpl.java  |    4 ----
 3 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4adc974a/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java
b/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java
index 580948a..bbd8b5a 100644
--- a/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java
@@ -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);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4adc974a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
index 8302590..b21b53c 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
@@ -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());
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4adc974a/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index e1c020b..a5fd0e9 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -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;


Mime
View raw message