cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject git commit: updated refs/heads/master to 38df628
Date Fri, 12 Apr 2013 13:03:40 GMT
Updated Branches:
  refs/heads/master accfccd83 -> 38df62865


CLOUDSTACK-1989: Without this fix you can't query service offerings
that don't have a domain id set (null).

Tested via: Called "listServiceOfferings" using a simple perl script,
once with an ID, and once without an ID specified.

Signed-off-by: Chip Childers <chip.childers@gmail.com>


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

Branch: refs/heads/master
Commit: 38df62865d905aeac49fac7c32b66c7099036867
Parents: accfccd
Author: Ryan Dietrich <ryan@betterservers.com>
Authored: Fri Apr 12 14:00:41 2013 +0100
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Fri Apr 12 14:03:28 2013 +0100

----------------------------------------------------------------------
 .../src/com/cloud/api/query/QueryManagerImpl.java  |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/38df6286/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 a498c18..ea58427 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -2119,7 +2119,11 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
                 domainRecord = _domainDao.findById(domainRecord.getParent());
                 domainIds.add(domainRecord.getId());
             }
-            sc.addAnd("domainId", SearchCriteria.Op.IN, domainIds.toArray());
+            SearchCriteria<ServiceOfferingJoinVO> spc = _srvOfferingJoinDao.createSearchCriteria();
+
+            spc.addOr("domainId", SearchCriteria.Op.IN, domainIds.toArray());
+            spc.addOr("domainId", SearchCriteria.Op.NULL);
+            sc.addAnd("domainId", SearchCriteria.Op.SC, spc);
 
             // include also public offering if no keyword, name and id specified
             if ( keyword == null && name == null && id == null ){


Mime
View raw message