← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1584415] [NEW] Listing images with the created_at and updated_at filters fails if an operator is not specified

 

Public bug reported:

When listing images there are several optional parameters that can be
used to filter the list of images retrieved by the API. All those
optional parameters are documented in the API guide:
http://developer.openstack.org/api-ref-image-v2.html#listImages-v2. The
following two parameters are not working properly when used, the
created_at and the updated_at.

Before the Mitaka release a user could filter the list of images by
using the following options:

GET /v2/images?created_at=<Some date time value>
GET /v2/images?updated_at=<Some date time value>
 
Starting on the Mitaka release users can also use an operator (eq, neq, lt, lte, gt, gte) for comparison purposes when filtering images using the created_at or updated_at parameters. Something like:

GET /v2/images?created_at=<some operator>:<Some date time value>
GET /v2/images?updated_at=<some operator>:<Some date time value>

The problem is that starting on Mitaka, if the user tries to filter the
list of images by created_at and updated_at without using an operator
the API errors and fails to retrieve the list of images. This means that
the API is not backward compatible with Liberty for this operation.

The glance API should be able to work with backward compatibility with
Liberty when listing images using the created_at or updated_at filters.

Steps to recreate:

1) Using an environment with the Liberty release, try listing images
using the created_at parameter (filter). Example: GET
http://my_env:9292/v2/images?created_at=2016-05-20T20:53:15Z

Results: A list containing one image is successfully retrieved.

2) Using an environment with the Mitaka release try the same operation:
GET http://my_env:9292/v2/images?created_at=2016-05-20T20:53:15Z

Results: The API returns an error: 400 Bad Request . Bad "created_at"
query filter format. Use ISO 8601 DateTime notation.

The same API call should be consistent in both releases.

** Affects: glance
     Importance: Undecided
     Assignee: Castulo J. Martinez (castulo-martinez)
         Status: New

** Changed in: glance
     Assignee: (unassigned) => Castulo J. Martinez (castulo-martinez)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1584415

Title:
  Listing images with the created_at and updated_at filters fails if an
  operator is not specified

Status in Glance:
  New

Bug description:
  When listing images there are several optional parameters that can be
  used to filter the list of images retrieved by the API. All those
  optional parameters are documented in the API guide:
  http://developer.openstack.org/api-ref-image-v2.html#listImages-v2.
  The following two parameters are not working properly when used, the
  created_at and the updated_at.

  Before the Mitaka release a user could filter the list of images by
  using the following options:

  GET /v2/images?created_at=<Some date time value>
  GET /v2/images?updated_at=<Some date time value>
   
  Starting on the Mitaka release users can also use an operator (eq, neq, lt, lte, gt, gte) for comparison purposes when filtering images using the created_at or updated_at parameters. Something like:

  GET /v2/images?created_at=<some operator>:<Some date time value>
  GET /v2/images?updated_at=<some operator>:<Some date time value>

  The problem is that starting on Mitaka, if the user tries to filter
  the list of images by created_at and updated_at without using an
  operator the API errors and fails to retrieve the list of images. This
  means that the API is not backward compatible with Liberty for this
  operation.

  The glance API should be able to work with backward compatibility with
  Liberty when listing images using the created_at or updated_at
  filters.

  Steps to recreate:

  1) Using an environment with the Liberty release, try listing images
  using the created_at parameter (filter). Example: GET
  http://my_env:9292/v2/images?created_at=2016-05-20T20:53:15Z

  Results: A list containing one image is successfully retrieved.

  2) Using an environment with the Mitaka release try the same
  operation: GET
  http://my_env:9292/v2/images?created_at=2016-05-20T20:53:15Z

  Results: The API returns an error: 400 Bad Request . Bad "created_at"
  query filter format. Use ISO 8601 DateTime notation.

  The same API call should be consistent in both releases.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1584415/+subscriptions


Follow ups