From d73bf096c0f54508f1d25a27a0a53251d0693d77 Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Wed, 14 Sep 2011 22:52:30 +0530 Subject: [PATCH] bug 11425: dont count direct IP in resource count while updating resource count through API status 11425: resolved fixed --- server/src/com/cloud/network/dao/IPAddressDaoImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/com/cloud/network/dao/IPAddressDaoImpl.java b/server/src/com/cloud/network/dao/IPAddressDaoImpl.java index 1053549a22f..e09ef0bd19b 100644 --- a/server/src/com/cloud/network/dao/IPAddressDaoImpl.java +++ b/server/src/com/cloud/network/dao/IPAddressDaoImpl.java @@ -105,6 +105,7 @@ public class IPAddressDaoImpl extends GenericDaoBase implemen AllocatedIpCountForAccount.select(null, Func.COUNT, AllocatedIpCountForAccount.entity().getAddress()); AllocatedIpCountForAccount.and("account", AllocatedIpCountForAccount.entity().getAllocatedToAccountId(), Op.EQ); AllocatedIpCountForAccount.and("allocated", AllocatedIpCountForAccount.entity().getAllocatedTime(), Op.NNULL); + AllocatedIpCountForAccount.and("network", AllocatedIpCountForAccount.entity().getAssociatedWithNetworkId(), Op.NNULL); AllocatedIpCountForAccount.done(); }