Inconsistency in filtering resources by boolean options
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
octavia |
In Progress
|
Medium
|
Gregory Thiemonge |
Bug Description
There seems to be an inconsistency in filtering resources [1] using boolean options.
For example, when I try to filter out members of a pool using admin_state_up boolean value then values like 'true' and 'false' work as expected.
However, when I want to filter out all members using the backup (or other boolean fields like 'enabled') field then 'true'/'false' values do not work as expected. The user must use the values stored in the database 1/0 instead.
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Auth-Token: XXXXX' \
http://
I get non-backup members from the pool in the response. See the attached file for more examples. In the file, I work with 1 backup member and 2 default members.
[1] https:/
description: | updated |
Changed in octavia: | |
assignee: | nobody → Gregory Thiemonge (gthiemonge) |
Thanks for reporting it Lukas, /opendev. org/openstack/ octavia/ src/commit/ 261ee7dcffb1fe6 34152c4f2ccf792 64c1a653b5/ octavia/ db/base_ models. py#L118- L120
I confirm this bug, the Octavia API doesn't handle correctly the boolean filters.
There's only a specific case for "enabled": https:/
we need to apply the same conversion to the other booleans (perhaps not in this function but in the data_models classes)