cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject [12/12] git commit: refs/heads/network-refactor - IPv6: Remove dualstack parameter from createNetworkCmd
Date Thu, 31 Jan 2013 08:43:04 GMT
Updated Branches:
  refs/heads/network-refactor c339c4cec -> 5e3408ee4


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/5e3408ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/5e3408ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/5e3408ee

Branch: refs/heads/network-refactor
Commit: 5e3408ee4a0ea7bc5cd6eaa3e2ce19579164f666
Parents: c57b03d
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 23:48:54 2013 -0800

----------------------------------------------------------------------
 api/src/com/cloud/api/ApiConstants.java            |    1 -
 .../com/cloud/api/commands/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/5e3408ee/api/src/com/cloud/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/ApiConstants.java b/api/src/com/cloud/api/ApiConstants.java
index fa8c979..a0da53e 100755
--- a/api/src/com/cloud/api/ApiConstants.java
+++ b/api/src/com/cloud/api/ApiConstants.java
@@ -425,7 +425,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/5e3408ee/api/src/com/cloud/api/commands/CreateNetworkCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/CreateNetworkCmd.java b/api/src/com/cloud/api/commands/CreateNetworkCmd.java
index 1f214b5..fcc1fa7 100644
--- a/api/src/com/cloud/api/commands/CreateNetworkCmd.java
+++ b/api/src/com/cloud/api/commands/CreateNetworkCmd.java
@@ -120,9 +120,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 ///////////////////////
     /////////////////////////////////////////////////////
@@ -244,13 +241,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/5e3408ee/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 4b051dc..090f364 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -648,7 +648,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);
@@ -765,9 +764,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