From f68a1a7d4431cdbfd90c91cd5360e4683965ad26 Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Tue, 24 Jul 2012 11:55:02 -0700 Subject: [PATCH] listPublicIpAddresses: when do join with nics table, count only non-removed nics --- .../com/cloud/server/ManagementServerImpl.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 57db9e38d88..4246e7f7534 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -1785,19 +1785,6 @@ public class ManagementServerImpl implements ManagementServer { vlanType = VlanType.VirtualNetwork; } - // don't show SSVM/CPVM ips - boolean omitSystemVmIps = false; - if (vlanType == VlanType.VirtualNetwork && (allocatedOnly) && vpcId == null) { - - SearchBuilder nonSystemVmSearch = _nicDao.createSearchBuilder(); - nonSystemVmSearch.and().op("vmTypeNnull", nonSystemVmSearch.entity().getVmType(), Op.NULL); - nonSystemVmSearch.or("vmType", nonSystemVmSearch.entity().getVmType(), Op.NOTIN); - nonSystemVmSearch.cp(); - sb.join("nonSystemVms", nonSystemVmSearch, sb.entity().getAddress(), - nonSystemVmSearch.entity().getIp4Address(), JoinType.LEFTOUTER); - omitSystemVmIps = true; - } - SearchCriteria sc = sb.create(); if (isAllocated) { _accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria); @@ -1814,10 +1801,6 @@ public class ManagementServerImpl implements ManagementServer { count++; } } - - if (omitSystemVmIps) { - sc.setJoinParameters("nonSystemVms", "vmType", VirtualMachine.Type.ConsoleProxy, VirtualMachine.Type.SecondaryStorageVm); - } if (zone != null) { sc.setParameters("dataCenterId", zone);