cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kis...@apache.org
Subject [1/3] git commit: updated refs/heads/master-6-17-stable to 4aa3a5e
Date Thu, 04 Jul 2013 10:48:43 GMT
Updated Branches:
  refs/heads/4.2 812f9442f -> 0de3a1178
  refs/heads/master 248bea8b2 -> 7a8d7eaa6
  refs/heads/master-6-17-stable 298f52161 -> 4aa3a5e24


CLOUDSTACK-3172: Allow creation of private gateway with same Vlan in different VPCs


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

Branch: refs/heads/master-6-17-stable
Commit: 4aa3a5e240d0c1d6cf91df29bcb939001db79ada
Parents: 298f521
Author: Kishan Kavala <kishan@cloud.com>
Authored: Thu Jul 4 16:08:18 2013 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Thu Jul 4 16:09:17 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkServiceImpl.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4aa3a5e2/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 8cdcfde..385cfb6 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -3906,8 +3906,11 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService
{
             s_logger.debug("Created private network " + privateNetwork);
         } else {
             s_logger.debug("Private network already exists: " + privateNetwork);
-            throw new InvalidParameterValueException("Private network for the vlan: " + vlan
+ " and cidr  "+ cidr +"  already exists " +
-                    " in zone " + _configMgr.getZone(pNtwk.getDataCenterId()).getName());
+            //Do not allow multiple private gateways with same Vlan within a VPC
+            if(vpcId.equals(privateNetwork.getVpcId())){
+                throw new InvalidParameterValueException("Private network for the vlan: "
+ vlan + " and cidr  "+ cidr +"  already exists " +
+                        "for Vpc "+vpcId+" in zone " + _configMgr.getZone(pNtwk.getDataCenterId()).getName());
+            }
         }
 
         //add entry to private_ip_address table


Mime
View raw message