Listing event using filter like 'start_timestamp' raises exception

Bug #1711997 reported by SU, HAO-CHEN
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description


  Listing event using filter such as 'start_timestamp':

    $ openstack event list --filter start_timestamp='2017-08-15 00:00:00'

  raises exception:

    Operator eq is not supported. Only `ge' operator is available for field
    start_timestamp (HTTP 400) (Request-ID: ...


  The code responsible for this should be ''. Around line 32:

    url = "q.field=%s&q.op=eq&q.value=%s" % (k, v)


  The code sends query with operator 'eq' no matter what the field is.

  On the other hand, ceilometer client behaves correctly with commands like:

    $ ceilometer event-list -q 'start_timestamp>=2017-08-15 00:00:00'

Possible solution:

  Make this part of code that when some specific filter field is given, the
  operator in the url query would be the one that matches.

  Or we can, on the other hand, change how panko's api server behaves: when the
  field is a specific value such as 'start_timestamp', the operator given is
  ignored and the default one is forced to be used.

Other issues:

  Problems like this related to operator in the filter are somewhat troublesome,
  since the format of filter in openstack client must be: <key>=<value>. And it
  seems to me that all the clients such as ceilometer-client are going to be
  removed except openstack-client. These problems should be resolved after all.

SU, HAO-CHEN (astacksu)
description: updated
SU, HAO-CHEN (astacksu)
description: updated
Revision history for this message
SU, HAO-CHEN (astacksu) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-pankoclient (master)

Change abandoned by SU, HAO-CHEN (<email address hidden>) on branch: master
Reason: the issue has been solved by

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/panko 4.0.0

This issue was fixed in the openstack/panko 4.0.0 release.

Vadym Markov (vmarkov)
Changed in python-pankoclient:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.