cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/4.4 to 32124df
Date Fri, 09 May 2014 15:07:50 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 703e9f6f4 -> 32124df53


Added fix for CLOUDSTACK-6548

Signed-off-by: santhosh <santhosh.edukulla@gmail.com>
Signed-off-by: Daan Hoogland <daan@onecht.net>


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

Branch: refs/heads/4.4
Commit: 32124df53cf9023507180c8509b6f41f29e9c4ae
Parents: 703e9f6
Author: santhosh <santhosh.edukulla@gmail.com>
Authored: Thu May 8 20:21:09 2014 +1000
Committer: Daan Hoogland <daan@onecht.net>
Committed: Fri May 9 17:07:36 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/32124df5/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 d8ce98e..ec9fa12 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -3968,12 +3968,16 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService
{
         DataCenterVO dc = _dcDao.lockRow(pNtwk.getDataCenterId(), true);
 
         //check if we need to create guest network
-                    Network privateNetwork = _networksDao.getPrivateNetwork(uriString, cidr,
networkOwnerId, pNtwk.getDataCenterId(), networkOfferingId);
+        Network privateNetwork = _networksDao.getPrivateNetwork(uriString, cidr, networkOwnerId,
pNtwk.getDataCenterId(), networkOfferingId);
         if (privateNetwork == null) {
             //create Guest network
-                        privateNetwork = _networkMgr.createGuestNetwork(ntwkOffFinal.getId(),
networkName, displayText, gateway, cidr, uriString, null, owner, null, pNtwk,
+            privateNetwork = _networkMgr.createGuestNetwork(ntwkOffFinal.getId(), networkName,
displayText, gateway, cidr, uriString, null, owner, null, pNtwk,
                                 pNtwk.getDataCenterId(), ACLType.Account, null, vpcId, null,
null, true, null);
-            s_logger.debug("Created private network " + privateNetwork);
+            if (privateNetwork != null) {
+                s_logger.debug("Successfully created guest network " + privateNetwork);
+            } else {
+                throw new CloudRuntimeException("Creating guest network failed");
+            }
         } else {
             s_logger.debug("Private network already exists: " + privateNetwork);
             //Do not allow multiple private gateways with same Vlan within a VPC


Mime
View raw message