cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [1/4] git commit: canUseForDeploy is always false for system networks
Date Wed, 20 Jun 2012 22:48:03 GMT
Updated Branches:
  refs/heads/master 01f172cd3 -> d2abc0e27


canUseForDeploy is always false for system networks


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

Branch: refs/heads/master
Commit: d2abc0e27586f0a69037bd489f60896604cf8977
Parents: c653b22
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Wed Jun 20 15:42:15 2012 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Wed Jun 20 15:45:14 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d2abc0e2/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 00ceab5..1f306ab 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -2856,12 +2856,16 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService,
Manag
 
     @Override
     public boolean canUseForDeploy(Network network) {
+        if (network.getTrafficType() != TrafficType.Guest) {
+            return false;
+        }
         boolean hasFreeIps = true;
         if (network.getGuestType() == GuestType.Shared) {
             hasFreeIps = _ipAddressDao.countFreeIPsInNetwork(network.getId()) > 0;
         } else {
             hasFreeIps = (getAvailableIps(network, null)).size() > 0;
         }
+       
         return hasFreeIps;
     }
 


Mime
View raw message