Comment 0 for bug 1711997

Revision history for this message
SU, HAO-CHEN (astacksu) wrote :


  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.