cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [21/43] git commit: refs/heads/javelin - IPv6: Remove dualstack parameter from createNetworkCmd
Date Fri, 01 Feb 2013 01:29:17 GMT
IPv6: Remove dualstack parameter from createNetworkCmd

We can tell if it's dual stack by looking into the startIp and startIpv6.


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

Branch: refs/heads/javelin
Commit: 25ae2e4f3f410e32c5c7a52ab51a570e402e7a0a
Parents: 6b19086
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Wed Jan 30 13:28:46 2013 -0800
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Wed Jan 30 13:35:47 2013 -0800

----------------------------------------------------------------------
 .../org/apache/cloudstack/api/ApiConstants.java    |    1 -
 .../api/command/user/network/CreateNetworkCmd.java |   10 ----------
 .../src/com/cloud/network/NetworkServiceImpl.java  |    6 ++----
 3 files changed, 2 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/25ae2e4f/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 000e1e8..1537478 100644
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -432,7 +432,6 @@ public class ApiConstants {
     public static final String CONDITION_IDS = "conditionids";
     public static final String COUNTERPARAM_LIST = "counterparam";
     public static final String AUTOSCALE_USER_ID = "autoscaleuserid";
-    public static final String DUAL_STACK = "dualstack";
 
     public enum HostDetails {
         all, capacity, events, stats, min;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/25ae2e4f/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 f9969ec..580948a 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
@@ -126,9 +126,6 @@ public class CreateNetworkCmd extends BaseCmd {
     @Parameter(name=ApiConstants.IP6_CIDR, type=CommandType.STRING, description="the CIDR
of IPv6 network, must be at least /64")
     private String ip6Cidr;
 
-    @Parameter(name=ApiConstants.DUAL_STACK, type=CommandType.BOOLEAN, description="The network
is dual-stack(IPv6 and IPv4) or not")
-    private Boolean dualStack;
-    
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -250,13 +247,6 @@ public class CreateNetworkCmd extends BaseCmd {
         return ip6Cidr.toLowerCase();
     }
 
-    public Boolean isDualStack() {
-    	if (dualStack == null) {
-    		return false;
-    	}
-		return dualStack;
-	}
-
 	/////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/25ae2e4f/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 98d9342..e1c020b 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -619,7 +619,6 @@ public class NetworkServiceImpl implements  NetworkService, Manager {
         String endIPv6 = cmd.getEndIpv6();
         String ip6Gateway = cmd.getIp6Gateway();
         String ip6Cidr = cmd.getIp6Cidr();
-        Boolean dualStack = cmd.isDualStack();
 
         // Validate network offering
         NetworkOfferingVO ntwkOff = _networkOfferingDao.findById(networkOfferingId);
@@ -736,9 +735,8 @@ public class NetworkServiceImpl implements  NetworkService, Manager {
 
         UserContext.current().setAccountId(owner.getAccountId());
 
-        // VALIDATE IP INFO
-        if (startIPv6 != null && startIP != null && (dualStack == null ||
dualStack == false)) {
-        	throw new InvalidParameterValueException("Cannot specify both IPv4 and IPv6 address
without set dualStack = true!");
+        if (startIPv6 != null && startIP != null) {
+        	throw new InvalidParameterValueException("Cannot support dualstack at this moment!");
         }
         
         boolean ipv4 = false, ipv6 = false;


Mime
View raw message