boolean query parameters inconsistently handled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Medium
|
Steven Hardy |
Bug Description
The code which handles interpreting boolean query parameters (which are always converted to strings as part of the request) seems overly restrictive, it will only except "blah?parameter=0" as a definition of False, and not the (arguably more intuitive) "blah?parameter
For example, trying to use the domain "enabled" filter:
# curl -i -X GET -H 'X-Auth-Token: 27c9fcf8c0404de
HTTP/1.1 200 OK
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 102
Date: Thu, 09 Jan 2014 16:37:29 GMT
{"domains": [], "links": {"self": "http://
# curl -i -X GET -H 'X-Auth-Token: 27c9fcf8c0404de
HTTP/1.1 200 OK
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 536
Date: Thu, 09 Jan 2014 16:37:35 GMT
{"domains": [{"links": {"self": "http://
So passing enabled=False returns all the results for enabled=True, which is, uh, confusing, particularly since True/False works when specifying enabled in the body when creating a domain.
The problem is here:
https:/
Changed in keystone: | |
assignee: | nobody → Steven Hardy (shardy) |
status: | New → In Progress |
Changed in keystone: | |
importance: | Undecided → Medium |
Changed in keystone: | |
milestone: | none → icehouse-3 |
status: | Fix Committed → Fix Released |
Changed in keystone: | |
milestone: | icehouse-3 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/65725
Review: https:/