bug 8734: search by keyword in listPublicIpAddresses command

status 8734: resolved fixed
This commit is contained in:
alena 2011-03-09 13:15:20 -08:00
parent a5c21dc130
commit 0c04007e04
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,6 @@ import com.cloud.api.ApiConstants;
import com.cloud.api.BaseListCmd;
import com.cloud.api.Implementation;
import com.cloud.api.Parameter;
import com.cloud.api.BaseCmd.CommandType;
import com.cloud.api.response.FirewallRuleResponse;
import com.cloud.api.response.ListResponse;
import com.cloud.network.rules.PortForwardingRule;

View File

@ -2474,6 +2474,7 @@ public class ManagementServerImpl implements ManagementServer {
sb.and("accountIdEQ", sb.entity().getAllocatedToAccountId(), SearchCriteria.Op.EQ);
sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ);
sb.and("address", sb.entity().getAddress(), SearchCriteria.Op.EQ);
sb.and("addressLike", sb.entity().getAddress(), SearchCriteria.Op.LIKE);
sb.and("vlanDbId", sb.entity().getVlanId(), SearchCriteria.Op.EQ);
sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
@ -2516,7 +2517,7 @@ public class ManagementServerImpl implements ManagementServer {
}
if ((address == null) && (keyword != null)) {
address = keyword;
sc.setParameters("addressLike", "%" + keyword + "%");
}
if (address != null) {