Updated Branches: refs/heads/4.2-forward 670fc7e6e -> d28cca7bf
CLOUDSTACK-4671:ListZone API failed with Assertion error if assertion is turned on for MS. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d28cca7b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d28cca7b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d28cca7b Branch: refs/heads/4.2-forward Commit: d28cca7bf0907e17bded24a736018809c12fa479 Parents: 670fc7e Author: Min Chen <[email protected]> Authored: Fri Sep 13 16:53:11 2013 -0700 Committer: Min Chen <[email protected]> Committed: Fri Sep 13 16:53:54 2013 -0700 ---------------------------------------------------------------------- server/src/com/cloud/api/query/QueryManagerImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d28cca7b/server/src/com/cloud/api/query/QueryManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java index 879e74d..615e207 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -2508,7 +2508,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { sdc.addOr("accountId", SearchCriteria.Op.EQ, account.getId()); sdc.addOr("accountId", SearchCriteria.Op.NULL); - sc.addAnd("account", SearchCriteria.Op.SC, sdc); + sc.addAnd("accountId", SearchCriteria.Op.SC, sdc); } } else if (account.getType() == Account.ACCOUNT_TYPE_NORMAL) { @@ -2537,7 +2537,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { SearchCriteria<DataCenterJoinVO> sdc = _dcJoinDao.createSearchCriteria(); sdc.addOr("domainId", SearchCriteria.Op.IN, domainIds.toArray()); sdc.addOr("domainId", SearchCriteria.Op.NULL); - sc.addAnd("domain", SearchCriteria.Op.SC, sdc); + sc.addAnd("domainId", SearchCriteria.Op.SC, sdc); // remove disabled zones sc.addAnd("allocationState", SearchCriteria.Op.NEQ, Grouping.AllocationState.Disabled); @@ -2548,7 +2548,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { sdc2.addOr("accountId", SearchCriteria.Op.EQ, account.getId()); sdc2.addOr("accountId", SearchCriteria.Op.NULL); - sc.addAnd("account", SearchCriteria.Op.SC, sdc2); + sc.addAnd("accountId", SearchCriteria.Op.SC, sdc2); // remove Dedicated zones not dedicated to this domainId or // subdomainId @@ -2588,7 +2588,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { SearchCriteria<DataCenterJoinVO> sdc = _dcJoinDao.createSearchCriteria(); sdc.addOr("domainId", SearchCriteria.Op.IN, domainIds.toArray()); sdc.addOr("domainId", SearchCriteria.Op.NULL); - sc.addAnd("domain", SearchCriteria.Op.SC, sdc); + sc.addAnd("domainId", SearchCriteria.Op.SC, sdc); // remove disabled zones sc.addAnd("allocationState", SearchCriteria.Op.NEQ, Grouping.AllocationState.Disabled); @@ -2617,7 +2617,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { if (dcIds.size() == 0) { return new Pair<List<DataCenterJoinVO>, Integer>(new ArrayList<DataCenterJoinVO>(), 0); } else { - sc.addAnd("idIn", SearchCriteria.Op.IN, dcIds.toArray()); + sc.addAnd("id", SearchCriteria.Op.IN, dcIds.toArray()); } }
