Updated Branches:
  refs/heads/master f74e63522 -> 1eacd7872

Update resource count for networks only when the network is non system and 
Isolated. Before we used to update the count only when offering had 
specifyVlan=false. And in 4.2 even isolated networks can have this attribute 
set to true, and we have to count them


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

Branch: refs/heads/master
Commit: 1eacd7872e3749eaa470c9fbf6c419b58e121513
Parents: f74e635
Author: Alena Prokharchyk <alena.prokharc...@citrix.com>
Authored: Tue Jun 25 13:31:29 2013 -0700
Committer: Alena Prokharchyk <alena.prokharc...@citrix.com>
Committed: Tue Jun 25 13:46:35 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkManagerImpl.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1eacd787/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 674a35f..8e90cb7 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -2866,7 +2866,9 @@ public class NetworkManagerImpl extends ManagerBase 
implements NetworkManager, L
     }
 
     private boolean resourceCountNeedsUpdate(NetworkOffering ntwkOff, ACLType 
aclType) {
-        boolean updateResourceCount = (!ntwkOff.getSpecifyVlan() && aclType == 
ACLType.Account);
+        //Update resource count only for Isolated account specific non-system 
networks
+        boolean updateResourceCount = (ntwkOff.getGuestType() == 
GuestType.Isolated &&
+                !ntwkOff.isSystemOnly() && aclType == ACLType.Account);
         return updateResourceCount;
     }
 

Reply via email to