Comment 1 for bug 1588007

Revision history for this message
Castulo J. Martinez (castulo-martinez) wrote :

Now that bug 1584415 (https://bugs.launchpad.net/glance/+bug/1584415) has been closed, looks like it only got fixed for MySQL DB backend.

So as an update for this bug, trying to filter images by using the created_at and updated_at parameters fail when the DB backend is Postgresql regardless of if the date includes an operation or not:

1) Using only date without an operator:
/v2/images?created_at=2016-04-18T21:38:55Z
Results in a 400 Bad Request error: Bad "created_at" query filter format. Use ISO 8601 DateTime notation.

2) Using date plus operator:
/v2/images?created_at=lte:2016-04-18T21:38:55Z
Looks like depending on the operator we get different results:

+ using eq: Doesn't work. Results in an empty list even when there are images that match the criteria.

+ using lt: Seems to be working fine. Lists the images that match only the "less than" condition.

+ using lte: Doesn't work. It only lists the images that match the "less than" condition and ignores the "equal" condition.

+ using gt: Doesn't work. It lists the images that match the "greater than" condition but also the "equal".

+ using gte: Seems to be working fine. It lists the images that match the "greater than" condition and the "equal" condition.