incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [14/44] git commit: VPC: CS-15774 - VPC and guest networks of VPC should belong to the same zone
Date Thu, 02 Aug 2012 02:08:32 GMT
VPC: CS-15774 - VPC and guest networks of VPC should belong to the same zone


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

Branch: refs/heads/vpc
Commit: 70713043cfde5f71febaab649d1a0268e155ea65
Parents: 9be0a55
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Tue Jul 31 10:37:47 2012 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Wed Aug 1 18:20:43 2012 -0700

----------------------------------------------------------------------
 .../src/com/cloud/network/NetworkManagerImpl.java  |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/70713043/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index e022ea3..3f088e6 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -2866,6 +2866,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService,
Manag
         if (networkDomain == null) {
             networkDomain = vpc.getNetworkDomain();
         }
+        
+        if (vpc.getZoneId() != zoneId) {
+            throw new InvalidParameterValueException("New network doesn't belong to vpc zone",
null);
+        }
+        
         //1) Validate if network can be created for VPC
         _vpcMgr.validateGuestNtkwForVpc(_configMgr.getNetworkOffering(ntwkOffId), cidr, networkDomain,
owner, vpc, null, gateway);
         //2) Create network


Mime
View raw message