<html><body>
<p><font size="2" face="sans-serif">Hello,</font><br>
<br>
<font size="2" face="sans-serif">When applying an IP address filter to a paginated servers query (eg, supplying servers/detail?ip=192.168&limit=100), the IP address filtering is only being applied against the non-filtered page of servers that were retrieved from the DB; see [1].</font><br>
<br>
<font size="2" face="sans-serif">I believe that the IP address filtering should be done before the limit is applied, returning up to <limit> servers that match the IP address filter.  Currently, if the servers in the page of data returned from the DB do not happen to match the IP address filter (applied in the compute API), then no servers will be returned by the REST API (even if there are servers that match the IP address filter).</font><br>
<br>
<font size="2" face="sans-serif">This seems like a bug to me, shouldn't all filtering be done at the DB layer?</font><br>
<br>
<font size="2" face="sans-serif">[1]: </font><a href="https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2037-L2042"><font size="2" face="sans-serif">https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2037-L2042</font></a><br>
<br>
<font size="2" face="sans-serif">Thanks,</font><br>
<font size="2" face="sans-serif">Steven Kaufer</font></body></html>