cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/master to 079f920
Date Wed, 26 Jun 2013 22:26:33 GMT
Updated Branches:
  refs/heads/master 7e96bf5f1 -> 079f92049


CreateVPC: validate that the zone exists before checking its attributes


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

Branch: refs/heads/master
Commit: 079f9204941594505bb1ae4dffac2b5e68f13540
Parents: 7e96bf5
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Wed Jun 26 15:25:53 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Wed Jun 26 15:26:20 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/network/vpc/VpcManagerImpl.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/079f9204/server/src/com/cloud/network/vpc/VpcManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcManagerImpl.java b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
index 93413b4..b2cb333 100644
--- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
@@ -595,6 +595,10 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager,
VpcProvis
        
         //Validate zone
         DataCenter zone = _configMgr.getZone(zoneId);
+        if (zone == null) {
+            throw new InvalidParameterValueException("Can't find zone by id specified");
+        }
+        
         if (Grouping.AllocationState.Disabled == zone.getAllocationState() && !_accountMgr.isRootAdmin(caller.getType()))
{
             // See DataCenterVO.java
             PermissionDeniedException ex = new PermissionDeniedException("Cannot perform
this operation since specified Zone is currently disabled");


Mime
View raw message