api: Fix search cluster by name (#5782)

This commit is contained in:
Pearl Dsilva 2021-12-22 10:41:06 +05:30 committed by GitHub
parent 995ce06cb7
commit 936ebbb90f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1146,7 +1146,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
final SearchBuilder<ClusterVO> sb = _clusterDao.createSearchBuilder();
sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
sb.and("name", sb.entity().getName(), SearchCriteria.Op.LIKE);
sb.and("name", sb.entity().getName(), SearchCriteria.Op.EQ);
sb.and("podId", sb.entity().getPodId(), SearchCriteria.Op.EQ);
sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ);
sb.and("hypervisorType", sb.entity().getHypervisorType(), SearchCriteria.Op.EQ);
@ -1159,7 +1159,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
}
if (name != null) {
sc.setParameters("name", "%" + name + "%");
sc.setParameters("name", name);
}
if (podId != null) {