designate/designate/api
James Li 5879c90098 Fix data filtering with pagination
When listing recordsets with filtering on record data,
designate makes a first filtering against recordsets table
to retrieve a list of recordsets belonging to the specified
zone, followed by the second filtering against records table
on record data (e.g. IPs), then intersects the two.
Check https://github.com/openstack/designate/blob/master/designate/api/v2/controllers/recordsets.py

This approach does not work properly when pagination happens.
Imagine a zone has 21 A records with 10.* like IPs,
and 9 A records with 192.* like IPs. When requesting
"/v2/zone/{zone_id}/recordsets?data=10.*", designate makes
the first filtering and get the first page (i.e. 20 recordsets) which may
have both 192.* and 10.* records mixed together,
the second filtering actually excludes all 192.* records from the first page.
But that ends up with a page less than 20 records, so designate won't
include a 'next' link in the response.

This patch fixes the problem.

Closes-bug: #1561746
Change-Id: Ib06dd288d129ff4b39c388d80f24d179c6af28d8
2016-04-20 15:01:35 +00:00
..
admin Merge "Add an on-demand single-target sync method" 2016-02-27 12:50:08 +00:00
v1 Add Enhanced Logging to APIs 2016-04-05 15:10:23 +01:00
v2 Fix data filtering with pagination 2016-04-20 15:01:35 +00:00
__init__.py Merge "remove default=None for config options" 2015-11-09 18:25:08 +00:00
middleware.py Rename zone > domain for errors in V1 2016-01-19 09:26:29 +00:00
service.py Add support for getting Service Status 2016-04-12 16:32:17 +02:00
versions.py Update email addresses hp.com to hpe.com 2016-01-11 14:29:33 +00:00