You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/06/27 00:26:33 UTC
git commit: updated refs/heads/master to 079f920
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 <al...@citrix.com>
Authored: Wed Jun 26 15:25:53 2013 -0700
Committer: Alena Prokharchyk <al...@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");