Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 953DEEF23 for ; Tue, 25 Jun 2013 20:56:05 +0000 (UTC) Received: (qmail 62444 invoked by uid 500); 25 Jun 2013 20:56:05 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 62426 invoked by uid 500); 25 Jun 2013 20:56:05 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 62419 invoked by uid 99); 25 Jun 2013 20:56:05 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jun 2013 20:56:05 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3CC801C34D; Tue, 25 Jun 2013 20:56:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: alena1108@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 1eacd78 Date: Tue, 25 Jun 2013 20:56:05 +0000 (UTC) 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 Authored: Tue Jun 25 13:31:29 2013 -0700 Committer: Alena Prokharchyk 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; }