sort_key and sort_dir combination are not being honored in correct way
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
while sorting servers, user can pass sort_key and sort_dir combination and API says:
"You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the direction of the server sort_key attribute. " - http://
But if any sort_dir are not being passed in between of multiple sort_key, sort_dir combination then, it end up with having wrong mapping sort_key and sort_dir.
API layer just prepare the list of sort_key and sort_dir and then DB layer append remaining sort_dir as default value in list.
- https:/
- https:/
While preparing the list of sort_key and sort_dir from req query, missing sort_dir should be added as default value so that all the way down combination can be remembered with index.
If user pass both combination of sort_key and sort_dir then there is no issue.
Changed in nova: | |
assignee: | nobody → Ghanshyam Mann (ghanshyammann) |
Changed in nova: | |
status: | Confirmed → In Progress |
Agree. We end up having wrong mapping for sort_dir when some directions are missed in between. This is handled well in python-novaclient but not in api.