bug 10974: Fixed a bug in the search for listRouters API. The bug was introduced due to change in the VmInstancVO where the name field was changed to hostName. This went unnoticed in the DAO layer as we dont throw an exception but an assert error.

This commit is contained in:
Nitin 2011-09-12 16:51:17 +05:30
parent e786533b27
commit 0534fa29ab
1 changed files with 2 additions and 2 deletions

View File

@ -2253,11 +2253,11 @@ public class ManagementServerImpl implements ManagementServer {
SearchCriteria<DomainRouterVO> sc = sb.create();
if (keyword != null) {
SearchCriteria<DomainRouterVO> ssc = _routerDao.createSearchCriteria();
ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%");
ssc.addOr("hostName", SearchCriteria.Op.LIKE, "%" + keyword + "%");
ssc.addOr("instanceName", SearchCriteria.Op.LIKE, "%" + keyword + "%");
ssc.addOr("state", SearchCriteria.Op.LIKE, "%" + keyword + "%");
sc.addAnd("name", SearchCriteria.Op.SC, ssc);
sc.addAnd("hostName", SearchCriteria.Op.SC, ssc);
}
if (name != null) {