Updated Branches: refs/heads/master 4f7bf192c -> 6a6d93c30
Fix a bug in listStoragePools api where SQL exception is thrown when a parameter is passed. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/6a6d93c3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/6a6d93c3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/6a6d93c3 Branch: refs/heads/master Commit: 6a6d93c3094a55c38f2bdcc736d179ce1e595093 Parents: 4f7bf19 Author: Min Chen <[email protected]> Authored: Thu Jan 31 11:56:06 2013 -0800 Committer: Min Chen <[email protected]> Committed: Thu Jan 31 11:56:48 2013 -0800 ---------------------------------------------------------------------- .../src/com/cloud/api/query/QueryManagerImpl.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6a6d93c3/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 cf240b1..c607383 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -1893,23 +1893,23 @@ public class QueryManagerImpl implements QueryService, Manager { } if (name != null) { - sc.setParameters("name", SearchCriteria.Op.LIKE, "%" + name + "%"); + sc.setParameters("name", "%" + name + "%"); } if (path != null) { - sc.setParameters("path", SearchCriteria.Op.EQ, path); + sc.setParameters("path", path); } if (zoneId != null) { - sc.setParameters("dataCenterId", SearchCriteria.Op.EQ, zoneId); + sc.setParameters("dataCenterId", zoneId); } if (pod != null) { - sc.setParameters("podId", SearchCriteria.Op.EQ, pod); + sc.setParameters("podId", pod); } if (address != null) { - sc.setParameters("hostAddress", SearchCriteria.Op.EQ, address); + sc.setParameters("hostAddress", address); } if (cluster != null) { - sc.setParameters("clusterId", SearchCriteria.Op.EQ, cluster); + sc.setParameters("clusterId", cluster); } // search Pool details by ids
